@pdfme/common 4.0.0-alpha.0 → 4.0.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/README.md +1 -0
- package/dist/cjs/src/constants.js +1 -1
- package/dist/cjs/src/helper.js +7 -1
- package/dist/cjs/src/helper.js.map +1 -1
- package/dist/cjs/src/index.js +2 -1
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/schema.js +5 -3
- package/dist/cjs/src/schema.js.map +1 -1
- package/dist/esm/src/constants.js +1 -1
- package/dist/esm/src/helper.js +5 -0
- package/dist/esm/src/helper.js.map +1 -1
- package/dist/esm/src/index.js +2 -2
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/schema.js +4 -2
- package/dist/esm/src/schema.js.map +1 -1
- package/dist/types/src/constants.d.ts +1 -1
- package/dist/types/src/helper.d.ts +1 -0
- package/dist/types/src/index.d.ts +4 -4
- package/dist/types/src/schema.d.ts +87 -22
- package/dist/types/src/types.d.ts +3 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/helper.ts +6 -0
- package/src/index.ts +4 -0
- package/src/schema.ts +5 -2
- package/src/types.ts +3 -0
package/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.DEFAULT_FONT_VALUE = exports.DEFAULT_FONT_NAME = exports.BLANK_PDF = exports.ZOOM = exports.MM_TO_PT_RATIO = exports.PT_TO_MM_RATIO = exports.PT_TO_PX_RATIO = exports.PDFME_VERSION = void 0;
|
4
|
-
exports.PDFME_VERSION = '4
|
4
|
+
exports.PDFME_VERSION = '4.0.0';
|
5
5
|
exports.PT_TO_PX_RATIO = 1.333;
|
6
6
|
exports.PT_TO_MM_RATIO = 0.3528;
|
7
7
|
exports.MM_TO_PT_RATIO = 2.8346; // https://www.ddc.co.jp/words/archives/20090701114500.html
|
package/dist/cjs/src/helper.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.normalizePositionsAndPageBreak = exports.calculateDiffMap = exports.getDynamicTemplate = exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.checkPlugins = exports.checkFont = exports.b64toUint8Array = exports.isBlankPdf = exports.getB64BasePdf = exports.getInputFromTemplate = exports.isHexValid = exports.pt2px = exports.pt2mm = exports.mm2pt = exports.getDefaultFont = exports.getFallbackFontName = void 0;
|
3
|
+
exports.normalizePositionsAndPageBreak = exports.calculateDiffMap = exports.getDynamicTemplate = exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.checkPlugins = exports.checkFont = exports.b64toUint8Array = exports.isBlankPdf = exports.getB64BasePdf = exports.getInputFromTemplate = exports.isHexValid = exports.px2mm = exports.pt2px = exports.pt2mm = exports.mm2pt = exports.getDefaultFont = exports.getFallbackFontName = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
5
|
const buffer_1 = require("buffer");
|
6
6
|
const schema_js_1 = require("./schema.js");
|
@@ -34,6 +34,12 @@ const pt2px = (pt) => {
|
|
34
34
|
return pt * constants_js_1.PT_TO_PX_RATIO;
|
35
35
|
};
|
36
36
|
exports.pt2px = pt2px;
|
37
|
+
const px2mm = (px) => {
|
38
|
+
// http://www.endmemo.com/sconvert/millimeterpixel.php
|
39
|
+
const ratio = 0.26458333333333;
|
40
|
+
return parseFloat(String(px)) * ratio;
|
41
|
+
};
|
42
|
+
exports.px2mm = px2mm;
|
37
43
|
const blob2Base64Pdf = (blob) => {
|
38
44
|
return new Promise((resolve, reject) => {
|
39
45
|
const reader = new FileReader();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/helper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,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;SAC5E;KACF;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAxCW,QAAA,8BAA8B,kCAwCzC"}
|
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.getDynamicTemplate = exports.isBlankPdf = exports.getInputFromTemplate = exports.isHexValid = exports.pt2px = exports.pt2mm = exports.mm2pt = exports.b64toUint8Array = exports.getB64BasePdf = exports.getDefaultFont = exports.getFallbackFontName = 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.getDynamicTemplate = exports.isBlankPdf = exports.getInputFromTemplate = exports.isHexValid = exports.px2mm = exports.pt2px = exports.pt2mm = exports.mm2pt = exports.b64toUint8Array = exports.getB64BasePdf = exports.getDefaultFont = exports.getFallbackFontName = 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;
|
4
4
|
const constants_js_1 = require("./constants.js");
|
5
5
|
Object.defineProperty(exports, "PDFME_VERSION", { enumerable: true, get: function () { return constants_js_1.PDFME_VERSION; } });
|
6
6
|
Object.defineProperty(exports, "MM_TO_PT_RATIO", { enumerable: true, get: function () { return constants_js_1.MM_TO_PT_RATIO; } });
|
@@ -25,6 +25,7 @@ Object.defineProperty(exports, "checkGenerateProps", { enumerable: true, get: fu
|
|
25
25
|
Object.defineProperty(exports, "mm2pt", { enumerable: true, get: function () { return helper_js_1.mm2pt; } });
|
26
26
|
Object.defineProperty(exports, "pt2mm", { enumerable: true, get: function () { return helper_js_1.pt2mm; } });
|
27
27
|
Object.defineProperty(exports, "pt2px", { enumerable: true, get: function () { return helper_js_1.pt2px; } });
|
28
|
+
Object.defineProperty(exports, "px2mm", { enumerable: true, get: function () { return helper_js_1.px2mm; } });
|
28
29
|
Object.defineProperty(exports, "isHexValid", { enumerable: true, get: function () { return helper_js_1.isHexValid; } });
|
29
30
|
Object.defineProperty(exports, "getInputFromTemplate", { enumerable: true, get: function () { return helper_js_1.getInputFromTemplate; } });
|
30
31
|
Object.defineProperty(exports, "isBlankPdf", { enumerable: true, get: function () { return helper_js_1.isBlankPdf; } });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAQwB;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAQwB;AAqDtB,8FA5DA,4BAAa,OA4DA;AACb,+FA5DA,6BAAc,OA4DA;AACd,+FA5DA,6BAAc,OA4DA;AACd,+FA5DA,6BAAc,OA4DA;AACd,0FA5DA,wBAAS,OA4DA;AACT,qFA5DA,mBAAI,OA4DA;AACJ,kGA5DA,gCAAiB,OA4DA;AA9BnB,2CAqBqB;AAUnB,oGA9BA,+BAAmB,OA8BA;AACnB,+FA9BA,0BAAc,OA8BA;AACd,8FA9BA,yBAAa,OA8BA;AACb,gGA9BA,2BAAe,OA8BA;AASf,0FAtCA,qBAAS,OAsCA;AACT,4FAtCA,uBAAW,OAsCA;AACX,+FAtCA,0BAAc,OAsCA;AACd,8FAtCA,yBAAa,OAsCA;AACb,6FAtCA,wBAAY,OAsCA;AACZ,kGAtCA,6BAAiB,OAsCA;AACjB,mGAtCA,8BAAkB,OAsCA;AAClB,mGAtCA,8BAAkB,OAsCA;AAflB,sFAtBA,iBAAK,OAsBA;AACL,sFAtBA,iBAAK,OAsBA;AACL,sFAtBA,iBAAK,OAsBA;AACL,sFAtBA,iBAAK,OAsBA;AACL,2FAtBA,sBAAU,OAsBA;AACV,qGAtBA,gCAAoB,OAsBA;AACpB,2FAtBA,sBAAU,OAsBA;AACV,mGAtBA,8BAAkB,OAsBA"}
|
package/dist/cjs/src/schema.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.DesignerProps = exports.PreviewProps = exports.UIProps = exports.UIOptions = exports.GenerateProps = exports.GeneratorOptions = exports.CommonOptions = exports.Font = exports.Inputs = exports.Template = exports.BasePdf = exports.BlankPdf = exports.SchemaForUI = exports.Schema = exports.Size = exports.Mode = exports.Dict = exports.Lang = void 0;
|
3
|
+
exports.DesignerProps = exports.PreviewProps = exports.UIProps = exports.UIOptions = exports.GenerateProps = exports.GeneratorOptions = exports.CommonOptions = exports.Font = exports.Inputs = exports.Template = exports.BasePdf = exports.BlankPdf = exports.SchemaForUI = exports.Schema = exports.Size = exports.ColorType = exports.Mode = exports.Dict = exports.Lang = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const langs = ['en', 'ja', 'ar', 'th', '
|
5
|
+
const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it', 'de', 'es', 'fr'];
|
6
6
|
exports.Lang = zod_1.z.enum(langs);
|
7
7
|
exports.Dict = zod_1.z.object({
|
8
8
|
// -----------------used in ui-----------------
|
@@ -20,7 +20,6 @@ exports.Dict = zod_1.z.object({
|
|
20
20
|
notUniq: zod_1.z.string(),
|
21
21
|
noKeyName: zod_1.z.string(),
|
22
22
|
fieldsList: zod_1.z.string(),
|
23
|
-
addNewField: zod_1.z.string(),
|
24
23
|
editField: zod_1.z.string(),
|
25
24
|
type: zod_1.z.string(),
|
26
25
|
errorOccurred: zod_1.z.string(),
|
@@ -66,10 +65,12 @@ exports.Dict = zod_1.z.object({
|
|
66
65
|
'schemas.table.columnStyle': zod_1.z.string(),
|
67
66
|
});
|
68
67
|
exports.Mode = zod_1.z.enum(['viewer', 'form', 'designer']);
|
68
|
+
exports.ColorType = zod_1.z.enum(['rgb', 'cmyk']).optional();
|
69
69
|
exports.Size = zod_1.z.object({ height: zod_1.z.number(), width: zod_1.z.number() });
|
70
70
|
exports.Schema = zod_1.z
|
71
71
|
.object({
|
72
72
|
type: zod_1.z.string(),
|
73
|
+
icon: zod_1.z.string().optional(),
|
73
74
|
content: zod_1.z.string().optional(),
|
74
75
|
position: zod_1.z.object({ x: zod_1.z.number(), y: zod_1.z.number() }),
|
75
76
|
width: zod_1.z.number(),
|
@@ -113,6 +114,7 @@ const CommonProps = zod_1.z.object({
|
|
113
114
|
});
|
114
115
|
// -------------------generate-------------------
|
115
116
|
exports.GeneratorOptions = exports.CommonOptions.extend({
|
117
|
+
colorType: exports.ColorType,
|
116
118
|
author: zod_1.z.string().optional(),
|
117
119
|
creationDate: zod_1.z.date().optional(),
|
118
120
|
creator: zod_1.z.string().optional(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IA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AC,MAAM,CAAC,EAAE,MAAM,EAAE,cAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAE3D,QAAA,aAAa,GAAG,eAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
package/dist/esm/src/helper.js
CHANGED
@@ -26,6 +26,11 @@ export const pt2mm = (pt) => {
|
|
26
26
|
export const pt2px = (pt) => {
|
27
27
|
return pt * PT_TO_PX_RATIO;
|
28
28
|
};
|
29
|
+
export const px2mm = (px) => {
|
30
|
+
// http://www.endmemo.com/sconvert/millimeterpixel.php
|
31
|
+
const ratio = 0.26458333333333;
|
32
|
+
return parseFloat(String(px)) * ratio;
|
33
|
+
};
|
29
34
|
const blob2Base64Pdf = (blob) => {
|
30
35
|
return new Promise((resolve, reject) => {
|
31
36
|
const reader = new FileReader();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EACL,MAAM,IAAI,YAAY,EACtB,SAAS,IAAI,eAAe,EAC5B,QAAQ,IAAI,cAAc,EAC1B,YAAY,IAAI,kBAAkB,EAClC,aAAa,IAAI,mBAAmB,EACpC,aAAa,IAAI,mBAAmB,EACpC,OAAO,IAAI,aAAa,EACxB,QAAQ,IAAI,cAAc,GAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,MAAM,IAAI,GAAG,CAAI,KAAe,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAU,EAAE,E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AAM,CAAC;YACpC,IAAI,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC;YACtB,IAAI,UAAU,GAAG,CAAC,CAAC;YAEnB,KAAK,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,OAAO,EAAE;gBAC1C,IAAI,IAAI,GAAG,OAAO,EAAE;oBAClB,IAAI,IAAI,SAAS,CAAC;iBACnB;aACF;YAED,OAAO,IAAI,GAAG,MAAM,IAAI,UAAU,GAAG,aAAa,EAAE;gBAClD,IAAI,GAAG,IAAI,GAAG,UAAU,GAAG,CAAC,UAAU,GAAG,aAAa,CAAC,GAAG,UAAU,CAAC;gBACrE,UAAU,EAAE,CAAC;aACd;YAED,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;gBAAE,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;YAC/C,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;SAC5E;KACF;IAED,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
|
package/dist/esm/src/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, } from './constants.js';
|
2
|
-
import { getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, mm2pt, pt2mm, pt2px, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, } from './helper.js';
|
3
|
-
export { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
2
|
+
import { getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, } from './helper.js';
|
3
|
+
export { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
4
4
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AA6BxB,OAAO,EACL,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,EACV,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC"}
|
package/dist/esm/src/schema.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
const langs = ['en', 'ja', 'ar', 'th', '
|
2
|
+
const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it', 'de', 'es', 'fr'];
|
3
3
|
export const Lang = z.enum(langs);
|
4
4
|
export const Dict = z.object({
|
5
5
|
// -----------------used in ui-----------------
|
@@ -17,7 +17,6 @@ export const Dict = z.object({
|
|
17
17
|
notUniq: z.string(),
|
18
18
|
noKeyName: z.string(),
|
19
19
|
fieldsList: z.string(),
|
20
|
-
addNewField: z.string(),
|
21
20
|
editField: z.string(),
|
22
21
|
type: z.string(),
|
23
22
|
errorOccurred: z.string(),
|
@@ -63,10 +62,12 @@ export const Dict = z.object({
|
|
63
62
|
'schemas.table.columnStyle': z.string(),
|
64
63
|
});
|
65
64
|
export const Mode = z.enum(['viewer', 'form', 'designer']);
|
65
|
+
export const ColorType = z.enum(['rgb', 'cmyk']).optional();
|
66
66
|
export const Size = z.object({ height: z.number(), width: z.number() });
|
67
67
|
export const Schema = z
|
68
68
|
.object({
|
69
69
|
type: z.string(),
|
70
|
+
icon: z.string().optional(),
|
70
71
|
content: z.string().optional(),
|
71
72
|
position: z.object({ x: z.number(), y: z.number() }),
|
72
73
|
width: z.number(),
|
@@ -110,6 +111,7 @@ const CommonProps = z.object({
|
|
110
111
|
});
|
111
112
|
// -------------------generate-------------------
|
112
113
|
export const GeneratorOptions = CommonOptions.extend({
|
114
|
+
colorType: ColorType,
|
113
115
|
author: z.string().optional(),
|
114
116
|
creationDate: z.date().optional(),
|
115
117
|
creator: z.string().optional(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAE9E,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,+CAA+C;IAC/C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,M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number) => number;
|
6
6
|
export declare const pt2px: (pt: number) => number;
|
7
|
+
export declare const px2mm: (px: number) => number;
|
7
8
|
export declare const isHexValid: (hex: string) => boolean;
|
8
9
|
export declare const getInputFromTemplate: (template: Template) => {
|
9
10
|
[key: string]: string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME } from './constants.js';
|
2
|
-
import type { ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, Mode, UIRenderProps, Plugin, Lang, Dict, Size, Schema, SchemaForUI, Font, BasePdf, BlankPdf, Template, CommonOptions, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from './types.js';
|
3
|
-
import { getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, mm2pt, pt2mm, pt2px, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate } from './helper.js';
|
4
|
-
export { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
5
|
-
export type { Lang, Dict, Size, Schema, SchemaForUI, Font, BasePdf, BlankPdf, Template, CommonOptions, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, UIRenderProps, Mode, Plugin, };
|
2
|
+
import type { ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, Mode, UIRenderProps, Plugin, Lang, Dict, Size, Schema, SchemaForUI, Font, ColorType, BasePdf, BlankPdf, Template, CommonOptions, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from './types.js';
|
3
|
+
import { getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate } from './helper.js';
|
4
|
+
export { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
5
|
+
export type { Lang, Dict, Size, Schema, SchemaForUI, Font, ColorType, BasePdf, BlankPdf, Template, CommonOptions, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ChangeSchemas, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, UIRenderProps, Mode, Plugin, };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
export declare const Lang: z.ZodEnum<["en", "ja", "ar", "th", "
|
2
|
+
export declare const Lang: z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>;
|
3
3
|
export declare const Dict: z.ZodObject<{
|
4
4
|
cancel: z.ZodString;
|
5
5
|
field: z.ZodString;
|
@@ -15,7 +15,6 @@ export declare const Dict: z.ZodObject<{
|
|
15
15
|
notUniq: z.ZodString;
|
16
16
|
noKeyName: z.ZodString;
|
17
17
|
fieldsList: z.ZodString;
|
18
|
-
addNewField: z.ZodString;
|
19
18
|
editField: z.ZodString;
|
20
19
|
type: z.ZodString;
|
21
20
|
errorOccurred: z.ZodString;
|
@@ -73,7 +72,6 @@ export declare const Dict: z.ZodObject<{
|
|
73
72
|
notUniq: string;
|
74
73
|
noKeyName: string;
|
75
74
|
fieldsList: string;
|
76
|
-
addNewField: string;
|
77
75
|
editField: string;
|
78
76
|
type: string;
|
79
77
|
errorOccurred: string;
|
@@ -131,7 +129,6 @@ export declare const Dict: z.ZodObject<{
|
|
131
129
|
notUniq: string;
|
132
130
|
noKeyName: string;
|
133
131
|
fieldsList: string;
|
134
|
-
addNewField: string;
|
135
132
|
editField: string;
|
136
133
|
type: string;
|
137
134
|
errorOccurred: string;
|
@@ -176,6 +173,7 @@ export declare const Dict: z.ZodObject<{
|
|
176
173
|
'schemas.table.columnStyle': string;
|
177
174
|
}>;
|
178
175
|
export declare const Mode: z.ZodEnum<["viewer", "form", "designer"]>;
|
176
|
+
export declare const ColorType: z.ZodOptional<z.ZodEnum<["rgb", "cmyk"]>>;
|
179
177
|
export declare const Size: z.ZodObject<{
|
180
178
|
height: z.ZodNumber;
|
181
179
|
width: z.ZodNumber;
|
@@ -188,6 +186,7 @@ export declare const Size: z.ZodObject<{
|
|
188
186
|
}>;
|
189
187
|
export declare const Schema: z.ZodObject<{
|
190
188
|
type: z.ZodString;
|
189
|
+
icon: z.ZodOptional<z.ZodString>;
|
191
190
|
content: z.ZodOptional<z.ZodString>;
|
192
191
|
position: z.ZodObject<{
|
193
192
|
x: z.ZodNumber;
|
@@ -206,6 +205,7 @@ export declare const Schema: z.ZodObject<{
|
|
206
205
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
207
206
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
208
207
|
type: z.ZodString;
|
208
|
+
icon: z.ZodOptional<z.ZodString>;
|
209
209
|
content: z.ZodOptional<z.ZodString>;
|
210
210
|
position: z.ZodObject<{
|
211
211
|
x: z.ZodNumber;
|
@@ -224,6 +224,7 @@ export declare const Schema: z.ZodObject<{
|
|
224
224
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
225
225
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
226
226
|
type: z.ZodString;
|
227
|
+
icon: z.ZodOptional<z.ZodString>;
|
227
228
|
content: z.ZodOptional<z.ZodString>;
|
228
229
|
position: z.ZodObject<{
|
229
230
|
x: z.ZodNumber;
|
@@ -247,6 +248,7 @@ export declare const SchemaForUI: z.ZodObject<{
|
|
247
248
|
height: z.ZodNumber;
|
248
249
|
rotate: z.ZodOptional<z.ZodNumber>;
|
249
250
|
type: z.ZodString;
|
251
|
+
icon: z.ZodOptional<z.ZodString>;
|
250
252
|
content: z.ZodOptional<z.ZodString>;
|
251
253
|
position: z.ZodObject<{
|
252
254
|
x: z.ZodNumber;
|
@@ -273,6 +275,7 @@ export declare const SchemaForUI: z.ZodObject<{
|
|
273
275
|
key: string;
|
274
276
|
opacity?: number | undefined;
|
275
277
|
rotate?: number | undefined;
|
278
|
+
icon?: string | undefined;
|
276
279
|
content?: string | undefined;
|
277
280
|
readOnly?: boolean | undefined;
|
278
281
|
}, {
|
@@ -287,6 +290,7 @@ export declare const SchemaForUI: z.ZodObject<{
|
|
287
290
|
key: string;
|
288
291
|
opacity?: number | undefined;
|
289
292
|
rotate?: number | undefined;
|
293
|
+
icon?: string | undefined;
|
290
294
|
content?: string | undefined;
|
291
295
|
readOnly?: boolean | undefined;
|
292
296
|
}>;
|
@@ -319,6 +323,7 @@ export declare const BasePdf: z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.
|
|
319
323
|
export declare const Template: z.ZodObject<{
|
320
324
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
321
325
|
type: z.ZodString;
|
326
|
+
icon: z.ZodOptional<z.ZodString>;
|
322
327
|
content: z.ZodOptional<z.ZodString>;
|
323
328
|
position: z.ZodObject<{
|
324
329
|
x: z.ZodNumber;
|
@@ -337,6 +342,7 @@ export declare const Template: z.ZodObject<{
|
|
337
342
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
338
343
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
339
344
|
type: z.ZodString;
|
345
|
+
icon: z.ZodOptional<z.ZodString>;
|
340
346
|
content: z.ZodOptional<z.ZodString>;
|
341
347
|
position: z.ZodObject<{
|
342
348
|
x: z.ZodNumber;
|
@@ -355,6 +361,7 @@ export declare const Template: z.ZodObject<{
|
|
355
361
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
356
362
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
357
363
|
type: z.ZodString;
|
364
|
+
icon: z.ZodOptional<z.ZodString>;
|
358
365
|
content: z.ZodOptional<z.ZodString>;
|
359
366
|
position: z.ZodObject<{
|
360
367
|
x: z.ZodNumber;
|
@@ -389,6 +396,7 @@ export declare const Template: z.ZodObject<{
|
|
389
396
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
390
397
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
391
398
|
type: z.ZodString;
|
399
|
+
icon: z.ZodOptional<z.ZodString>;
|
392
400
|
content: z.ZodOptional<z.ZodString>;
|
393
401
|
position: z.ZodObject<{
|
394
402
|
x: z.ZodNumber;
|
@@ -407,6 +415,7 @@ export declare const Template: z.ZodObject<{
|
|
407
415
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
408
416
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
409
417
|
type: z.ZodString;
|
418
|
+
icon: z.ZodOptional<z.ZodString>;
|
410
419
|
content: z.ZodOptional<z.ZodString>;
|
411
420
|
position: z.ZodObject<{
|
412
421
|
x: z.ZodNumber;
|
@@ -425,6 +434,7 @@ export declare const Template: z.ZodObject<{
|
|
425
434
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
426
435
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
427
436
|
type: z.ZodString;
|
437
|
+
icon: z.ZodOptional<z.ZodString>;
|
428
438
|
content: z.ZodOptional<z.ZodString>;
|
429
439
|
position: z.ZodObject<{
|
430
440
|
x: z.ZodNumber;
|
@@ -459,6 +469,7 @@ export declare const Template: z.ZodObject<{
|
|
459
469
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
460
470
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
461
471
|
type: z.ZodString;
|
472
|
+
icon: z.ZodOptional<z.ZodString>;
|
462
473
|
content: z.ZodOptional<z.ZodString>;
|
463
474
|
position: z.ZodObject<{
|
464
475
|
x: z.ZodNumber;
|
@@ -477,6 +488,7 @@ export declare const Template: z.ZodObject<{
|
|
477
488
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
478
489
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
479
490
|
type: z.ZodString;
|
491
|
+
icon: z.ZodOptional<z.ZodString>;
|
480
492
|
content: z.ZodOptional<z.ZodString>;
|
481
493
|
position: z.ZodObject<{
|
482
494
|
x: z.ZodNumber;
|
@@ -495,6 +507,7 @@ export declare const Template: z.ZodObject<{
|
|
495
507
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
496
508
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
497
509
|
type: z.ZodString;
|
510
|
+
icon: z.ZodOptional<z.ZodString>;
|
498
511
|
content: z.ZodOptional<z.ZodString>;
|
499
512
|
position: z.ZodObject<{
|
500
513
|
x: z.ZodNumber;
|
@@ -598,6 +611,7 @@ export declare const GeneratorOptions: z.ZodObject<{
|
|
598
611
|
fallback?: boolean | undefined;
|
599
612
|
subset?: boolean | undefined;
|
600
613
|
}>>>;
|
614
|
+
colorType: z.ZodOptional<z.ZodEnum<["rgb", "cmyk"]>>;
|
601
615
|
author: z.ZodOptional<z.ZodString>;
|
602
616
|
creationDate: z.ZodOptional<z.ZodDate>;
|
603
617
|
creator: z.ZodOptional<z.ZodString>;
|
@@ -621,6 +635,7 @@ export declare const GeneratorOptions: z.ZodObject<{
|
|
621
635
|
fallback?: boolean | undefined;
|
622
636
|
subset?: boolean | undefined;
|
623
637
|
}>>>;
|
638
|
+
colorType: z.ZodOptional<z.ZodEnum<["rgb", "cmyk"]>>;
|
624
639
|
author: z.ZodOptional<z.ZodString>;
|
625
640
|
creationDate: z.ZodOptional<z.ZodDate>;
|
626
641
|
creator: z.ZodOptional<z.ZodString>;
|
@@ -644,6 +659,7 @@ export declare const GeneratorOptions: z.ZodObject<{
|
|
644
659
|
fallback?: boolean | undefined;
|
645
660
|
subset?: boolean | undefined;
|
646
661
|
}>>>;
|
662
|
+
colorType: z.ZodOptional<z.ZodEnum<["rgb", "cmyk"]>>;
|
647
663
|
author: z.ZodOptional<z.ZodString>;
|
648
664
|
creationDate: z.ZodOptional<z.ZodDate>;
|
649
665
|
creator: z.ZodOptional<z.ZodString>;
|
@@ -658,6 +674,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
658
674
|
template: z.ZodObject<{
|
659
675
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
660
676
|
type: z.ZodString;
|
677
|
+
icon: z.ZodOptional<z.ZodString>;
|
661
678
|
content: z.ZodOptional<z.ZodString>;
|
662
679
|
position: z.ZodObject<{
|
663
680
|
x: z.ZodNumber;
|
@@ -676,6 +693,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
676
693
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
677
694
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
678
695
|
type: z.ZodString;
|
696
|
+
icon: z.ZodOptional<z.ZodString>;
|
679
697
|
content: z.ZodOptional<z.ZodString>;
|
680
698
|
position: z.ZodObject<{
|
681
699
|
x: z.ZodNumber;
|
@@ -694,6 +712,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
694
712
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
695
713
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
696
714
|
type: z.ZodString;
|
715
|
+
icon: z.ZodOptional<z.ZodString>;
|
697
716
|
content: z.ZodOptional<z.ZodString>;
|
698
717
|
position: z.ZodObject<{
|
699
718
|
x: z.ZodNumber;
|
@@ -728,6 +747,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
728
747
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
729
748
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
730
749
|
type: z.ZodString;
|
750
|
+
icon: z.ZodOptional<z.ZodString>;
|
731
751
|
content: z.ZodOptional<z.ZodString>;
|
732
752
|
position: z.ZodObject<{
|
733
753
|
x: z.ZodNumber;
|
@@ -746,6 +766,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
746
766
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
747
767
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
748
768
|
type: z.ZodString;
|
769
|
+
icon: z.ZodOptional<z.ZodString>;
|
749
770
|
content: z.ZodOptional<z.ZodString>;
|
750
771
|
position: z.ZodObject<{
|
751
772
|
x: z.ZodNumber;
|
@@ -764,6 +785,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
764
785
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
765
786
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
766
787
|
type: z.ZodString;
|
788
|
+
icon: z.ZodOptional<z.ZodString>;
|
767
789
|
content: z.ZodOptional<z.ZodString>;
|
768
790
|
position: z.ZodObject<{
|
769
791
|
x: z.ZodNumber;
|
@@ -798,6 +820,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
798
820
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
799
821
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
800
822
|
type: z.ZodString;
|
823
|
+
icon: z.ZodOptional<z.ZodString>;
|
801
824
|
content: z.ZodOptional<z.ZodString>;
|
802
825
|
position: z.ZodObject<{
|
803
826
|
x: z.ZodNumber;
|
@@ -816,6 +839,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
816
839
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
817
840
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
818
841
|
type: z.ZodString;
|
842
|
+
icon: z.ZodOptional<z.ZodString>;
|
819
843
|
content: z.ZodOptional<z.ZodString>;
|
820
844
|
position: z.ZodObject<{
|
821
845
|
x: z.ZodNumber;
|
@@ -834,6 +858,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
834
858
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
835
859
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
836
860
|
type: z.ZodString;
|
861
|
+
icon: z.ZodOptional<z.ZodString>;
|
837
862
|
content: z.ZodOptional<z.ZodString>;
|
838
863
|
position: z.ZodObject<{
|
839
864
|
x: z.ZodNumber;
|
@@ -894,6 +919,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
894
919
|
fallback?: boolean | undefined;
|
895
920
|
subset?: boolean | undefined;
|
896
921
|
}>>>;
|
922
|
+
colorType: z.ZodOptional<z.ZodEnum<["rgb", "cmyk"]>>;
|
897
923
|
author: z.ZodOptional<z.ZodString>;
|
898
924
|
creationDate: z.ZodOptional<z.ZodDate>;
|
899
925
|
creator: z.ZodOptional<z.ZodString>;
|
@@ -917,6 +943,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
917
943
|
fallback?: boolean | undefined;
|
918
944
|
subset?: boolean | undefined;
|
919
945
|
}>>>;
|
946
|
+
colorType: z.ZodOptional<z.ZodEnum<["rgb", "cmyk"]>>;
|
920
947
|
author: z.ZodOptional<z.ZodString>;
|
921
948
|
creationDate: z.ZodOptional<z.ZodDate>;
|
922
949
|
creator: z.ZodOptional<z.ZodString>;
|
@@ -940,6 +967,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
940
967
|
fallback?: boolean | undefined;
|
941
968
|
subset?: boolean | undefined;
|
942
969
|
}>>>;
|
970
|
+
colorType: z.ZodOptional<z.ZodEnum<["rgb", "cmyk"]>>;
|
943
971
|
author: z.ZodOptional<z.ZodString>;
|
944
972
|
creationDate: z.ZodOptional<z.ZodDate>;
|
945
973
|
creator: z.ZodOptional<z.ZodString>;
|
@@ -954,6 +982,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
954
982
|
template: {
|
955
983
|
schemas: Record<string, z.objectOutputType<{
|
956
984
|
type: z.ZodString;
|
985
|
+
icon: z.ZodOptional<z.ZodString>;
|
957
986
|
content: z.ZodOptional<z.ZodString>;
|
958
987
|
position: z.ZodObject<{
|
959
988
|
x: z.ZodNumber;
|
@@ -1004,6 +1033,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
1004
1033
|
fallback?: boolean | undefined;
|
1005
1034
|
subset?: boolean | undefined;
|
1006
1035
|
}>>>;
|
1036
|
+
colorType: z.ZodOptional<z.ZodEnum<["rgb", "cmyk"]>>;
|
1007
1037
|
author: z.ZodOptional<z.ZodString>;
|
1008
1038
|
creationDate: z.ZodOptional<z.ZodDate>;
|
1009
1039
|
creator: z.ZodOptional<z.ZodString>;
|
@@ -1018,6 +1048,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
1018
1048
|
template: {
|
1019
1049
|
schemas: Record<string, z.objectInputType<{
|
1020
1050
|
type: z.ZodString;
|
1051
|
+
icon: z.ZodOptional<z.ZodString>;
|
1021
1052
|
content: z.ZodOptional<z.ZodString>;
|
1022
1053
|
position: z.ZodObject<{
|
1023
1054
|
x: z.ZodNumber;
|
@@ -1068,6 +1099,7 @@ export declare const GenerateProps: z.ZodObject<{
|
|
1068
1099
|
fallback?: boolean | undefined;
|
1069
1100
|
subset?: boolean | undefined;
|
1070
1101
|
}>>>;
|
1102
|
+
colorType: z.ZodOptional<z.ZodEnum<["rgb", "cmyk"]>>;
|
1071
1103
|
author: z.ZodOptional<z.ZodString>;
|
1072
1104
|
creationDate: z.ZodOptional<z.ZodDate>;
|
1073
1105
|
creator: z.ZodOptional<z.ZodString>;
|
@@ -1093,7 +1125,7 @@ export declare const UIOptions: z.ZodObject<{
|
|
1093
1125
|
fallback?: boolean | undefined;
|
1094
1126
|
subset?: boolean | undefined;
|
1095
1127
|
}>>>;
|
1096
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1128
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1097
1129
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1098
1130
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1099
1131
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
@@ -1110,7 +1142,7 @@ export declare const UIOptions: z.ZodObject<{
|
|
1110
1142
|
fallback?: boolean | undefined;
|
1111
1143
|
subset?: boolean | undefined;
|
1112
1144
|
}>>>;
|
1113
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1145
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1114
1146
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1115
1147
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1116
1148
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
@@ -1127,7 +1159,7 @@ export declare const UIOptions: z.ZodObject<{
|
|
1127
1159
|
fallback?: boolean | undefined;
|
1128
1160
|
subset?: boolean | undefined;
|
1129
1161
|
}>>>;
|
1130
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1162
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1131
1163
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1132
1164
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1133
1165
|
}, z.ZodTypeAny, "passthrough">>;
|
@@ -1135,6 +1167,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1135
1167
|
template: z.ZodObject<{
|
1136
1168
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
1137
1169
|
type: z.ZodString;
|
1170
|
+
icon: z.ZodOptional<z.ZodString>;
|
1138
1171
|
content: z.ZodOptional<z.ZodString>;
|
1139
1172
|
position: z.ZodObject<{
|
1140
1173
|
x: z.ZodNumber;
|
@@ -1153,6 +1186,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1153
1186
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1154
1187
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
1155
1188
|
type: z.ZodString;
|
1189
|
+
icon: z.ZodOptional<z.ZodString>;
|
1156
1190
|
content: z.ZodOptional<z.ZodString>;
|
1157
1191
|
position: z.ZodObject<{
|
1158
1192
|
x: z.ZodNumber;
|
@@ -1171,6 +1205,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1171
1205
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1172
1206
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
1173
1207
|
type: z.ZodString;
|
1208
|
+
icon: z.ZodOptional<z.ZodString>;
|
1174
1209
|
content: z.ZodOptional<z.ZodString>;
|
1175
1210
|
position: z.ZodObject<{
|
1176
1211
|
x: z.ZodNumber;
|
@@ -1205,6 +1240,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1205
1240
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
1206
1241
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
1207
1242
|
type: z.ZodString;
|
1243
|
+
icon: z.ZodOptional<z.ZodString>;
|
1208
1244
|
content: z.ZodOptional<z.ZodString>;
|
1209
1245
|
position: z.ZodObject<{
|
1210
1246
|
x: z.ZodNumber;
|
@@ -1223,6 +1259,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1223
1259
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1224
1260
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
1225
1261
|
type: z.ZodString;
|
1262
|
+
icon: z.ZodOptional<z.ZodString>;
|
1226
1263
|
content: z.ZodOptional<z.ZodString>;
|
1227
1264
|
position: z.ZodObject<{
|
1228
1265
|
x: z.ZodNumber;
|
@@ -1241,6 +1278,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1241
1278
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1242
1279
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
1243
1280
|
type: z.ZodString;
|
1281
|
+
icon: z.ZodOptional<z.ZodString>;
|
1244
1282
|
content: z.ZodOptional<z.ZodString>;
|
1245
1283
|
position: z.ZodObject<{
|
1246
1284
|
x: z.ZodNumber;
|
@@ -1275,6 +1313,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1275
1313
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
1276
1314
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
1277
1315
|
type: z.ZodString;
|
1316
|
+
icon: z.ZodOptional<z.ZodString>;
|
1278
1317
|
content: z.ZodOptional<z.ZodString>;
|
1279
1318
|
position: z.ZodObject<{
|
1280
1319
|
x: z.ZodNumber;
|
@@ -1293,6 +1332,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1293
1332
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1294
1333
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
1295
1334
|
type: z.ZodString;
|
1335
|
+
icon: z.ZodOptional<z.ZodString>;
|
1296
1336
|
content: z.ZodOptional<z.ZodString>;
|
1297
1337
|
position: z.ZodObject<{
|
1298
1338
|
x: z.ZodNumber;
|
@@ -1311,6 +1351,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1311
1351
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1312
1352
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
1313
1353
|
type: z.ZodString;
|
1354
|
+
icon: z.ZodOptional<z.ZodString>;
|
1314
1355
|
content: z.ZodOptional<z.ZodString>;
|
1315
1356
|
position: z.ZodObject<{
|
1316
1357
|
x: z.ZodNumber;
|
@@ -1371,7 +1412,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1371
1412
|
fallback?: boolean | undefined;
|
1372
1413
|
subset?: boolean | undefined;
|
1373
1414
|
}>>>;
|
1374
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1415
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1375
1416
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1376
1417
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1377
1418
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
@@ -1388,7 +1429,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1388
1429
|
fallback?: boolean | undefined;
|
1389
1430
|
subset?: boolean | undefined;
|
1390
1431
|
}>>>;
|
1391
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1432
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1392
1433
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1393
1434
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1394
1435
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
@@ -1405,7 +1446,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1405
1446
|
fallback?: boolean | undefined;
|
1406
1447
|
subset?: boolean | undefined;
|
1407
1448
|
}>>>;
|
1408
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1449
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1409
1450
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1410
1451
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1411
1452
|
}, z.ZodTypeAny, "passthrough">>>;
|
@@ -1413,6 +1454,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1413
1454
|
template: {
|
1414
1455
|
schemas: Record<string, z.objectOutputType<{
|
1415
1456
|
type: z.ZodString;
|
1457
|
+
icon: z.ZodOptional<z.ZodString>;
|
1416
1458
|
content: z.ZodOptional<z.ZodString>;
|
1417
1459
|
position: z.ZodObject<{
|
1418
1460
|
x: z.ZodNumber;
|
@@ -1463,7 +1505,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1463
1505
|
fallback?: boolean | undefined;
|
1464
1506
|
subset?: boolean | undefined;
|
1465
1507
|
}>>>;
|
1466
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1508
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1467
1509
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1468
1510
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1469
1511
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
@@ -1471,6 +1513,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1471
1513
|
template: {
|
1472
1514
|
schemas: Record<string, z.objectInputType<{
|
1473
1515
|
type: z.ZodString;
|
1516
|
+
icon: z.ZodOptional<z.ZodString>;
|
1474
1517
|
content: z.ZodOptional<z.ZodString>;
|
1475
1518
|
position: z.ZodObject<{
|
1476
1519
|
x: z.ZodNumber;
|
@@ -1521,7 +1564,7 @@ export declare const UIProps: z.ZodObject<{
|
|
1521
1564
|
fallback?: boolean | undefined;
|
1522
1565
|
subset?: boolean | undefined;
|
1523
1566
|
}>>>;
|
1524
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1567
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1525
1568
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1526
1569
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1527
1570
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
@@ -1541,7 +1584,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1541
1584
|
fallback?: boolean | undefined;
|
1542
1585
|
subset?: boolean | undefined;
|
1543
1586
|
}>>>;
|
1544
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1587
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1545
1588
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1546
1589
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1547
1590
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
@@ -1558,7 +1601,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1558
1601
|
fallback?: boolean | undefined;
|
1559
1602
|
subset?: boolean | undefined;
|
1560
1603
|
}>>>;
|
1561
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1604
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1562
1605
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1563
1606
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1564
1607
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
@@ -1575,13 +1618,14 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1575
1618
|
fallback?: boolean | undefined;
|
1576
1619
|
subset?: boolean | undefined;
|
1577
1620
|
}>>>;
|
1578
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1621
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1579
1622
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1580
1623
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1581
1624
|
}, z.ZodTypeAny, "passthrough">>>;
|
1582
1625
|
template: z.ZodObject<{
|
1583
1626
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
1584
1627
|
type: z.ZodString;
|
1628
|
+
icon: z.ZodOptional<z.ZodString>;
|
1585
1629
|
content: z.ZodOptional<z.ZodString>;
|
1586
1630
|
position: z.ZodObject<{
|
1587
1631
|
x: z.ZodNumber;
|
@@ -1600,6 +1644,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1600
1644
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1601
1645
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
1602
1646
|
type: z.ZodString;
|
1647
|
+
icon: z.ZodOptional<z.ZodString>;
|
1603
1648
|
content: z.ZodOptional<z.ZodString>;
|
1604
1649
|
position: z.ZodObject<{
|
1605
1650
|
x: z.ZodNumber;
|
@@ -1618,6 +1663,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1618
1663
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1619
1664
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
1620
1665
|
type: z.ZodString;
|
1666
|
+
icon: z.ZodOptional<z.ZodString>;
|
1621
1667
|
content: z.ZodOptional<z.ZodString>;
|
1622
1668
|
position: z.ZodObject<{
|
1623
1669
|
x: z.ZodNumber;
|
@@ -1652,6 +1698,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1652
1698
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
1653
1699
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
1654
1700
|
type: z.ZodString;
|
1701
|
+
icon: z.ZodOptional<z.ZodString>;
|
1655
1702
|
content: z.ZodOptional<z.ZodString>;
|
1656
1703
|
position: z.ZodObject<{
|
1657
1704
|
x: z.ZodNumber;
|
@@ -1670,6 +1717,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1670
1717
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1671
1718
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
1672
1719
|
type: z.ZodString;
|
1720
|
+
icon: z.ZodOptional<z.ZodString>;
|
1673
1721
|
content: z.ZodOptional<z.ZodString>;
|
1674
1722
|
position: z.ZodObject<{
|
1675
1723
|
x: z.ZodNumber;
|
@@ -1688,6 +1736,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1688
1736
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1689
1737
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
1690
1738
|
type: z.ZodString;
|
1739
|
+
icon: z.ZodOptional<z.ZodString>;
|
1691
1740
|
content: z.ZodOptional<z.ZodString>;
|
1692
1741
|
position: z.ZodObject<{
|
1693
1742
|
x: z.ZodNumber;
|
@@ -1722,6 +1771,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1722
1771
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
1723
1772
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
1724
1773
|
type: z.ZodString;
|
1774
|
+
icon: z.ZodOptional<z.ZodString>;
|
1725
1775
|
content: z.ZodOptional<z.ZodString>;
|
1726
1776
|
position: z.ZodObject<{
|
1727
1777
|
x: z.ZodNumber;
|
@@ -1740,6 +1790,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1740
1790
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1741
1791
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
1742
1792
|
type: z.ZodString;
|
1793
|
+
icon: z.ZodOptional<z.ZodString>;
|
1743
1794
|
content: z.ZodOptional<z.ZodString>;
|
1744
1795
|
position: z.ZodObject<{
|
1745
1796
|
x: z.ZodNumber;
|
@@ -1758,6 +1809,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1758
1809
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1759
1810
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
1760
1811
|
type: z.ZodString;
|
1812
|
+
icon: z.ZodOptional<z.ZodString>;
|
1761
1813
|
content: z.ZodOptional<z.ZodString>;
|
1762
1814
|
position: z.ZodObject<{
|
1763
1815
|
x: z.ZodNumber;
|
@@ -1809,6 +1861,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1809
1861
|
template: {
|
1810
1862
|
schemas: Record<string, z.objectOutputType<{
|
1811
1863
|
type: z.ZodString;
|
1864
|
+
icon: z.ZodOptional<z.ZodString>;
|
1812
1865
|
content: z.ZodOptional<z.ZodString>;
|
1813
1866
|
position: z.ZodObject<{
|
1814
1867
|
x: z.ZodNumber;
|
@@ -1855,7 +1908,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1855
1908
|
fallback?: boolean | undefined;
|
1856
1909
|
subset?: boolean | undefined;
|
1857
1910
|
}>>>;
|
1858
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1911
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1859
1912
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1860
1913
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1861
1914
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
@@ -1868,6 +1921,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1868
1921
|
template: {
|
1869
1922
|
schemas: Record<string, z.objectInputType<{
|
1870
1923
|
type: z.ZodString;
|
1924
|
+
icon: z.ZodOptional<z.ZodString>;
|
1871
1925
|
content: z.ZodOptional<z.ZodString>;
|
1872
1926
|
position: z.ZodObject<{
|
1873
1927
|
x: z.ZodNumber;
|
@@ -1914,7 +1968,7 @@ export declare const PreviewProps: z.ZodObject<{
|
|
1914
1968
|
fallback?: boolean | undefined;
|
1915
1969
|
subset?: boolean | undefined;
|
1916
1970
|
}>>>;
|
1917
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1971
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1918
1972
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1919
1973
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1920
1974
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
@@ -1939,7 +1993,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
1939
1993
|
fallback?: boolean | undefined;
|
1940
1994
|
subset?: boolean | undefined;
|
1941
1995
|
}>>>;
|
1942
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
1996
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1943
1997
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1944
1998
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1945
1999
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
@@ -1956,7 +2010,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
1956
2010
|
fallback?: boolean | undefined;
|
1957
2011
|
subset?: boolean | undefined;
|
1958
2012
|
}>>>;
|
1959
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
2013
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1960
2014
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1961
2015
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1962
2016
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
@@ -1973,13 +2027,14 @@ export declare const DesignerProps: z.ZodObject<{
|
|
1973
2027
|
fallback?: boolean | undefined;
|
1974
2028
|
subset?: boolean | undefined;
|
1975
2029
|
}>>>;
|
1976
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
2030
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
1977
2031
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
1978
2032
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
1979
2033
|
}, z.ZodTypeAny, "passthrough">>>;
|
1980
2034
|
template: z.ZodObject<{
|
1981
2035
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
1982
2036
|
type: z.ZodString;
|
2037
|
+
icon: z.ZodOptional<z.ZodString>;
|
1983
2038
|
content: z.ZodOptional<z.ZodString>;
|
1984
2039
|
position: z.ZodObject<{
|
1985
2040
|
x: z.ZodNumber;
|
@@ -1998,6 +2053,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
1998
2053
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
1999
2054
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
2000
2055
|
type: z.ZodString;
|
2056
|
+
icon: z.ZodOptional<z.ZodString>;
|
2001
2057
|
content: z.ZodOptional<z.ZodString>;
|
2002
2058
|
position: z.ZodObject<{
|
2003
2059
|
x: z.ZodNumber;
|
@@ -2016,6 +2072,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2016
2072
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
2017
2073
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
2018
2074
|
type: z.ZodString;
|
2075
|
+
icon: z.ZodOptional<z.ZodString>;
|
2019
2076
|
content: z.ZodOptional<z.ZodString>;
|
2020
2077
|
position: z.ZodObject<{
|
2021
2078
|
x: z.ZodNumber;
|
@@ -2050,6 +2107,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2050
2107
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
2051
2108
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
2052
2109
|
type: z.ZodString;
|
2110
|
+
icon: z.ZodOptional<z.ZodString>;
|
2053
2111
|
content: z.ZodOptional<z.ZodString>;
|
2054
2112
|
position: z.ZodObject<{
|
2055
2113
|
x: z.ZodNumber;
|
@@ -2068,6 +2126,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2068
2126
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
2069
2127
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
2070
2128
|
type: z.ZodString;
|
2129
|
+
icon: z.ZodOptional<z.ZodString>;
|
2071
2130
|
content: z.ZodOptional<z.ZodString>;
|
2072
2131
|
position: z.ZodObject<{
|
2073
2132
|
x: z.ZodNumber;
|
@@ -2086,6 +2145,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2086
2145
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
2087
2146
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
2088
2147
|
type: z.ZodString;
|
2148
|
+
icon: z.ZodOptional<z.ZodString>;
|
2089
2149
|
content: z.ZodOptional<z.ZodString>;
|
2090
2150
|
position: z.ZodObject<{
|
2091
2151
|
x: z.ZodNumber;
|
@@ -2120,6 +2180,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2120
2180
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
2121
2181
|
schemas: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
|
2122
2182
|
type: z.ZodString;
|
2183
|
+
icon: z.ZodOptional<z.ZodString>;
|
2123
2184
|
content: z.ZodOptional<z.ZodString>;
|
2124
2185
|
position: z.ZodObject<{
|
2125
2186
|
x: z.ZodNumber;
|
@@ -2138,6 +2199,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2138
2199
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
2139
2200
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
2140
2201
|
type: z.ZodString;
|
2202
|
+
icon: z.ZodOptional<z.ZodString>;
|
2141
2203
|
content: z.ZodOptional<z.ZodString>;
|
2142
2204
|
position: z.ZodObject<{
|
2143
2205
|
x: z.ZodNumber;
|
@@ -2156,6 +2218,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2156
2218
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
2157
2219
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
2158
2220
|
type: z.ZodString;
|
2221
|
+
icon: z.ZodOptional<z.ZodString>;
|
2159
2222
|
content: z.ZodOptional<z.ZodString>;
|
2160
2223
|
position: z.ZodObject<{
|
2161
2224
|
x: z.ZodNumber;
|
@@ -2206,6 +2269,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2206
2269
|
template: {
|
2207
2270
|
schemas: Record<string, z.objectOutputType<{
|
2208
2271
|
type: z.ZodString;
|
2272
|
+
icon: z.ZodOptional<z.ZodString>;
|
2209
2273
|
content: z.ZodOptional<z.ZodString>;
|
2210
2274
|
position: z.ZodObject<{
|
2211
2275
|
x: z.ZodNumber;
|
@@ -2251,7 +2315,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2251
2315
|
fallback?: boolean | undefined;
|
2252
2316
|
subset?: boolean | undefined;
|
2253
2317
|
}>>>;
|
2254
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
2318
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
2255
2319
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
2256
2320
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
2257
2321
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
@@ -2264,6 +2328,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2264
2328
|
template: {
|
2265
2329
|
schemas: Record<string, z.objectInputType<{
|
2266
2330
|
type: z.ZodString;
|
2331
|
+
icon: z.ZodOptional<z.ZodString>;
|
2267
2332
|
content: z.ZodOptional<z.ZodString>;
|
2268
2333
|
position: z.ZodObject<{
|
2269
2334
|
x: z.ZodNumber;
|
@@ -2309,7 +2374,7 @@ export declare const DesignerProps: z.ZodObject<{
|
|
2309
2374
|
fallback?: boolean | undefined;
|
2310
2375
|
subset?: boolean | undefined;
|
2311
2376
|
}>>>;
|
2312
|
-
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "
|
2377
|
+
lang: z.ZodOptional<z.ZodEnum<["en", "ja", "ar", "th", "pl", "it", "de", "es", "fr"]>>;
|
2313
2378
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
2314
2379
|
theme: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
2315
2380
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
2
2
|
import type { PDFPage, PDFDocument } from '@pdfme/pdf-lib';
|
3
3
|
import type { ThemeConfig, GlobalToken } from 'antd';
|
4
4
|
import type { WidgetProps as _PropPanelWidgetProps, Schema as _PropPanelSchema } from 'form-render';
|
5
|
-
import { Lang, Dict, Mode, Size, Schema, Font, SchemaForUI, BasePdf, BlankPdf, CommonOptions, Template, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from './schema.js';
|
5
|
+
import { Lang, Dict, Mode, Size, Schema, Font, SchemaForUI, BasePdf, BlankPdf, CommonOptions, Template, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ColorType } from './schema.js';
|
6
6
|
export type PropPanelSchema = _PropPanelSchema;
|
7
7
|
export type ChangeSchemas = (objs: {
|
8
8
|
key: string;
|
@@ -73,6 +73,7 @@ export type UIRenderProps<T extends Schema> = {
|
|
73
73
|
options: UIOptions;
|
74
74
|
theme: GlobalToken;
|
75
75
|
i18n: (key: keyof Dict | string) => string;
|
76
|
+
pdfJs: typeof import('pdfjs-dist/legacy/build/pdf.js');
|
76
77
|
_cache: Map<any, any>;
|
77
78
|
};
|
78
79
|
/**
|
@@ -144,6 +145,7 @@ export type SchemaForUI = z.infer<typeof SchemaForUI>;
|
|
144
145
|
* @property {boolean} [subset] - The default is true (use subset font). So if you don't want to use a subset font, please set it to false.
|
145
146
|
*/
|
146
147
|
export type Font = z.infer<typeof Font>;
|
148
|
+
export type ColorType = z.infer<typeof ColorType>;
|
147
149
|
export type BasePdf = z.infer<typeof BasePdf>;
|
148
150
|
export type BlankPdf = z.infer<typeof BlankPdf>;
|
149
151
|
export type Template = z.infer<typeof Template>;
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/helper.ts
CHANGED
@@ -53,6 +53,12 @@ export const pt2px = (pt: number): number => {
|
|
53
53
|
return pt * PT_TO_PX_RATIO;
|
54
54
|
};
|
55
55
|
|
56
|
+
export const px2mm = (px: number): number => {
|
57
|
+
// http://www.endmemo.com/sconvert/millimeterpixel.php
|
58
|
+
const ratio = 0.26458333333333;
|
59
|
+
return parseFloat(String(px)) * ratio;
|
60
|
+
};
|
61
|
+
|
56
62
|
const blob2Base64Pdf = (blob: Blob) => {
|
57
63
|
return new Promise<string>((resolve, reject) => {
|
58
64
|
const reader = new FileReader();
|
package/src/index.ts
CHANGED
@@ -22,6 +22,7 @@ import type {
|
|
22
22
|
Schema,
|
23
23
|
SchemaForUI,
|
24
24
|
Font,
|
25
|
+
ColorType,
|
25
26
|
BasePdf,
|
26
27
|
BlankPdf,
|
27
28
|
Template,
|
@@ -50,6 +51,7 @@ import {
|
|
50
51
|
mm2pt,
|
51
52
|
pt2mm,
|
52
53
|
pt2px,
|
54
|
+
px2mm,
|
53
55
|
isHexValid,
|
54
56
|
getInputFromTemplate,
|
55
57
|
isBlankPdf,
|
@@ -71,6 +73,7 @@ export {
|
|
71
73
|
mm2pt,
|
72
74
|
pt2mm,
|
73
75
|
pt2px,
|
76
|
+
px2mm,
|
74
77
|
isHexValid,
|
75
78
|
getInputFromTemplate,
|
76
79
|
isBlankPdf,
|
@@ -92,6 +95,7 @@ export type {
|
|
92
95
|
Schema,
|
93
96
|
SchemaForUI,
|
94
97
|
Font,
|
98
|
+
ColorType,
|
95
99
|
BasePdf,
|
96
100
|
BlankPdf,
|
97
101
|
Template,
|
package/src/schema.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
|
3
|
-
const langs = ['en', 'ja', 'ar', 'th', '
|
3
|
+
const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it', 'de', 'es', 'fr'] as const;
|
4
4
|
|
5
5
|
export const Lang = z.enum(langs);
|
6
6
|
export const Dict = z.object({
|
@@ -19,7 +19,6 @@ export const Dict = z.object({
|
|
19
19
|
notUniq: z.string(),
|
20
20
|
noKeyName: z.string(),
|
21
21
|
fieldsList: z.string(),
|
22
|
-
addNewField: z.string(),
|
23
22
|
editField: z.string(),
|
24
23
|
type: z.string(),
|
25
24
|
errorOccurred: z.string(),
|
@@ -69,11 +68,14 @@ export const Dict = z.object({
|
|
69
68
|
});
|
70
69
|
export const Mode = z.enum(['viewer', 'form', 'designer']);
|
71
70
|
|
71
|
+
export const ColorType = z.enum(['rgb', 'cmyk']).optional();
|
72
|
+
|
72
73
|
export const Size = z.object({ height: z.number(), width: z.number() });
|
73
74
|
|
74
75
|
export const Schema = z
|
75
76
|
.object({
|
76
77
|
type: z.string(),
|
78
|
+
icon: z.string().optional(),
|
77
79
|
content: z.string().optional(),
|
78
80
|
position: z.object({ x: z.number(), y: z.number() }),
|
79
81
|
width: z.number(),
|
@@ -129,6 +131,7 @@ const CommonProps = z.object({
|
|
129
131
|
// -------------------generate-------------------
|
130
132
|
|
131
133
|
export const GeneratorOptions = CommonOptions.extend({
|
134
|
+
colorType: ColorType,
|
132
135
|
author: z.string().optional(),
|
133
136
|
creationDate: z.date().optional(),
|
134
137
|
creator: z.string().optional(),
|
package/src/types.ts
CHANGED
@@ -20,6 +20,7 @@ import {
|
|
20
20
|
UIProps,
|
21
21
|
PreviewProps,
|
22
22
|
DesignerProps,
|
23
|
+
ColorType,
|
23
24
|
} from './schema.js';
|
24
25
|
|
25
26
|
export type PropPanelSchema = _PropPanelSchema;
|
@@ -85,6 +86,7 @@ export type UIRenderProps<T extends Schema> = {
|
|
85
86
|
options: UIOptions;
|
86
87
|
theme: GlobalToken;
|
87
88
|
i18n: (key: keyof Dict | string) => string;
|
89
|
+
pdfJs: typeof import('pdfjs-dist/legacy/build/pdf.js');
|
88
90
|
_cache: Map<any, any>;
|
89
91
|
};
|
90
92
|
|
@@ -162,6 +164,7 @@ export type SchemaForUI = z.infer<typeof SchemaForUI>;
|
|
162
164
|
* @property {boolean} [subset] - The default is true (use subset font). So if you don't want to use a subset font, please set it to false.
|
163
165
|
*/
|
164
166
|
export type Font = z.infer<typeof Font>;
|
167
|
+
export type ColorType = z.infer<typeof ColorType>;
|
165
168
|
export type BasePdf = z.infer<typeof BasePdf>;
|
166
169
|
export type BlankPdf = z.infer<typeof BlankPdf>;
|
167
170
|
export type Template = z.infer<typeof Template>;
|