@pdfme/common 0.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 +5 -0
- package/dist/cjs/__tests__/dynamicTemplate.test.js +275 -0
- package/dist/cjs/__tests__/dynamicTemplate.test.js.map +1 -0
- package/dist/cjs/__tests__/expression.test.js +474 -0
- package/dist/cjs/__tests__/expression.test.js.map +1 -0
- package/dist/cjs/__tests__/helper.test.js +647 -0
- package/dist/cjs/__tests__/helper.test.js.map +1 -0
- package/dist/cjs/__tests__/pluginRegistry.test.js +83 -0
- package/dist/cjs/__tests__/pluginRegistry.test.js.map +1 -0
- package/dist/cjs/src/constants.js +27 -0
- package/dist/cjs/src/constants.js.map +1 -0
- package/dist/cjs/src/dynamicTemplate.js +284 -0
- package/dist/cjs/src/dynamicTemplate.js.map +1 -0
- package/dist/cjs/src/expression.js +463 -0
- package/dist/cjs/src/expression.js.map +1 -0
- package/dist/cjs/src/helper.js +217 -0
- package/dist/cjs/src/helper.js.map +1 -0
- package/dist/cjs/src/index.js +42 -0
- package/dist/cjs/src/index.js.map +1 -0
- package/dist/cjs/src/pluginRegistry.js +33 -0
- package/dist/cjs/src/pluginRegistry.js.map +1 -0
- package/dist/cjs/src/schema.js +190 -0
- package/dist/cjs/src/schema.js.map +1 -0
- package/dist/cjs/src/types.js +3 -0
- package/dist/cjs/src/types.js.map +1 -0
- package/dist/cjs/src/version.js +5 -0
- package/dist/cjs/src/version.js.map +1 -0
- package/dist/esm/__tests__/dynamicTemplate.test.js +240 -0
- package/dist/esm/__tests__/dynamicTemplate.test.js.map +1 -0
- package/dist/esm/__tests__/expression.test.js +472 -0
- package/dist/esm/__tests__/expression.test.js.map +1 -0
- package/dist/esm/__tests__/helper.test.js +612 -0
- package/dist/esm/__tests__/helper.test.js.map +1 -0
- package/dist/esm/__tests__/pluginRegistry.test.js +81 -0
- package/dist/esm/__tests__/pluginRegistry.test.js.map +1 -0
- package/dist/esm/src/constants.js +24 -0
- package/dist/esm/src/constants.js.map +1 -0
- package/dist/esm/src/dynamicTemplate.js +280 -0
- package/dist/esm/src/dynamicTemplate.js.map +1 -0
- package/dist/esm/src/expression.js +426 -0
- package/dist/esm/src/expression.js.map +1 -0
- package/dist/esm/src/helper.js +193 -0
- package/dist/esm/src/helper.js.map +1 -0
- package/dist/esm/src/index.js +8 -0
- package/dist/esm/src/index.js.map +1 -0
- package/dist/esm/src/pluginRegistry.js +29 -0
- package/dist/esm/src/pluginRegistry.js.map +1 -0
- package/dist/esm/src/schema.js +187 -0
- package/dist/esm/src/schema.js.map +1 -0
- package/dist/esm/src/types.js +2 -0
- package/dist/esm/src/types.js.map +1 -0
- package/dist/esm/src/version.js +2 -0
- package/dist/esm/src/version.js.map +1 -0
- package/dist/node/__tests__/dynamicTemplate.test.js +275 -0
- package/dist/node/__tests__/dynamicTemplate.test.js.map +1 -0
- package/dist/node/__tests__/expression.test.js +474 -0
- package/dist/node/__tests__/expression.test.js.map +1 -0
- package/dist/node/__tests__/helper.test.js +647 -0
- package/dist/node/__tests__/helper.test.js.map +1 -0
- package/dist/node/__tests__/pluginRegistry.test.js +83 -0
- package/dist/node/__tests__/pluginRegistry.test.js.map +1 -0
- package/dist/node/src/constants.js +27 -0
- package/dist/node/src/constants.js.map +1 -0
- package/dist/node/src/dynamicTemplate.js +284 -0
- package/dist/node/src/dynamicTemplate.js.map +1 -0
- package/dist/node/src/expression.js +463 -0
- package/dist/node/src/expression.js.map +1 -0
- package/dist/node/src/helper.js +217 -0
- package/dist/node/src/helper.js.map +1 -0
- package/dist/node/src/index.js +42 -0
- package/dist/node/src/index.js.map +1 -0
- package/dist/node/src/pluginRegistry.js +33 -0
- package/dist/node/src/pluginRegistry.js.map +1 -0
- package/dist/node/src/schema.js +190 -0
- package/dist/node/src/schema.js.map +1 -0
- package/dist/node/src/types.js +3 -0
- package/dist/node/src/types.js.map +1 -0
- package/dist/node/src/version.js +5 -0
- package/dist/node/src/version.js.map +1 -0
- package/dist/types/__tests__/dynamicTemplate.test.d.ts +1 -0
- package/dist/types/__tests__/expression.test.d.ts +1 -0
- package/dist/types/__tests__/helper.test.d.ts +1 -0
- package/dist/types/__tests__/pluginRegistry.test.d.ts +1 -0
- package/dist/types/src/constants.d.ts +20 -0
- package/dist/types/src/dynamicTemplate.d.ts +15 -0
- package/dist/types/src/expression.d.ts +6 -0
- package/dist/types/src/helper.d.ts +35 -0
- package/dist/types/src/index.d.ts +9 -0
- package/dist/types/src/pluginRegistry.d.ts +5 -0
- package/dist/types/src/schema.d.ts +820 -0
- package/dist/types/src/types.d.ts +181 -0
- package/dist/types/src/version.d.ts +1 -0
- package/eslint.config.mjs +22 -0
- package/package.json +84 -0
- package/set-version.js +31 -0
- package/src/constants.ts +30 -0
- package/src/dynamicTemplate.ts +349 -0
- package/src/expression.ts +460 -0
- package/src/helper.ts +284 -0
- package/src/index.ts +136 -0
- package/src/pluginRegistry.ts +30 -0
- package/src/schema.ts +223 -0
- package/src/types.ts +198 -0
- package/src/version.ts +1 -0
- package/tsconfig.cjs.json +10 -0
- package/tsconfig.esm.json +11 -0
- package/tsconfig.json +6 -0
- package/tsconfig.node.json +11 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkGenerateProps = exports.checkTemplate = exports.checkUIProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIOptions = exports.checkInputs = exports.checkPlugins = exports.checkFont = exports.b64toUint8Array = exports.isBlankPdf = exports.getB64BasePdf = exports.getInputFromTemplate = exports.migrateTemplate = exports.isHexValid = exports.px2mm = exports.pt2px = exports.pt2mm = exports.mm2pt = exports.getDefaultFont = exports.getFallbackFontName = exports.cloneDeep = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const buffer_1 = require("buffer");
|
|
6
|
+
const schema_js_1 = require("./schema.js");
|
|
7
|
+
const constants_js_1 = require("./constants.js");
|
|
8
|
+
exports.cloneDeep = structuredClone;
|
|
9
|
+
const uniq = (array) => Array.from(new Set(array));
|
|
10
|
+
const getFallbackFontName = (font) => {
|
|
11
|
+
const initial = '';
|
|
12
|
+
const fallbackFontName = Object.entries(font).reduce((acc, cur) => {
|
|
13
|
+
const [fontName, fontValue] = cur;
|
|
14
|
+
return !acc && fontValue.fallback ? fontName : acc;
|
|
15
|
+
}, initial);
|
|
16
|
+
if (fallbackFontName === initial) {
|
|
17
|
+
throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.`);
|
|
18
|
+
}
|
|
19
|
+
return fallbackFontName;
|
|
20
|
+
};
|
|
21
|
+
exports.getFallbackFontName = getFallbackFontName;
|
|
22
|
+
const getDefaultFont = () => ({
|
|
23
|
+
[constants_js_1.DEFAULT_FONT_NAME]: { data: (0, exports.b64toUint8Array)(constants_js_1.DEFAULT_FONT_VALUE), fallback: true },
|
|
24
|
+
});
|
|
25
|
+
exports.getDefaultFont = getDefaultFont;
|
|
26
|
+
const mm2pt = (mm) => {
|
|
27
|
+
return parseFloat(String(mm)) * constants_js_1.MM_TO_PT_RATIO;
|
|
28
|
+
};
|
|
29
|
+
exports.mm2pt = mm2pt;
|
|
30
|
+
const pt2mm = (pt) => {
|
|
31
|
+
return pt * constants_js_1.PT_TO_MM_RATIO;
|
|
32
|
+
};
|
|
33
|
+
exports.pt2mm = pt2mm;
|
|
34
|
+
const pt2px = (pt) => {
|
|
35
|
+
return pt * constants_js_1.PT_TO_PX_RATIO;
|
|
36
|
+
};
|
|
37
|
+
exports.pt2px = pt2px;
|
|
38
|
+
const px2mm = (px) => {
|
|
39
|
+
// http://www.endmemo.com/sconvert/millimeterpixel.php
|
|
40
|
+
const ratio = 0.26458333333333;
|
|
41
|
+
return parseFloat(String(px)) * ratio;
|
|
42
|
+
};
|
|
43
|
+
exports.px2mm = px2mm;
|
|
44
|
+
const blob2Base64Pdf = (blob) => {
|
|
45
|
+
return new Promise((resolve, reject) => {
|
|
46
|
+
const reader = new FileReader();
|
|
47
|
+
reader.onloadend = () => {
|
|
48
|
+
if (reader.result.startsWith('data:application/pdf;')) {
|
|
49
|
+
resolve(reader.result);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
reject(Error('[@pdfme/common] template.basePdf must be pdf data.'));
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
reader.readAsDataURL(blob);
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
const isHexValid = (hex) => {
|
|
59
|
+
return /^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/i.test(hex);
|
|
60
|
+
};
|
|
61
|
+
exports.isHexValid = isHexValid;
|
|
62
|
+
/**
|
|
63
|
+
* Migrate from legacy keyed object format to array format
|
|
64
|
+
* @param template Template
|
|
65
|
+
*/
|
|
66
|
+
const migrateTemplate = (template) => {
|
|
67
|
+
if (!template.schemas) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (Array.isArray(template.schemas) &&
|
|
71
|
+
template.schemas.length > 0 &&
|
|
72
|
+
!Array.isArray(template.schemas[0])) {
|
|
73
|
+
template.schemas = template.schemas.map((page) => Object.entries(page).map(([key, value]) => ({
|
|
74
|
+
...value,
|
|
75
|
+
name: key,
|
|
76
|
+
})));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
exports.migrateTemplate = migrateTemplate;
|
|
80
|
+
const getInputFromTemplate = (template) => {
|
|
81
|
+
(0, exports.migrateTemplate)(template);
|
|
82
|
+
const input = {};
|
|
83
|
+
template.schemas.forEach((page) => {
|
|
84
|
+
page.forEach((schema) => {
|
|
85
|
+
if (!schema.readOnly) {
|
|
86
|
+
input[schema.name] = schema.content || '';
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
return [input];
|
|
91
|
+
};
|
|
92
|
+
exports.getInputFromTemplate = getInputFromTemplate;
|
|
93
|
+
const getB64BasePdf = async (customPdf) => {
|
|
94
|
+
if (typeof customPdf === 'string' &&
|
|
95
|
+
!customPdf.startsWith('data:application/pdf;') &&
|
|
96
|
+
typeof window !== 'undefined') {
|
|
97
|
+
const response = await fetch(customPdf);
|
|
98
|
+
const blob = await response.blob();
|
|
99
|
+
return blob2Base64Pdf(blob);
|
|
100
|
+
}
|
|
101
|
+
if (typeof customPdf === 'string') {
|
|
102
|
+
return customPdf;
|
|
103
|
+
}
|
|
104
|
+
const uint8Array = customPdf instanceof Uint8Array ? customPdf : new Uint8Array(customPdf);
|
|
105
|
+
return 'data:application/pdf;base64,' + buffer_1.Buffer.from(uint8Array).toString('base64');
|
|
106
|
+
};
|
|
107
|
+
exports.getB64BasePdf = getB64BasePdf;
|
|
108
|
+
const isBlankPdf = (basePdf) => schema_js_1.BlankPdf.safeParse(basePdf).success;
|
|
109
|
+
exports.isBlankPdf = isBlankPdf;
|
|
110
|
+
const getByteString = (base64) => buffer_1.Buffer.from(base64, 'base64').toString('binary');
|
|
111
|
+
const b64toUint8Array = (base64) => {
|
|
112
|
+
const data = base64.split(';base64,')[1] ? base64.split(';base64,')[1] : base64;
|
|
113
|
+
const byteString = getByteString(data);
|
|
114
|
+
const unit8arr = new Uint8Array(byteString.length);
|
|
115
|
+
for (let i = 0; i < byteString.length; i += 1) {
|
|
116
|
+
unit8arr[i] = byteString.charCodeAt(i);
|
|
117
|
+
}
|
|
118
|
+
return unit8arr;
|
|
119
|
+
};
|
|
120
|
+
exports.b64toUint8Array = b64toUint8Array;
|
|
121
|
+
const getFontNamesInSchemas = (schemas) => uniq(schemas
|
|
122
|
+
.map((p) => p.map((v) => v.fontName ?? ''))
|
|
123
|
+
.reduce((acc, cur) => acc.concat(cur), [])
|
|
124
|
+
.filter(Boolean));
|
|
125
|
+
const checkFont = (arg) => {
|
|
126
|
+
const { font, template: { schemas }, } = arg;
|
|
127
|
+
const fontValues = Object.values(font);
|
|
128
|
+
const fallbackFontNum = fontValues.reduce((acc, cur) => (cur.fallback ? acc + 1 : acc), 0);
|
|
129
|
+
if (fallbackFontNum === 0) {
|
|
130
|
+
throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.
|
|
131
|
+
Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);
|
|
132
|
+
}
|
|
133
|
+
if (fallbackFontNum > 1) {
|
|
134
|
+
throw Error(`[@pdfme/common] ${fallbackFontNum} fallback flags found in font. true fallback flag must be only one.
|
|
135
|
+
Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);
|
|
136
|
+
}
|
|
137
|
+
const fontNamesInSchemas = getFontNamesInSchemas(schemas);
|
|
138
|
+
const fontNames = Object.keys(font);
|
|
139
|
+
if (fontNamesInSchemas.some((f) => !fontNames.includes(f))) {
|
|
140
|
+
throw Error(`[@pdfme/common] ${fontNamesInSchemas
|
|
141
|
+
.filter((f) => !fontNames.includes(f))
|
|
142
|
+
.join()} of template.schemas is not found in font.
|
|
143
|
+
Check this document: https://pdfme.com/docs/custom-fonts`);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
exports.checkFont = checkFont;
|
|
147
|
+
const checkPlugins = (arg) => {
|
|
148
|
+
const { plugins, template: { schemas }, } = arg;
|
|
149
|
+
const allSchemaTypes = uniq(schemas.map((p) => p.map((v) => v.type)).flat());
|
|
150
|
+
const pluginsSchemaTypes = Object.values(plugins).map((p) => p ? p.propPanel.defaultSchema.type : undefined);
|
|
151
|
+
if (allSchemaTypes.some((s) => !pluginsSchemaTypes.includes(s))) {
|
|
152
|
+
throw Error(`[@pdfme/common] ${allSchemaTypes
|
|
153
|
+
.filter((s) => !pluginsSchemaTypes.includes(s))
|
|
154
|
+
.join()} of template.schemas is not found in plugins.`);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
exports.checkPlugins = checkPlugins;
|
|
158
|
+
const checkProps = (data, zodSchema) => {
|
|
159
|
+
try {
|
|
160
|
+
zodSchema.parse(data);
|
|
161
|
+
}
|
|
162
|
+
catch (e) {
|
|
163
|
+
if (e instanceof zod_1.z.ZodError) {
|
|
164
|
+
const messages = e.issues.map((issue) => `ERROR POSITION: ${issue.path.join('.')}
|
|
165
|
+
ERROR MESSAGE: ${issue.message}
|
|
166
|
+
--------------------------`);
|
|
167
|
+
throw Error(`[@pdfme/common] Invalid argument:
|
|
168
|
+
--------------------------
|
|
169
|
+
${messages.join('\n')}`);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
throw Error(`[@pdfme/common] Unexpected parsing error: ${e instanceof Error ? e.message : String(e)}`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// Check fonts if template and options exist
|
|
176
|
+
if (data && typeof data === 'object' && 'template' in data && 'options' in data) {
|
|
177
|
+
const { template, options } = data;
|
|
178
|
+
if (options && options.font) {
|
|
179
|
+
(0, exports.checkFont)({ font: options.font, template });
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
// Check plugins if template and plugins exist
|
|
183
|
+
if (data && typeof data === 'object' && 'template' in data && 'plugins' in data) {
|
|
184
|
+
const { template, plugins } = data;
|
|
185
|
+
if (plugins) {
|
|
186
|
+
(0, exports.checkPlugins)({ plugins, template });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
const checkInputs = (data) => checkProps(data, schema_js_1.Inputs);
|
|
191
|
+
exports.checkInputs = checkInputs;
|
|
192
|
+
const checkUIOptions = (data) => checkProps(data, schema_js_1.UIOptions);
|
|
193
|
+
exports.checkUIOptions = checkUIOptions;
|
|
194
|
+
const checkPreviewProps = (data) => checkProps(data, schema_js_1.PreviewProps);
|
|
195
|
+
exports.checkPreviewProps = checkPreviewProps;
|
|
196
|
+
const checkDesignerProps = (data) => checkProps(data, schema_js_1.DesignerProps);
|
|
197
|
+
exports.checkDesignerProps = checkDesignerProps;
|
|
198
|
+
const checkUIProps = (data) => {
|
|
199
|
+
if (typeof data === 'object' && data !== null && 'template' in data) {
|
|
200
|
+
(0, exports.migrateTemplate)(data.template);
|
|
201
|
+
}
|
|
202
|
+
checkProps(data, schema_js_1.UIProps);
|
|
203
|
+
};
|
|
204
|
+
exports.checkUIProps = checkUIProps;
|
|
205
|
+
const checkTemplate = (template) => {
|
|
206
|
+
(0, exports.migrateTemplate)(template);
|
|
207
|
+
checkProps(template, schema_js_1.Template);
|
|
208
|
+
};
|
|
209
|
+
exports.checkTemplate = checkTemplate;
|
|
210
|
+
const checkGenerateProps = (data) => {
|
|
211
|
+
if (typeof data === 'object' && data !== null && 'template' in data) {
|
|
212
|
+
(0, exports.migrateTemplate)(data.template);
|
|
213
|
+
}
|
|
214
|
+
checkProps(data, schema_js_1.GenerateProps);
|
|
215
|
+
};
|
|
216
|
+
exports.checkGenerateProps = checkGenerateProps;
|
|
217
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/helper.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mCAAgC;AAWhC,2CASqB;AACrB,iDAMwB;AAEX,QAAA,SAAS,GAAG,eAAe,CAAC;AAEzC,MAAM,IAAI,GAAG,CAAI,KAAe,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAEzD,MAAM,mBAAmB,GAAG,CAAC,IAAU,EAAE,EAAE;IAChD,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAChE,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,GAAkG,CAAC;QAEjI,OAAO,CAAC,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;IACrD,CAAC,EAAE,OAAO,CAAC,CAAC;IACZ,IAAI,gBAAgB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,UAAU,CAAC,IAAI,EAAE,wBAAkB,CAAC,CAAC;AAA5E,QAAA,iBAAiB,qBAA2D;AAClF,MAAM,kBAAkB,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,yBAAmB,CAAC,CAAC;AAA9E,QAAA,kBAAkB,sBAA4D;AACpF,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,EAAE;IAC5C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACpE,IAAA,uBAAe,EAAC,IAAI,CAAC,QAAoB,CAAC,CAAC;IAC7C,CAAC;IACD,UAAU,CAAC,IAAI,EAAE,mBAAa,CAAC,CAAC;AAClC,CAAC,CAAC;AALW,QAAA,YAAY,gBAKvB;AACK,MAAM,aAAa,GAAG,CAAC,QAAiB,EAAE,EAAE;IACjD,IAAA,uBAAe,EAAC,QAAoB,CAAC,CAAC;IACtC,UAAU,CAAC,QAAQ,EAAE,oBAAc,CAAC,CAAC;AACvC,CAAC,CAAC;AAHW,QAAA,aAAa,iBAGxB;AACK,MAAM,kBAAkB,GAAG,CAAC,IAAa,EAAE,EAAE;IAClD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACpE,IAAA,uBAAe,EAAC,IAAI,CAAC,QAAoB,CAAC,CAAC;IAC7C,CAAC;IACD,UAAU,CAAC,IAAI,EAAE,yBAAmB,CAAC,CAAC;AACxC,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pluginRegistry = 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
|
+
const version_js_1 = require("./version.js");
|
|
5
|
+
Object.defineProperty(exports, "PDFME_VERSION", { enumerable: true, get: function () { return version_js_1.PDFME_VERSION; } });
|
|
6
|
+
const constants_js_1 = require("./constants.js");
|
|
7
|
+
Object.defineProperty(exports, "MM_TO_PT_RATIO", { enumerable: true, get: function () { return constants_js_1.MM_TO_PT_RATIO; } });
|
|
8
|
+
Object.defineProperty(exports, "PT_TO_MM_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_MM_RATIO; } });
|
|
9
|
+
Object.defineProperty(exports, "PT_TO_PX_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_PX_RATIO; } });
|
|
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; } });
|
|
13
|
+
Object.defineProperty(exports, "ZOOM", { enumerable: true, get: function () { return constants_js_1.ZOOM; } });
|
|
14
|
+
Object.defineProperty(exports, "DEFAULT_FONT_NAME", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_NAME; } });
|
|
15
|
+
const helper_js_1 = require("./helper.js");
|
|
16
|
+
Object.defineProperty(exports, "cloneDeep", { enumerable: true, get: function () { return helper_js_1.cloneDeep; } });
|
|
17
|
+
Object.defineProperty(exports, "getFallbackFontName", { enumerable: true, get: function () { return helper_js_1.getFallbackFontName; } });
|
|
18
|
+
Object.defineProperty(exports, "getDefaultFont", { enumerable: true, get: function () { return helper_js_1.getDefaultFont; } });
|
|
19
|
+
Object.defineProperty(exports, "getB64BasePdf", { enumerable: true, get: function () { return helper_js_1.getB64BasePdf; } });
|
|
20
|
+
Object.defineProperty(exports, "b64toUint8Array", { enumerable: true, get: function () { return helper_js_1.b64toUint8Array; } });
|
|
21
|
+
Object.defineProperty(exports, "checkFont", { enumerable: true, get: function () { return helper_js_1.checkFont; } });
|
|
22
|
+
Object.defineProperty(exports, "checkInputs", { enumerable: true, get: function () { return helper_js_1.checkInputs; } });
|
|
23
|
+
Object.defineProperty(exports, "checkUIOptions", { enumerable: true, get: function () { return helper_js_1.checkUIOptions; } });
|
|
24
|
+
Object.defineProperty(exports, "checkTemplate", { enumerable: true, get: function () { return helper_js_1.checkTemplate; } });
|
|
25
|
+
Object.defineProperty(exports, "checkUIProps", { enumerable: true, get: function () { return helper_js_1.checkUIProps; } });
|
|
26
|
+
Object.defineProperty(exports, "checkPreviewProps", { enumerable: true, get: function () { return helper_js_1.checkPreviewProps; } });
|
|
27
|
+
Object.defineProperty(exports, "checkDesignerProps", { enumerable: true, get: function () { return helper_js_1.checkDesignerProps; } });
|
|
28
|
+
Object.defineProperty(exports, "checkGenerateProps", { enumerable: true, get: function () { return helper_js_1.checkGenerateProps; } });
|
|
29
|
+
Object.defineProperty(exports, "mm2pt", { enumerable: true, get: function () { return helper_js_1.mm2pt; } });
|
|
30
|
+
Object.defineProperty(exports, "pt2mm", { enumerable: true, get: function () { return helper_js_1.pt2mm; } });
|
|
31
|
+
Object.defineProperty(exports, "pt2px", { enumerable: true, get: function () { return helper_js_1.pt2px; } });
|
|
32
|
+
Object.defineProperty(exports, "px2mm", { enumerable: true, get: function () { return helper_js_1.px2mm; } });
|
|
33
|
+
Object.defineProperty(exports, "isHexValid", { enumerable: true, get: function () { return helper_js_1.isHexValid; } });
|
|
34
|
+
Object.defineProperty(exports, "getInputFromTemplate", { enumerable: true, get: function () { return helper_js_1.getInputFromTemplate; } });
|
|
35
|
+
Object.defineProperty(exports, "isBlankPdf", { enumerable: true, get: function () { return helper_js_1.isBlankPdf; } });
|
|
36
|
+
const dynamicTemplate_js_1 = require("./dynamicTemplate.js");
|
|
37
|
+
Object.defineProperty(exports, "getDynamicTemplate", { enumerable: true, get: function () { return dynamicTemplate_js_1.getDynamicTemplate; } });
|
|
38
|
+
const expression_js_1 = require("./expression.js");
|
|
39
|
+
Object.defineProperty(exports, "replacePlaceholders", { enumerable: true, get: function () { return expression_js_1.replacePlaceholders; } });
|
|
40
|
+
const pluginRegistry_js_1 = require("./pluginRegistry.js");
|
|
41
|
+
Object.defineProperty(exports, "pluginRegistry", { enumerable: true, get: function () { return pluginRegistry_js_1.pluginRegistry; } });
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAsE3C,8FAtEO,0BAAa,OAsEP;AArEf,iDASwB;AA6DtB,+FArEA,6BAAc,OAqEA;AACd,+FArEA,6BAAc,OAqEA;AACd,+FArEA,6BAAc,OAqEA;AACd,0FArEA,wBAAS,OAqEA;AACT,6FArEA,2BAAY,OAqEA;AACZ,8FArEA,4BAAa,OAqEA;AACb,qFArEA,mBAAI,OAqEA;AACJ,kGArEA,gCAAiB,OAqEA;AAnCnB,2CAqBqB;AAenB,0FAnCA,qBAAS,OAmCA;AACT,oGAnCA,+BAAmB,OAmCA;AACnB,+FAnCA,0BAAc,OAmCA;AACd,8FAnCA,yBAAa,OAmCA;AACb,gGAnCA,2BAAe,OAmCA;AAUf,0FA5CA,qBAAS,OA4CA;AACT,4FA5CA,uBAAW,OA4CA;AACX,+FA5CA,0BAAc,OA4CA;AACd,8FA5CA,yBAAa,OA4CA;AACb,6FA5CA,wBAAY,OA4CA;AACZ,kGA5CA,6BAAiB,OA4CA;AACjB,mGA5CA,8BAAkB,OA4CA;AAClB,mGA5CA,8BAAkB,OA4CA;AAhBlB,sFA3BA,iBAAK,OA2BA;AACL,sFA3BA,iBAAK,OA2BA;AACL,sFA3BA,iBAAK,OA2BA;AACL,sFA3BA,iBAAK,OA2BA;AACL,2FA3BA,sBAAU,OA2BA;AACV,qGA3BA,gCAAoB,OA2BA;AACpB,2FA3BA,sBAAU,OA2BA;AAzBZ,6DAA0D;AA0BxD,mGA1BO,uCAAkB,OA0BP;AAzBpB,mDAAsD;AA0BpD,oGA1BO,mCAAmB,OA0BP;AAzBrB,2DAAqD;AAkCnD,+FAlCO,kCAAc,OAkCP"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pluginRegistry = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Wraps plugins collection with utility methods
|
|
6
|
+
*/
|
|
7
|
+
const pluginRegistry = (plugins) => {
|
|
8
|
+
return {
|
|
9
|
+
plugins: plugins,
|
|
10
|
+
entries: () => Object.entries(plugins),
|
|
11
|
+
values: () => Object.values(plugins),
|
|
12
|
+
exists: () => Object.values(plugins).length > 0,
|
|
13
|
+
findWithLabelByType(type) {
|
|
14
|
+
for (const [label, plugin] of Object.entries(this.plugins)) {
|
|
15
|
+
if (!plugin || typeof plugin !== 'object')
|
|
16
|
+
continue;
|
|
17
|
+
if (!plugin.propPanel || typeof plugin.propPanel !== 'object')
|
|
18
|
+
continue;
|
|
19
|
+
const defaultSchema = plugin.propPanel.defaultSchema;
|
|
20
|
+
if (defaultSchema && 'type' in defaultSchema && defaultSchema.type === type) {
|
|
21
|
+
return [label, plugin];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return ['', undefined];
|
|
25
|
+
},
|
|
26
|
+
findByType(type) {
|
|
27
|
+
const [, plugin] = this.findWithLabelByType(type);
|
|
28
|
+
return plugin;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exports.pluginRegistry = pluginRegistry;
|
|
33
|
+
//# sourceMappingURL=pluginRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginRegistry.js","sourceRoot":"","sources":["../../../src/pluginRegistry.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACI,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAkB,EAAE;IACjE,OAAO;QACL,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,GAAuB,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;QAC1D,MAAM,EAAE,GAAa,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;QAC9C,MAAM,EAAE,GAAY,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC;QACxD,mBAAmB,CAAC,IAAY;YAC9B,KAAK,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAuB,EAAE,CAAC;gBACjF,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;oBAAE,SAAS;gBACpD,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ;oBAAE,SAAS;gBAExE,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,aAAwC,CAAC;gBAEhF,IAAI,aAAa,IAAI,MAAM,IAAI,aAAa,IAAI,aAAa,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;oBAC5E,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gBACzB,CAAC;YACH,CAAC;YACD,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QACzB,CAAC;QACD,UAAU,CAAC,IAAY;YACrB,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;YAClD,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,cAAc,kBAwBzB"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DesignerProps = exports.PreviewProps = exports.UIProps = exports.UIOptions = exports.GenerateProps = exports.GeneratorOptions = exports.CommonOptions = exports.Plugin = exports.Font = exports.Inputs = exports.Template = exports.SchemaPageArray = exports.LegacySchemaPageArray = exports.BasePdf = exports.CustomPdf = exports.BlankPdf = exports.SchemaForUI = exports.Schema = exports.Size = exports.ColorType = exports.Mode = exports.Dict = exports.Lang = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const langs = ['en', 'zh', 'ja', 'ko', 'ar', 'th', 'pl', 'it', 'de', 'es', 'fr'];
|
|
6
|
+
exports.Lang = zod_1.z.enum(langs);
|
|
7
|
+
exports.Dict = zod_1.z.object({
|
|
8
|
+
// -----------------used in ui-----------------
|
|
9
|
+
cancel: zod_1.z.string(),
|
|
10
|
+
close: zod_1.z.string(),
|
|
11
|
+
set: zod_1.z.string(),
|
|
12
|
+
clear: zod_1.z.string(),
|
|
13
|
+
field: zod_1.z.string(),
|
|
14
|
+
fieldName: zod_1.z.string(),
|
|
15
|
+
align: zod_1.z.string(),
|
|
16
|
+
width: zod_1.z.string(),
|
|
17
|
+
opacity: zod_1.z.string(),
|
|
18
|
+
height: zod_1.z.string(),
|
|
19
|
+
rotate: zod_1.z.string(),
|
|
20
|
+
edit: zod_1.z.string(),
|
|
21
|
+
required: zod_1.z.string(),
|
|
22
|
+
editable: zod_1.z.string(),
|
|
23
|
+
plsInputName: zod_1.z.string(),
|
|
24
|
+
fieldMustUniq: zod_1.z.string(),
|
|
25
|
+
notUniq: zod_1.z.string(),
|
|
26
|
+
noKeyName: zod_1.z.string(),
|
|
27
|
+
fieldsList: zod_1.z.string(),
|
|
28
|
+
editField: zod_1.z.string(),
|
|
29
|
+
type: zod_1.z.string(),
|
|
30
|
+
errorOccurred: zod_1.z.string(),
|
|
31
|
+
errorBulkUpdateFieldName: zod_1.z.string(),
|
|
32
|
+
commitBulkUpdateFieldName: zod_1.z.string(),
|
|
33
|
+
bulkUpdateFieldName: zod_1.z.string(),
|
|
34
|
+
addPageAfter: zod_1.z.string(),
|
|
35
|
+
removePage: zod_1.z.string(),
|
|
36
|
+
removePageConfirm: zod_1.z.string(),
|
|
37
|
+
// --------------------validation-------------------
|
|
38
|
+
'validation.uniqueName': zod_1.z.string(),
|
|
39
|
+
'validation.hexColor': zod_1.z.string(),
|
|
40
|
+
'validation.dateTimeFormat': zod_1.z.string(),
|
|
41
|
+
'validation.outOfBounds': zod_1.z.string(),
|
|
42
|
+
// -----------------used in schemas-----------------
|
|
43
|
+
'schemas.color': zod_1.z.string(),
|
|
44
|
+
'schemas.borderWidth': zod_1.z.string(),
|
|
45
|
+
'schemas.borderColor': zod_1.z.string(),
|
|
46
|
+
'schemas.backgroundColor': zod_1.z.string(),
|
|
47
|
+
'schemas.textColor': zod_1.z.string(),
|
|
48
|
+
'schemas.bgColor': zod_1.z.string(),
|
|
49
|
+
'schemas.horizontal': zod_1.z.string(),
|
|
50
|
+
'schemas.vertical': zod_1.z.string(),
|
|
51
|
+
'schemas.left': zod_1.z.string(),
|
|
52
|
+
'schemas.center': zod_1.z.string(),
|
|
53
|
+
'schemas.right': zod_1.z.string(),
|
|
54
|
+
'schemas.top': zod_1.z.string(),
|
|
55
|
+
'schemas.middle': zod_1.z.string(),
|
|
56
|
+
'schemas.bottom': zod_1.z.string(),
|
|
57
|
+
'schemas.padding': zod_1.z.string(),
|
|
58
|
+
'schemas.text.fontName': zod_1.z.string(),
|
|
59
|
+
'schemas.text.size': zod_1.z.string(),
|
|
60
|
+
'schemas.text.spacing': zod_1.z.string(),
|
|
61
|
+
'schemas.text.textAlign': zod_1.z.string(),
|
|
62
|
+
'schemas.text.verticalAlign': zod_1.z.string(),
|
|
63
|
+
'schemas.text.lineHeight': zod_1.z.string(),
|
|
64
|
+
'schemas.text.min': zod_1.z.string(),
|
|
65
|
+
'schemas.text.max': zod_1.z.string(),
|
|
66
|
+
'schemas.text.fit': zod_1.z.string(),
|
|
67
|
+
'schemas.text.dynamicFontSize': zod_1.z.string(),
|
|
68
|
+
'schemas.text.format': zod_1.z.string(),
|
|
69
|
+
'schemas.radius': zod_1.z.string(),
|
|
70
|
+
'schemas.mvt.typingInstructions': zod_1.z.string(),
|
|
71
|
+
'schemas.mvt.sampleField': zod_1.z.string(),
|
|
72
|
+
'schemas.mvt.variablesSampleData': zod_1.z.string(),
|
|
73
|
+
'schemas.barcodes.barColor': zod_1.z.string(),
|
|
74
|
+
'schemas.barcodes.includetext': zod_1.z.string(),
|
|
75
|
+
'schemas.table.alternateBackgroundColor': zod_1.z.string(),
|
|
76
|
+
'schemas.table.tableStyle': zod_1.z.string(),
|
|
77
|
+
'schemas.table.showHead': zod_1.z.string(),
|
|
78
|
+
'schemas.table.repeatHead': zod_1.z.string(),
|
|
79
|
+
'schemas.table.headStyle': zod_1.z.string(),
|
|
80
|
+
'schemas.table.bodyStyle': zod_1.z.string(),
|
|
81
|
+
'schemas.table.columnStyle': zod_1.z.string(),
|
|
82
|
+
'schemas.date.format': zod_1.z.string(),
|
|
83
|
+
'schemas.date.locale': zod_1.z.string(),
|
|
84
|
+
'schemas.select.options': zod_1.z.string(),
|
|
85
|
+
'schemas.select.optionPlaceholder': zod_1.z.string(),
|
|
86
|
+
'schemas.radioGroup.groupName': zod_1.z.string(),
|
|
87
|
+
});
|
|
88
|
+
exports.Mode = zod_1.z.enum(['viewer', 'form', 'designer']);
|
|
89
|
+
exports.ColorType = zod_1.z.enum(['rgb', 'cmyk']).optional();
|
|
90
|
+
exports.Size = zod_1.z.object({ height: zod_1.z.number(), width: zod_1.z.number() });
|
|
91
|
+
exports.Schema = zod_1.z
|
|
92
|
+
.object({
|
|
93
|
+
name: zod_1.z.string(),
|
|
94
|
+
type: zod_1.z.string(),
|
|
95
|
+
content: zod_1.z.string().optional(),
|
|
96
|
+
position: zod_1.z.object({ x: zod_1.z.number(), y: zod_1.z.number() }),
|
|
97
|
+
width: zod_1.z.number(),
|
|
98
|
+
height: zod_1.z.number(),
|
|
99
|
+
rotate: zod_1.z.number().optional(),
|
|
100
|
+
opacity: zod_1.z.number().optional(),
|
|
101
|
+
readOnly: zod_1.z.boolean().optional(),
|
|
102
|
+
required: zod_1.z.boolean().optional(),
|
|
103
|
+
__bodyRange: zod_1.z.object({ start: zod_1.z.number(), end: zod_1.z.number().optional() }).optional(),
|
|
104
|
+
__isSplit: zod_1.z.boolean().optional(),
|
|
105
|
+
})
|
|
106
|
+
.passthrough();
|
|
107
|
+
const SchemaForUIAdditionalInfo = zod_1.z.object({ id: zod_1.z.string() });
|
|
108
|
+
exports.SchemaForUI = exports.Schema.merge(SchemaForUIAdditionalInfo);
|
|
109
|
+
const ArrayBufferSchema = zod_1.z.any().refine((v) => v instanceof ArrayBuffer);
|
|
110
|
+
const Uint8ArraySchema = zod_1.z
|
|
111
|
+
.any()
|
|
112
|
+
.refine((v) => v instanceof Uint8Array && v.buffer instanceof ArrayBuffer);
|
|
113
|
+
exports.BlankPdf = zod_1.z.object({
|
|
114
|
+
width: zod_1.z.number(),
|
|
115
|
+
height: zod_1.z.number(),
|
|
116
|
+
padding: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number(), zod_1.z.number(), zod_1.z.number()]),
|
|
117
|
+
staticSchema: zod_1.z.array(exports.Schema).optional(),
|
|
118
|
+
});
|
|
119
|
+
exports.CustomPdf = zod_1.z.union([zod_1.z.string(), ArrayBufferSchema, Uint8ArraySchema]);
|
|
120
|
+
exports.BasePdf = zod_1.z.union([exports.CustomPdf, exports.BlankPdf]);
|
|
121
|
+
// Legacy keyed structure for BC - we convert to SchemaPageArray on import
|
|
122
|
+
exports.LegacySchemaPageArray = zod_1.z.array(zod_1.z.record(zod_1.z.string(), exports.Schema));
|
|
123
|
+
exports.SchemaPageArray = zod_1.z.array(zod_1.z.array(exports.Schema));
|
|
124
|
+
exports.Template = zod_1.z
|
|
125
|
+
.object({
|
|
126
|
+
schemas: exports.SchemaPageArray,
|
|
127
|
+
basePdf: exports.BasePdf,
|
|
128
|
+
pdfmeVersion: zod_1.z.string().optional(),
|
|
129
|
+
})
|
|
130
|
+
.passthrough();
|
|
131
|
+
exports.Inputs = zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())).min(1);
|
|
132
|
+
exports.Font = zod_1.z.record(zod_1.z.string(), zod_1.z.object({
|
|
133
|
+
data: zod_1.z.union([zod_1.z.string(), ArrayBufferSchema, Uint8ArraySchema]),
|
|
134
|
+
fallback: zod_1.z.boolean().optional(),
|
|
135
|
+
subset: zod_1.z.boolean().optional(),
|
|
136
|
+
}));
|
|
137
|
+
exports.Plugin = zod_1.z
|
|
138
|
+
.object({
|
|
139
|
+
ui: zod_1.z.any(),
|
|
140
|
+
pdf: zod_1.z.any(),
|
|
141
|
+
propPanel: zod_1.z.object({
|
|
142
|
+
schema: zod_1.z.unknown(),
|
|
143
|
+
widgets: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
144
|
+
defaultSchema: exports.Schema,
|
|
145
|
+
}),
|
|
146
|
+
icon: zod_1.z.string().optional(),
|
|
147
|
+
})
|
|
148
|
+
.passthrough();
|
|
149
|
+
exports.CommonOptions = zod_1.z.object({ font: exports.Font.optional() }).passthrough();
|
|
150
|
+
const CommonProps = zod_1.z.object({
|
|
151
|
+
template: exports.Template,
|
|
152
|
+
options: exports.CommonOptions.optional(),
|
|
153
|
+
plugins: zod_1.z.record(zod_1.z.string(), exports.Plugin).optional(),
|
|
154
|
+
});
|
|
155
|
+
// -------------------generate-------------------
|
|
156
|
+
exports.GeneratorOptions = exports.CommonOptions.extend({
|
|
157
|
+
colorType: exports.ColorType,
|
|
158
|
+
author: zod_1.z.string().optional(),
|
|
159
|
+
creationDate: zod_1.z.date().optional(),
|
|
160
|
+
creator: zod_1.z.string().optional(),
|
|
161
|
+
keywords: zod_1.z.array(zod_1.z.string()).optional(),
|
|
162
|
+
lang: exports.Lang.optional(),
|
|
163
|
+
modificationDate: zod_1.z.date().optional(),
|
|
164
|
+
producer: zod_1.z.string().optional(),
|
|
165
|
+
subject: zod_1.z.string().optional(),
|
|
166
|
+
title: zod_1.z.string().optional(),
|
|
167
|
+
});
|
|
168
|
+
exports.GenerateProps = CommonProps.extend({
|
|
169
|
+
inputs: exports.Inputs,
|
|
170
|
+
options: exports.GeneratorOptions.optional(),
|
|
171
|
+
}).strict();
|
|
172
|
+
// ---------------------ui------------------------
|
|
173
|
+
exports.UIOptions = exports.CommonOptions.extend({
|
|
174
|
+
lang: exports.Lang.optional(),
|
|
175
|
+
labels: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
176
|
+
theme: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
177
|
+
icons: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
178
|
+
requiredByDefault: zod_1.z.boolean().optional(),
|
|
179
|
+
maxZoom: zod_1.z.number().optional(),
|
|
180
|
+
sidebarOpen: zod_1.z.boolean().optional(),
|
|
181
|
+
zoomLevel: zod_1.z.number().optional(),
|
|
182
|
+
});
|
|
183
|
+
const HTMLElementSchema = zod_1.z.any().refine((v) => v instanceof HTMLElement);
|
|
184
|
+
exports.UIProps = CommonProps.extend({
|
|
185
|
+
domContainer: HTMLElementSchema,
|
|
186
|
+
options: exports.UIOptions.optional(),
|
|
187
|
+
});
|
|
188
|
+
exports.PreviewProps = exports.UIProps.extend({ inputs: exports.Inputs }).strict();
|
|
189
|
+
exports.DesignerProps = exports.UIProps.extend({}).strict();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IAC/B,OAAO,EAAE,iBAAS,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEU,QAAA,YAAY,GAAG,eAAO,CAAC,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG,OAAO,CAAC"}
|