@pdfme/common 2.2.1 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/cjs/__tests__/helper.test.js +292 -233
  2. package/dist/cjs/__tests__/helper.test.js.map +1 -1
  3. package/dist/cjs/src/constants.js +3 -17
  4. package/dist/cjs/src/constants.js.map +1 -1
  5. package/dist/cjs/src/helper.js +72 -99
  6. package/dist/cjs/src/helper.js.map +1 -1
  7. package/dist/cjs/src/index.js +7 -37
  8. package/dist/cjs/src/index.js.map +1 -1
  9. package/dist/cjs/src/schema.js +17 -71
  10. package/dist/cjs/src/schema.js.map +1 -1
  11. package/dist/cjs/src/types.js +3 -0
  12. package/dist/cjs/src/types.js.map +1 -0
  13. package/dist/esm/__tests__/helper.test.js +270 -234
  14. package/dist/esm/__tests__/helper.test.js.map +1 -1
  15. package/dist/esm/src/constants.js +2 -16
  16. package/dist/esm/src/constants.js.map +1 -1
  17. package/dist/esm/src/helper.js +68 -98
  18. package/dist/esm/src/helper.js.map +1 -1
  19. package/dist/esm/src/index.js +3 -6
  20. package/dist/esm/src/index.js.map +1 -1
  21. package/dist/esm/src/schema.js +14 -68
  22. package/dist/esm/src/schema.js.map +1 -1
  23. package/dist/esm/src/types.js +2 -0
  24. package/dist/esm/src/types.js.map +1 -0
  25. package/dist/types/src/constants.d.ts +2 -16
  26. package/dist/types/src/helper.d.ts +11 -2
  27. package/dist/types/src/index.d.ts +5 -8
  28. package/dist/types/src/schema.d.ts +696 -3574
  29. package/dist/types/src/types.d.ts +127 -0
  30. package/package.json +5 -11
  31. package/src/constants.ts +2 -18
  32. package/src/helper.ts +108 -116
  33. package/src/index.ts +28 -87
  34. package/src/schema.ts +18 -84
  35. package/src/types.ts +124 -0
  36. package/tsconfig.cjs.json +3 -2
  37. package/tsconfig.esm.json +3 -2
  38. package/dist/cjs/__tests__/barcode.test.js +0 -107
  39. package/dist/cjs/__tests__/barcode.test.js.map +0 -1
  40. package/dist/cjs/__tests__/font.test.js +0 -465
  41. package/dist/cjs/__tests__/font.test.js.map +0 -1
  42. package/dist/cjs/src/barcode.js +0 -53
  43. package/dist/cjs/src/barcode.js.map +0 -1
  44. package/dist/cjs/src/font.js +0 -310
  45. package/dist/cjs/src/font.js.map +0 -1
  46. package/dist/cjs/src/type.js +0 -12
  47. package/dist/cjs/src/type.js.map +0 -1
  48. package/dist/esm/__tests__/barcode.test.js +0 -102
  49. package/dist/esm/__tests__/barcode.test.js.map +0 -1
  50. package/dist/esm/__tests__/font.test.js +0 -440
  51. package/dist/esm/__tests__/font.test.js.map +0 -1
  52. package/dist/esm/src/barcode.js +0 -44
  53. package/dist/esm/src/barcode.js.map +0 -1
  54. package/dist/esm/src/font.js +0 -274
  55. package/dist/esm/src/font.js.map +0 -1
  56. package/dist/esm/src/type.js +0 -6
  57. package/dist/esm/src/type.js.map +0 -1
  58. package/dist/types/__tests__/barcode.test.d.ts +0 -1
  59. package/dist/types/__tests__/font.test.d.ts +0 -1
  60. package/dist/types/src/barcode.d.ts +0 -19
  61. package/dist/types/src/font.d.ts +0 -34
  62. package/dist/types/src/type.d.ts +0 -81
  63. package/src/barcode.ts +0 -51
  64. package/src/font.ts +0 -352
  65. package/src/type.ts +0 -69
@@ -1,11 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateBarcodeInput = exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.b64toUint8Array = exports.getB64BasePdf = exports.pt2px = exports.pt2mm = exports.mm2pt = void 0;
3
+ exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.checkPlugins = exports.checkFont = exports.b64toUint8Array = exports.getB64BasePdf = 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_1 = require("./schema");
7
7
  const constants_1 = require("./constants");
8
- const font_1 = require("./font");
8
+ const uniq = (array) => Array.from(new Set(array));
9
+ const getFallbackFontName = (font) => {
10
+ const initial = '';
11
+ const fallbackFontName = Object.entries(font).reduce((acc, cur) => {
12
+ const [fontName, fontValue] = cur;
13
+ return !acc && fontValue.fallback ? fontName : acc;
14
+ }, initial);
15
+ if (fallbackFontName === initial) {
16
+ throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.`);
17
+ }
18
+ return fallbackFontName;
19
+ };
20
+ exports.getFallbackFontName = getFallbackFontName;
21
+ const getDefaultFont = () => ({
22
+ [constants_1.DEFAULT_FONT_NAME]: { data: (0, exports.b64toUint8Array)(constants_1.DEFAULT_FONT_VALUE), fallback: true },
23
+ });
24
+ exports.getDefaultFont = getDefaultFont;
9
25
  const mm2pt = (mm) => {
10
26
  return parseFloat(String(mm)) * constants_1.MM_TO_PT_RATIO;
11
27
  };
@@ -26,7 +42,7 @@ const blob2Base64Pdf = (blob) => {
26
42
  resolve(reader.result);
27
43
  }
28
44
  else {
29
- reject(Error('template.basePdf must be pdf data.'));
45
+ reject(Error('[@pdfme/common] template.basePdf must be pdf data.'));
30
46
  }
31
47
  };
32
48
  reader.readAsDataURL(blob);
@@ -56,6 +72,45 @@ const b64toUint8Array = (base64) => {
56
72
  return unit8arr;
57
73
  };
58
74
  exports.b64toUint8Array = b64toUint8Array;
75
+ const getFontNamesInSchemas = (schemas) => uniq(schemas
76
+ .map((s) => Object.values(s).map((v) => { var _a; return (_a = v.fontName) !== null && _a !== void 0 ? _a : ''; }))
77
+ .reduce((acc, cur) => acc.concat(cur), [])
78
+ .filter(Boolean));
79
+ const checkFont = (arg) => {
80
+ const { font, template: { schemas }, } = arg;
81
+ const fontValues = Object.values(font);
82
+ const fallbackFontNum = fontValues.reduce((acc, cur) => (cur.fallback ? acc + 1 : acc), 0);
83
+ if (fallbackFontNum === 0) {
84
+ throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.
85
+ Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);
86
+ }
87
+ if (fallbackFontNum > 1) {
88
+ throw Error(`[@pdfme/common] ${fallbackFontNum} fallback flags found in font. true fallback flag must be only one.
89
+ Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);
90
+ }
91
+ const fontNamesInSchemas = getFontNamesInSchemas(schemas);
92
+ const fontNames = Object.keys(font);
93
+ if (fontNamesInSchemas.some((f) => !fontNames.includes(f))) {
94
+ throw Error(`[@pdfme/common] ${fontNamesInSchemas
95
+ .filter((f) => !fontNames.includes(f))
96
+ .join()} of template.schemas is not found in font.
97
+ Check this document: https://pdfme.com/docs/custom-fonts`);
98
+ }
99
+ };
100
+ exports.checkFont = checkFont;
101
+ const checkPlugins = (arg) => {
102
+ const { plugins, template: { schemas }, } = arg;
103
+ const allSchemaTypes = uniq(schemas.map((s) => Object.values(s).map((v) => v.type)).flat());
104
+ // text and image are builtin schema types so they are not included in plugins.
105
+ const exceptBuiltinSchemaTypes = allSchemaTypes.filter((t) => t !== 'text' && t !== 'image');
106
+ const pluginsSchemaTypes = Object.keys(plugins);
107
+ if (exceptBuiltinSchemaTypes.some((s) => !pluginsSchemaTypes.includes(s))) {
108
+ throw Error(`[@pdfme/common] ${exceptBuiltinSchemaTypes
109
+ .filter((s) => !pluginsSchemaTypes.includes(s))
110
+ .join()} of template.schemas is not found in plugins.`);
111
+ }
112
+ };
113
+ exports.checkPlugins = checkPlugins;
59
114
  const checkProps = (data, zodSchema) => {
60
115
  try {
61
116
  zodSchema.parse(data);
@@ -66,16 +121,24 @@ const checkProps = (data, zodSchema) => {
66
121
  ERROR MESSAGE: ${issue.message}
67
122
  --------------------------`);
68
123
  const message = messages.join('\n');
69
- throw Error(`Invalid argument:
124
+ throw Error(`[@pdfme/common] Invalid argument:
70
125
  --------------------------
71
126
  ${message}`);
72
127
  }
73
128
  }
74
- const commonProps = data;
75
- const { template, options } = commonProps;
76
- const font = options === null || options === void 0 ? void 0 : options.font;
77
- if (font) {
78
- (0, font_1.checkFont)({ font, template });
129
+ // Check fon if template and options exist
130
+ if (data && typeof data === 'object' && 'template' in data && 'options' in data) {
131
+ const { template, options } = data;
132
+ if (options && options.font) {
133
+ (0, exports.checkFont)({ font: options.font, template });
134
+ }
135
+ }
136
+ // Check plugins if template and plugins exist
137
+ if (data && typeof data === 'object' && 'template' in data && 'plugins' in data) {
138
+ const { template, plugins } = data;
139
+ if (plugins) {
140
+ (0, exports.checkPlugins)({ plugins, template });
141
+ }
79
142
  }
80
143
  };
81
144
  const checkInputs = (data) => checkProps(data, schema_1.Inputs);
@@ -92,94 +155,4 @@ const checkDesignerProps = (data) => checkProps(data, schema_1.DesignerProps);
92
155
  exports.checkDesignerProps = checkDesignerProps;
93
156
  const checkGenerateProps = (data) => checkProps(data, schema_1.GenerateProps);
94
157
  exports.checkGenerateProps = checkGenerateProps;
95
- // GTIN-13, GTIN-8, GTIN-12, GTIN-14
96
- const validateCheckDigit = (input, checkDigitPos) => {
97
- let passCheckDigit = true;
98
- if (input.length === checkDigitPos) {
99
- const ds = input.slice(0, -1).replace(/[^0-9]/g, '');
100
- let sum = 0;
101
- let odd = 1;
102
- for (let i = ds.length - 1; i > -1; i -= 1) {
103
- sum += Number(ds[i]) * (odd ? 3 : 1);
104
- odd ^= 1;
105
- if (sum > 0xffffffffffff) {
106
- // ~2^48 at max
107
- sum %= 10;
108
- }
109
- }
110
- passCheckDigit = String(10 - (sum % 10)).slice(-1) === input.slice(-1);
111
- }
112
- return passCheckDigit;
113
- };
114
- const validateBarcodeInput = (type, input) => {
115
- if (!input)
116
- return false;
117
- if (type === 'qrcode') {
118
- // 500文字以下
119
- return input.length < 500;
120
- }
121
- if (type === 'japanpost') {
122
- // 郵便番号は数字(0-9)のみ。住所表示番号は英数字(0-9,A-Z)とハイフン(-)が使用可能です。
123
- const regexp = /^(\d{7})(\d|[A-Z]|-)+$/;
124
- return regexp.test(input);
125
- }
126
- if (type === 'ean13') {
127
- // 有効文字は数値(0-9)のみ。チェックデジットを含まない12桁orチェックデジットを含む13桁。
128
- const regexp = /^\d{12}$|^\d{13}$/;
129
- return regexp.test(input) && validateCheckDigit(input, 13);
130
- }
131
- if (type === 'ean8') {
132
- // 有効文字は数値(0-9)のみ。チェックデジットを含まない7桁orチェックデジットを含む8桁。
133
- const regexp = /^\d{7}$|^\d{8}$/;
134
- return regexp.test(input) && validateCheckDigit(input, 8);
135
- }
136
- if (type === 'code39') {
137
- // 有効文字は数字(0-9)。アルファベット大文字(A-Z)、記号(-.$/+%)、半角スペース。
138
- const regexp = /^(\d|[A-Z]|\-|\.|\$|\/|\+|\%|\s)+$/;
139
- return regexp.test(input);
140
- }
141
- if (type === 'code128') {
142
- // 有効文字は漢字、ひらがな、カタカナ以外。
143
- // https://qiita.com/graminume/items/2ac8dd9c32277fa9da64
144
- return !input.match(/([\u30a0-\u30ff\u3040-\u309f\u3005-\u3006\u30e0-\u9fcf]|[A-Za-z0-9!"#$%&'()*+,-./:;<=>?@[\]^_`{|}〜 ])+/);
145
- }
146
- if (type === 'nw7') {
147
- // 有効文字はNW-7は数字(0-9)と記号(-.$:/+)。
148
- // スタートコード/ストップコードとして、コードの始まりと終わりはアルファベット(A-D)のいずれかを使用してください。
149
- const regexp = /^[A-Da-d]([0-9\-\.\$\:\/\+])+[A-Da-d]$/;
150
- return regexp.test(input);
151
- }
152
- if (type === 'itf14') {
153
- // 有効文字は数値(0-9)のみ。 チェックデジットを含まない13桁orチェックデジットを含む14桁。
154
- const regexp = /^\d{13}$|^\d{14}$/;
155
- return regexp.test(input) && validateCheckDigit(input, 14);
156
- }
157
- if (type === 'upca') {
158
- // 有効文字は数値(0-9)のみ。 チェックデジットを含まない11桁orチェックデジットを含む12桁。
159
- const regexp = /^\d{11}$|^\d{12}$/;
160
- return regexp.test(input) && validateCheckDigit(input, 12);
161
- }
162
- if (type === 'upce') {
163
- // 有効文字は数値(0-9)のみ。 1桁目に指定できる数字(ナンバーシステムキャラクタ)は0のみ。
164
- // チェックデジットを含まない7桁orチェックデジットを含む8桁。
165
- const regexp = /^0(\d{6}$|\d{7}$)/;
166
- return regexp.test(input) && validateCheckDigit(input, 8);
167
- }
168
- if (type === 'gs1datamatrix') {
169
- let ret = false;
170
- // find the GTIN application identifier, regex for "(01)" and the digits after it until another "("
171
- const regexp = /\((01)\)(\d*)(\(|$)/;
172
- let res = input.match(regexp);
173
- if (res != null &&
174
- input.length <= 52 && // 52 is the max length of a GS1 DataMatrix barcode before bwip-js throws an error
175
- res[1] === '01' &&
176
- (res[2].length === 14 || res[2].length === 8 || res[2].length === 12 || res[2].length === 13)) {
177
- let gtin = res[2];
178
- ret = validateCheckDigit(gtin, gtin.length);
179
- }
180
- return ret;
181
- }
182
- return false;
183
- };
184
- exports.validateBarcodeInput = validateBarcodeInput;
185
158
  //# sourceMappingURL=helper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/helper.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mCAAgC;AAEhC,qCAQkB;AAClB,2CAA6E;AAC7E,iCAAmC;AAE5B,MAAM,KAAK,GAAG,CAAC,EAAU,EAAU,EAAE;IAC1C,OAAO,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,0BAAc,CAAC;AACjD,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEK,MAAM,KAAK,GAAG,CAAC,EAAU,EAAU,EAAE;IAC1C,OAAO,EAAE,GAAG,0BAAc,CAAC;AAC7B,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEK,MAAM,KAAK,GAAG,CAAC,EAAU,EAAU,EAAE;IAC1C,OAAO,EAAE,GAAG,0BAAc,CAAC;AAC7B,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEF,MAAM,cAAc,GAAG,CAAC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strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createBarCode = exports.calculateDynamicFontSize = exports.validateBarcodeInput = exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.getFontKitFont = exports.getFontDescentInPt = exports.getBrowserVerticalFontAdjustments = exports.checkFont = exports.pt2px = exports.mm2pt = exports.widthOfTextAtSize = exports.heightOfFontAtSize = exports.getSplittedLines = exports.getDefaultFont = exports.getFallbackFontName = exports.b64toUint8Array = exports.getB64BasePdf = exports.isBarcodeSchema = exports.isImageSchema = exports.isTextSchema = exports.schemaTypes = exports.DEFAULT_FONT_VALUE = exports.BLANK_PDF = exports.PT_TO_PX_RATIO = exports.PT_TO_MM_RATIO = exports.MM_TO_PT_RATIO = exports.FONT_SIZE_ADJUSTMENT = exports.DEFAULT_DYNAMIC_FIT = exports.DYNAMIC_FIT_HORIZONTAL = exports.DYNAMIC_FIT_VERTICAL = exports.DEFAULT_BARCODE_COLOR = exports.DEFAULT_BARCODE_BG_COLOR = exports.DEFAULT_FONT_COLOR = exports.DEFAULT_CHARACTER_SPACING = exports.DEFAULT_LINE_HEIGHT = exports.DEFAULT_VERTICAL_ALIGNMENT = exports.VERTICAL_ALIGN_BOTTOM = exports.VERTICAL_ALIGN_MIDDLE = exports.VERTICAL_ALIGN_TOP = exports.DEFAULT_ALIGNMENT = exports.DEFAULT_FONT_SIZE = exports.DEFAULT_FONT_NAME = void 0;
3
+ exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.checkFont = 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 = void 0;
4
4
  const constants_js_1 = require("./constants.js");
5
- Object.defineProperty(exports, "DEFAULT_FONT_NAME", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_NAME; } });
6
- Object.defineProperty(exports, "DEFAULT_FONT_SIZE", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_SIZE; } });
7
- Object.defineProperty(exports, "DEFAULT_ALIGNMENT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_ALIGNMENT; } });
8
- Object.defineProperty(exports, "VERTICAL_ALIGN_TOP", { enumerable: true, get: function () { return constants_js_1.VERTICAL_ALIGN_TOP; } });
9
- Object.defineProperty(exports, "VERTICAL_ALIGN_MIDDLE", { enumerable: true, get: function () { return constants_js_1.VERTICAL_ALIGN_MIDDLE; } });
10
- Object.defineProperty(exports, "VERTICAL_ALIGN_BOTTOM", { enumerable: true, get: function () { return constants_js_1.VERTICAL_ALIGN_BOTTOM; } });
11
- Object.defineProperty(exports, "DEFAULT_VERTICAL_ALIGNMENT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_VERTICAL_ALIGNMENT; } });
12
- Object.defineProperty(exports, "DEFAULT_LINE_HEIGHT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_LINE_HEIGHT; } });
13
- Object.defineProperty(exports, "DEFAULT_CHARACTER_SPACING", { enumerable: true, get: function () { return constants_js_1.DEFAULT_CHARACTER_SPACING; } });
14
- Object.defineProperty(exports, "DEFAULT_FONT_COLOR", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_COLOR; } });
15
- Object.defineProperty(exports, "DEFAULT_BARCODE_BG_COLOR", { enumerable: true, get: function () { return constants_js_1.DEFAULT_BARCODE_BG_COLOR; } });
16
- Object.defineProperty(exports, "DEFAULT_BARCODE_COLOR", { enumerable: true, get: function () { return constants_js_1.DEFAULT_BARCODE_COLOR; } });
17
- Object.defineProperty(exports, "DYNAMIC_FIT_VERTICAL", { enumerable: true, get: function () { return constants_js_1.DYNAMIC_FIT_VERTICAL; } });
18
- Object.defineProperty(exports, "DYNAMIC_FIT_HORIZONTAL", { enumerable: true, get: function () { return constants_js_1.DYNAMIC_FIT_HORIZONTAL; } });
19
- Object.defineProperty(exports, "DEFAULT_DYNAMIC_FIT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_DYNAMIC_FIT; } });
20
- Object.defineProperty(exports, "FONT_SIZE_ADJUSTMENT", { enumerable: true, get: function () { return constants_js_1.FONT_SIZE_ADJUSTMENT; } });
21
5
  Object.defineProperty(exports, "MM_TO_PT_RATIO", { enumerable: true, get: function () { return constants_js_1.MM_TO_PT_RATIO; } });
22
6
  Object.defineProperty(exports, "PT_TO_MM_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_MM_RATIO; } });
23
7
  Object.defineProperty(exports, "PT_TO_PX_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_PX_RATIO; } });
24
8
  Object.defineProperty(exports, "BLANK_PDF", { enumerable: true, get: function () { return constants_js_1.BLANK_PDF; } });
25
- Object.defineProperty(exports, "DEFAULT_FONT_VALUE", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_VALUE; } });
26
- const barcode_1 = require("./barcode");
27
- Object.defineProperty(exports, "createBarCode", { enumerable: true, get: function () { return barcode_1.createBarCode; } });
28
- const type_js_1 = require("./type.js");
29
- Object.defineProperty(exports, "schemaTypes", { enumerable: true, get: function () { return type_js_1.schemaTypes; } });
30
- Object.defineProperty(exports, "isImageSchema", { enumerable: true, get: function () { return type_js_1.isImageSchema; } });
31
- Object.defineProperty(exports, "isBarcodeSchema", { enumerable: true, get: function () { return type_js_1.isBarcodeSchema; } });
32
- Object.defineProperty(exports, "isTextSchema", { enumerable: true, get: function () { return type_js_1.isTextSchema; } });
9
+ Object.defineProperty(exports, "ZOOM", { enumerable: true, get: function () { return constants_js_1.ZOOM; } });
10
+ Object.defineProperty(exports, "DEFAULT_FONT_NAME", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_NAME; } });
33
11
  const helper_js_1 = require("./helper.js");
12
+ Object.defineProperty(exports, "getFallbackFontName", { enumerable: true, get: function () { return helper_js_1.getFallbackFontName; } });
13
+ Object.defineProperty(exports, "getDefaultFont", { enumerable: true, get: function () { return helper_js_1.getDefaultFont; } });
34
14
  Object.defineProperty(exports, "getB64BasePdf", { enumerable: true, get: function () { return helper_js_1.getB64BasePdf; } });
35
15
  Object.defineProperty(exports, "b64toUint8Array", { enumerable: true, get: function () { return helper_js_1.b64toUint8Array; } });
16
+ Object.defineProperty(exports, "checkFont", { enumerable: true, get: function () { return helper_js_1.checkFont; } });
36
17
  Object.defineProperty(exports, "checkInputs", { enumerable: true, get: function () { return helper_js_1.checkInputs; } });
37
18
  Object.defineProperty(exports, "checkUIOptions", { enumerable: true, get: function () { return helper_js_1.checkUIOptions; } });
38
19
  Object.defineProperty(exports, "checkTemplate", { enumerable: true, get: function () { return helper_js_1.checkTemplate; } });
@@ -41,17 +22,6 @@ Object.defineProperty(exports, "checkPreviewProps", { enumerable: true, get: fun
41
22
  Object.defineProperty(exports, "checkDesignerProps", { enumerable: true, get: function () { return helper_js_1.checkDesignerProps; } });
42
23
  Object.defineProperty(exports, "checkGenerateProps", { enumerable: true, get: function () { return helper_js_1.checkGenerateProps; } });
43
24
  Object.defineProperty(exports, "mm2pt", { enumerable: true, get: function () { return helper_js_1.mm2pt; } });
25
+ Object.defineProperty(exports, "pt2mm", { enumerable: true, get: function () { return helper_js_1.pt2mm; } });
44
26
  Object.defineProperty(exports, "pt2px", { enumerable: true, get: function () { return helper_js_1.pt2px; } });
45
- Object.defineProperty(exports, "validateBarcodeInput", { enumerable: true, get: function () { return helper_js_1.validateBarcodeInput; } });
46
- const font_js_1 = require("./font.js");
47
- Object.defineProperty(exports, "calculateDynamicFontSize", { enumerable: true, get: function () { return font_js_1.calculateDynamicFontSize; } });
48
- Object.defineProperty(exports, "getFallbackFontName", { enumerable: true, get: function () { return font_js_1.getFallbackFontName; } });
49
- Object.defineProperty(exports, "getDefaultFont", { enumerable: true, get: function () { return font_js_1.getDefaultFont; } });
50
- Object.defineProperty(exports, "heightOfFontAtSize", { enumerable: true, get: function () { return font_js_1.heightOfFontAtSize; } });
51
- Object.defineProperty(exports, "widthOfTextAtSize", { enumerable: true, get: function () { return font_js_1.widthOfTextAtSize; } });
52
- Object.defineProperty(exports, "checkFont", { enumerable: true, get: function () { return font_js_1.checkFont; } });
53
- Object.defineProperty(exports, "getFontKitFont", { enumerable: true, get: function () { return font_js_1.getFontKitFont; } });
54
- Object.defineProperty(exports, "getBrowserVerticalFontAdjustments", { enumerable: true, get: function () { return font_js_1.getBrowserVerticalFontAdjustments; } });
55
- Object.defineProperty(exports, "getFontDescentInPt", { enumerable: true, get: function () { return font_js_1.getFontDescentInPt; } });
56
- Object.defineProperty(exports, "getSplittedLines", { enumerable: true, get: function () { return font_js_1.getSplittedLines; } });
57
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAsBwB;AAyDtB,kGA9EA,gCAAiB,OA8EA;AACjB,kGA9EA,gCAAiB,OA8EA;AACjB,kGA9EA,gCAAiB,OA8EA;AACjB,mGA9EA,iCAAkB,OA8EA;AAClB,sGA9EA,oCAAqB,OA8EA;AACrB,sGA9EA,oCAAqB,OA8EA;AACrB,2GA9EA,yCAA0B,OA8EA;AAC1B,oGA9EA,kCAAmB,OA8EA;AACnB,0GA9EA,wCAAyB,OA8EA;AACzB,mGA9EA,iCAAkB,OA8EA;AAClB,yGA9EA,uCAAwB,OA8EA;AACxB,sGA9EA,oCAAqB,OA8EA;AACrB,qGA9EA,mCAAoB,OA8EA;AACpB,uGA9EA,qCAAsB,OA8EA;AACtB,oGA9EA,kCAAmB,OA8EA;AACnB,qGA9EA,mCAAoB,OA8EA;AACpB,+FA9EA,6BAAc,OA8EA;AACd,+FA9EA,6BAAc,OA8EA;AACd,+FA9EA,6BAAc,OA8EA;AACd,0F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AxBA,0BAAc,OAwBA;AACd,8FAxBA,yBAAa,OAwBA;AACb,gGAxBA,2BAAe,OAwBA;AAIf,0FA3BA,qBAAS,OA2BA;AACT,4FA3BA,uBAAW,OA2BA;AACX,+FA3BA,0BAAc,OA2BA;AACd,8FA3BA,yBAAa,OA2BA;AACb,6FA3BA,wBAAY,OA2BA;AACZ,kGA3BA,6BAAiB,OA2BA;AACjB,mGA3BA,8BAAkB,OA2BA;AAClB,mGA3BA,8BAAkB,OA2BA;AAVlB,sFAhBA,iBAAK,OAgBA;AACL,sFAhBA,iBAAK,OAgBA;AACL,sFAhBA,iBAAK,OAgBA"}
@@ -1,65 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DesignerReactProps = exports.DesignerProps = exports.PreviewReactProps = exports.PreviewProps = exports.UIProps = exports.UIOptions = exports.SchemaInputs = exports.GenerateProps = exports.GeneratorOptions = exports.CommonProps = exports.Inputs = exports.Template = exports.BasePdf = exports.Font = exports.SchemaForUI = exports.Schema = exports.BarcodeSchema = exports.ImageSchema = exports.TextSchema = exports.CommonSchema = exports.SchemaType = exports.BarcodeSchemaType = exports.schemaTypes = exports.barcodeSchemaTypes = exports.VerticalAlignment = exports.Alignment = exports.Size = exports.Lang = void 0;
4
- /* eslint dot-notation: "off"*/
3
+ exports.DesignerProps = exports.PreviewProps = exports.UIProps = exports.UIOptions = exports.GenerateProps = exports.GeneratorOptions = exports.Inputs = exports.Template = exports.BasePdf = exports.Font = exports.SchemaForUI = exports.Schema = exports.Size = exports.Lang = void 0;
5
4
  const zod_1 = require("zod");
6
- const constants_1 = require("./constants");
7
5
  const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it'];
8
6
  exports.Lang = zod_1.z.enum(langs);
9
7
  exports.Size = zod_1.z.object({ height: zod_1.z.number(), width: zod_1.z.number() });
10
- const alignments = ['left', 'center', 'right'];
11
- exports.Alignment = zod_1.z.enum(alignments);
12
- const verticalAlignments = [
13
- constants_1.VERTICAL_ALIGN_TOP,
14
- constants_1.VERTICAL_ALIGN_MIDDLE,
15
- constants_1.VERTICAL_ALIGN_BOTTOM,
16
- ];
17
- exports.VerticalAlignment = zod_1.z.enum(verticalAlignments);
18
- // prettier-ignore
19
- exports.barcodeSchemaTypes = ['qrcode', 'japanpost', 'ean13', 'ean8', 'code39', 'code128', 'nw7', 'itf14', 'upca', 'upce', 'gs1datamatrix'];
20
- const notBarcodeSchemaTypes = ['text', 'image'];
21
- exports.schemaTypes = [...notBarcodeSchemaTypes, ...exports.barcodeSchemaTypes];
22
- exports.BarcodeSchemaType = zod_1.z.enum(exports.barcodeSchemaTypes);
23
- exports.SchemaType = zod_1.z.enum(exports.schemaTypes);
24
- exports.CommonSchema = zod_1.z.object({
25
- type: exports.SchemaType,
8
+ exports.Schema = zod_1.z
9
+ .object({
10
+ type: zod_1.z.string(),
26
11
  position: zod_1.z.object({ x: zod_1.z.number(), y: zod_1.z.number() }),
27
12
  width: zod_1.z.number(),
28
13
  height: zod_1.z.number(),
29
14
  rotate: zod_1.z.number().optional(),
30
- });
31
- exports.TextSchema = exports.CommonSchema.extend({
32
- type: zod_1.z.literal(exports.SchemaType.Enum.text),
33
- alignment: exports.Alignment.optional(),
34
- verticalAlignment: exports.VerticalAlignment.optional(),
35
- fontSize: zod_1.z.number().optional(),
36
- fontName: zod_1.z.string().optional(),
37
- fontColor: zod_1.z.string().optional(),
38
- backgroundColor: zod_1.z.string().optional(),
39
- characterSpacing: zod_1.z.number().optional(),
40
- lineHeight: zod_1.z.number().optional(),
41
- dynamicFontSize: zod_1.z.object({
42
- max: zod_1.z.number(),
43
- min: zod_1.z.number(),
44
- fit: zod_1.z.string().optional(),
45
- }).optional(),
46
- });
47
- exports.ImageSchema = exports.CommonSchema.extend({ type: zod_1.z.literal(exports.SchemaType.Enum.image) });
48
- exports.BarcodeSchema = exports.CommonSchema.extend({
49
- type: exports.BarcodeSchemaType,
50
- backgroundcolor: zod_1.z.string().optional(),
51
- barcolor: zod_1.z.string().optional(),
52
- textcolor: zod_1.z.string().optional(),
53
- });
54
- exports.Schema = zod_1.z.union([exports.TextSchema, exports.ImageSchema, exports.BarcodeSchema]);
15
+ })
16
+ .passthrough();
55
17
  const SchemaForUIAdditionalInfo = zod_1.z.object({
56
- id: zod_1.z.string(), key: zod_1.z.string(), data: zod_1.z.string(),
18
+ id: zod_1.z.string(),
19
+ key: zod_1.z.string(),
20
+ data: zod_1.z.string(),
57
21
  });
58
- exports.SchemaForUI = zod_1.z.union([
59
- exports.TextSchema.merge(SchemaForUIAdditionalInfo),
60
- exports.ImageSchema.merge(SchemaForUIAdditionalInfo),
61
- exports.BarcodeSchema.merge(SchemaForUIAdditionalInfo),
62
- ]);
22
+ exports.SchemaForUI = exports.Schema.merge(SchemaForUIAdditionalInfo);
63
23
  const ArrayBufferSchema = zod_1.z.any().refine((v) => v instanceof ArrayBuffer);
64
24
  const Uint8ArraySchema = zod_1.z.any().refine((v) => v instanceof Uint8Array);
65
25
  exports.Font = zod_1.z.record(zod_1.z.object({
@@ -75,39 +35,25 @@ exports.Template = zod_1.z.object({
75
35
  columns: zod_1.z.array(zod_1.z.string()).optional(),
76
36
  });
77
37
  exports.Inputs = zod_1.z.array(zod_1.z.record(zod_1.z.string())).min(1);
78
- const CommonOptions = zod_1.z.object({ font: exports.Font.optional() });
79
- exports.CommonProps = zod_1.z.object({
38
+ const CommonOptions = zod_1.z.object({ font: exports.Font.optional() }).passthrough();
39
+ const CommonProps = zod_1.z.object({
80
40
  template: exports.Template,
81
41
  options: CommonOptions.optional(),
42
+ plugins: zod_1.z.record(zod_1.z.object({ ui: zod_1.z.any(), pdf: zod_1.z.any(), propPanel: zod_1.z.any() })).optional(),
82
43
  });
83
44
  // -------------------generate-------------------
84
- exports.GeneratorOptions = CommonOptions;
85
- exports.GenerateProps = exports.CommonProps.extend({
45
+ exports.GeneratorOptions = CommonOptions.extend({});
46
+ exports.GenerateProps = CommonProps.extend({
86
47
  inputs: exports.Inputs,
87
48
  options: exports.GeneratorOptions.optional(),
88
49
  }).strict();
89
- exports.SchemaInputs = zod_1.z.record(zod_1.z.string());
90
- // ---------------------------------------------
50
+ // ---------------------ui------------------------
91
51
  exports.UIOptions = CommonOptions.extend({ lang: exports.Lang.optional() });
92
52
  const HTMLElementSchema = zod_1.z.any().refine((v) => v instanceof HTMLElement);
93
- exports.UIProps = exports.CommonProps.extend({
53
+ exports.UIProps = CommonProps.extend({
94
54
  domContainer: HTMLElementSchema,
95
55
  options: exports.UIOptions.optional(),
96
56
  });
97
- // -----------------Form, Viewer-----------------
98
57
  exports.PreviewProps = exports.UIProps.extend({ inputs: exports.Inputs }).strict();
99
- exports.PreviewReactProps = exports.PreviewProps.omit({ domContainer: true }).extend({
100
- onChangeInput: zod_1.z
101
- .function()
102
- .args(zod_1.z.object({ index: zod_1.z.number(), value: zod_1.z.string(), key: zod_1.z.string() }))
103
- .returns(zod_1.z.void())
104
- .optional(),
105
- size: exports.Size,
106
- });
107
- // ---------------Designer---------------
108
58
  exports.DesignerProps = exports.UIProps.extend({}).strict();
109
- exports.DesignerReactProps = exports.DesignerProps.omit({ domContainer: true }).extend({
110
- onSaveTemplate: zod_1.z.function().args(exports.Template).returns(zod_1.z.void()),
111
- size: exports.Size,
112
- });
113
59
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,6BAAwB;AACxB,2CAA+F;AAE/F,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAE/C,QAAA,IAAI,GAAG,OAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAErB,QAAA,IAAI,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAC,CAA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Property(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":""}