@pdfme/common 2.0.2 → 2.2.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.
Files changed (43) hide show
  1. package/dist/cjs/__tests__/font.test.js +237 -27
  2. package/dist/cjs/__tests__/font.test.js.map +1 -1
  3. package/dist/cjs/__tests__/helper.test.js +25 -0
  4. package/dist/cjs/__tests__/helper.test.js.map +1 -1
  5. package/dist/cjs/src/constants.js +12 -5
  6. package/dist/cjs/src/constants.js.map +1 -1
  7. package/dist/cjs/src/font.js +180 -48
  8. package/dist/cjs/src/font.js.map +1 -1
  9. package/dist/cjs/src/helper.js +14 -1
  10. package/dist/cjs/src/helper.js.map +1 -1
  11. package/dist/cjs/src/index.js +18 -6
  12. package/dist/cjs/src/index.js.map +1 -1
  13. package/dist/cjs/src/schema.js +10 -1
  14. package/dist/cjs/src/schema.js.map +1 -1
  15. package/dist/cjs/src/type.js.map +1 -1
  16. package/dist/esm/__tests__/font.test.js +238 -28
  17. package/dist/esm/__tests__/font.test.js.map +1 -1
  18. package/dist/esm/__tests__/helper.test.js +26 -1
  19. package/dist/esm/__tests__/helper.test.js.map +1 -1
  20. package/dist/esm/src/constants.js +11 -4
  21. package/dist/esm/src/constants.js.map +1 -1
  22. package/dist/esm/src/font.js +176 -47
  23. package/dist/esm/src/font.js.map +1 -1
  24. package/dist/esm/src/helper.js +11 -1
  25. package/dist/esm/src/helper.js.map +1 -1
  26. package/dist/esm/src/index.js +4 -4
  27. package/dist/esm/src/index.js.map +1 -1
  28. package/dist/esm/src/schema.js +9 -0
  29. package/dist/esm/src/schema.js.map +1 -1
  30. package/dist/esm/src/type.js.map +1 -1
  31. package/dist/types/src/constants.d.ts +11 -4
  32. package/dist/types/src/font.d.ts +20 -3
  33. package/dist/types/src/helper.d.ts +3 -0
  34. package/dist/types/src/index.d.ts +6 -6
  35. package/dist/types/src/schema.d.ts +165 -0
  36. package/dist/types/src/type.d.ts +9 -0
  37. package/package.json +1 -1
  38. package/src/constants.ts +11 -4
  39. package/src/font.ts +228 -72
  40. package/src/helper.ts +14 -1
  41. package/src/index.ts +38 -11
  42. package/src/schema.ts +10 -0
  43. package/src/type.ts +9 -0
@@ -32,11 +32,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.calculateDynamicFontSize = exports.getFontKitFont = exports.heightOfFontAtSize = exports.getFontAlignmentValue = exports.checkFont = exports.getDefaultFont = exports.getFallbackFontName = void 0;
35
+ exports.calculateDynamicFontSize = exports.getSplittedLines = exports.getFontKitFont = exports.widthOfTextAtSize = exports.heightOfFontAtSize = exports.getFontDescentInPt = exports.getBrowserVerticalFontAdjustments = exports.checkFont = exports.getDefaultFont = exports.getFallbackFontName = void 0;
36
36
  const fontkit = __importStar(require("fontkit"));
37
37
  const type_1 = require("./type");
38
38
  const buffer_1 = require("buffer");
39
39
  const constants_1 = require("./constants");
40
+ const helper_1 = require("./helper");
40
41
  const _1 = require(".");
41
42
  const getFallbackFontName = (font) => {
42
43
  const initial = '';
@@ -82,18 +83,41 @@ const checkFont = (arg) => {
82
83
  }
83
84
  };
84
85
  exports.checkFont = checkFont;
85
- const getFontAlignmentValue = (fontKitFont, fontSize) => {
86
+ const getBrowserVerticalFontAdjustments = (fontKitFont, fontSize, lineHeight, verticalAlignment) => {
86
87
  const { ascent, descent, unitsPerEm } = fontKitFont;
87
- const fontSizeInPx = fontSize * constants_1.DEFAULT_PT_TO_PX_RATIO;
88
- // Convert ascent and descent to px values
89
- const ascentInPixels = (ascent / unitsPerEm) * fontSizeInPx;
90
- const descentInPixels = (descent / unitsPerEm) * fontSizeInPx;
91
- // Calculate the single line height in px
92
- const singleLineHeight = ((ascentInPixels + Math.abs(descentInPixels)) / fontSizeInPx);
93
- // Calculate the top margin/padding in px
94
- return ((singleLineHeight * fontSizeInPx) - fontSizeInPx) / 2;
88
+ // Fonts have a designed line height that the browser renders when using `line-height: normal`
89
+ const fontBaseLineHeight = (ascent - descent) / unitsPerEm;
90
+ // For vertical alignment top
91
+ // To achieve consistent positioning between browser and PDF, we apply the difference between
92
+ // the font's actual height and the font size in pixels.
93
+ // Browsers middle the font within this height, so we only need half of it to apply to the top.
94
+ // This means the font renders a bit lower in the browser, but achieves PDF alignment
95
+ const topAdjustment = (fontBaseLineHeight * fontSize - fontSize) / 2;
96
+ if (verticalAlignment === constants_1.VERTICAL_ALIGN_TOP) {
97
+ return { topAdj: (0, helper_1.pt2px)(topAdjustment), bottomAdj: 0 };
98
+ }
99
+ // For vertical alignment bottom and middle
100
+ // When browsers render text in a non-form element (such as a <div>), some of the text may be
101
+ // lowered below and outside the containing element if the line height used is less than
102
+ // the base line-height of the font.
103
+ // This behaviour does not happen in a <textarea> though, so we need to adjust the positioning
104
+ // for consistency between editing and viewing to stop text jumping up and down.
105
+ // This portion of text is half of the difference between the base line height and the used
106
+ // line height. If using the same or higher line-height than the base font, then line-height
107
+ // takes over in the browser and this adjustment is not needed.
108
+ // Unlike the top adjustment - this is only driven by browser behaviour, not PDF alignment.
109
+ let bottomAdjustment = 0;
110
+ if (lineHeight < fontBaseLineHeight) {
111
+ bottomAdjustment = ((fontBaseLineHeight - lineHeight) * fontSize) / 2;
112
+ }
113
+ return { topAdj: 0, bottomAdj: (0, helper_1.pt2px)(bottomAdjustment) };
95
114
  };
96
- exports.getFontAlignmentValue = getFontAlignmentValue;
115
+ exports.getBrowserVerticalFontAdjustments = getBrowserVerticalFontAdjustments;
116
+ const getFontDescentInPt = (fontKitFont, fontSize) => {
117
+ const { descent, unitsPerEm } = fontKitFont;
118
+ return (descent / unitsPerEm) * fontSize;
119
+ };
120
+ exports.getFontDescentInPt = getFontDescentInPt;
97
121
  const heightOfFontAtSize = (fontKitFont, fontSize) => {
98
122
  const { ascent, descent, bbox, unitsPerEm } = fontKitFont;
99
123
  const scale = 1000 / unitsPerEm;
@@ -104,29 +128,17 @@ const heightOfFontAtSize = (fontKitFont, fontSize) => {
104
128
  return (height / 1000) * fontSize;
105
129
  };
106
130
  exports.heightOfFontAtSize = heightOfFontAtSize;
107
- const widthOfTextAtSize = (input, fontKitFont, fontSize) => {
108
- const { glyphs } = fontKitFont.layout(input);
109
- const scale = 1000 / fontKitFont.unitsPerEm;
110
- return glyphs.reduce((totalWidth, glyph) => totalWidth + glyph.advanceWidth * scale, 0) * (fontSize / 1000);
111
- };
112
131
  const calculateCharacterSpacing = (textContent, textCharacterSpacing) => {
113
- const numberOfCharacters = textContent.length;
114
- return (numberOfCharacters - 1) * textCharacterSpacing;
132
+ return (textContent.length - 1) * textCharacterSpacing;
115
133
  };
116
- const calculateTextWidthInMm = (textContent, textWidth, textCharacterSpacing) => (textWidth + calculateCharacterSpacing(textContent, textCharacterSpacing)) * constants_1.DEFAULT_PT_TO_MM_RATIO;
117
- const getLongestLine = (textContentRows, fontKitFont, fontSize, characterSpacingCount) => {
118
- let longestLine = '';
119
- let maxLineWidth = 0;
120
- textContentRows.forEach((line) => {
121
- const textWidth = widthOfTextAtSize(line, fontKitFont, fontSize);
122
- const lineWidth = calculateTextWidthInMm(line, textWidth, characterSpacingCount);
123
- if (lineWidth > maxLineWidth) {
124
- longestLine = line;
125
- maxLineWidth = lineWidth;
126
- }
127
- });
128
- return longestLine;
134
+ const widthOfTextAtSize = (text, fontKitFont, fontSize, characterSpacing) => {
135
+ const { glyphs } = fontKitFont.layout(text);
136
+ const scale = 1000 / fontKitFont.unitsPerEm;
137
+ const standardWidth = glyphs.reduce((totalWidth, glyph) => totalWidth + glyph.advanceWidth * scale, 0) *
138
+ (fontSize / 1000);
139
+ return standardWidth + calculateCharacterSpacing(text, characterSpacing);
129
140
  };
141
+ exports.widthOfTextAtSize = widthOfTextAtSize;
130
142
  const fontKitFontCache = {};
131
143
  const getFontKitFont = (textSchema, font) => __awaiter(void 0, void 0, void 0, function* () {
132
144
  const fontName = textSchema.fontName || (0, exports.getFallbackFontName)(font);
@@ -143,28 +155,148 @@ const getFontKitFont = (textSchema, font) => __awaiter(void 0, void 0, void 0, f
143
155
  return fontKitFont;
144
156
  });
145
157
  exports.getFontKitFont = getFontKitFont;
146
- const getTextContent = (input, fontKitFont, fontSize, characterSpacingCount) => {
147
- const textContentRows = input.split('\n');
148
- return textContentRows.length > 1 ? getLongestLine(textContentRows, fontKitFont, fontSize, characterSpacingCount) : input;
158
+ const isTextExceedingBoxWidth = (text, calcValues) => {
159
+ const { font, fontSize, characterSpacing, boxWidthInPt } = calcValues;
160
+ const textWidth = (0, exports.widthOfTextAtSize)(text, font, fontSize, characterSpacing);
161
+ return textWidth > boxWidthInPt;
162
+ };
163
+ /**
164
+ * Incrementally checks the current line for its real length
165
+ * and returns the position where it exceeds the box width.
166
+ * Returns `null` to indicate if textLine is shorter than the available box.
167
+ */
168
+ const getOverPosition = (textLine, calcValues) => {
169
+ for (let i = 0; i <= textLine.length; i++) {
170
+ if (isTextExceedingBoxWidth(textLine.slice(0, i + 1), calcValues)) {
171
+ return i;
172
+ }
173
+ }
174
+ return null;
175
+ };
176
+ /**
177
+ * Gets the position of the split. Splits the exceeding line at
178
+ * the last whitespace prior to it exceeding the bounding box width.
179
+ */
180
+ const getSplitPosition = (textLine, calcValues) => {
181
+ const overPos = getOverPosition(textLine, calcValues);
182
+ if (overPos === null)
183
+ return textLine.length; // input line is shorter than the available space
184
+ let overPosTmp = overPos;
185
+ while (textLine[overPosTmp] !== ' ' && overPosTmp >= 0) {
186
+ overPosTmp--;
187
+ }
188
+ // For very long lines with no whitespace use the original overPos
189
+ return overPosTmp > 0 ? overPosTmp : overPos;
149
190
  };
150
- const calculateDynamicFontSize = ({ textSchema, font, input }) => __awaiter(void 0, void 0, void 0, function* () {
151
- const { fontSize: _fontSize, dynamicFontSize: dynamicFontSizeSetting, characterSpacing, width } = textSchema;
152
- const fontSize = _fontSize || constants_1.DEFAULT_FONT_SIZE;
191
+ /**
192
+ * Recursively splits the line at getSplitPosition.
193
+ * If there is some leftover, split the rest again in the same manner.
194
+ */
195
+ const getSplittedLines = (textLine, calcValues) => {
196
+ const splitPos = getSplitPosition(textLine, calcValues);
197
+ const splittedLine = textLine.substring(0, splitPos);
198
+ const rest = textLine.substring(splitPos).trimStart();
199
+ if (rest === textLine) {
200
+ // if we went so small that we want to split on the first char
201
+ // then end recursion to avoid infinite loop
202
+ return [textLine];
203
+ }
204
+ if (rest.length === 0) {
205
+ // end recursion if there is no leftover
206
+ return [splittedLine];
207
+ }
208
+ return [splittedLine, ...(0, exports.getSplittedLines)(rest, calcValues)];
209
+ };
210
+ exports.getSplittedLines = getSplittedLines;
211
+ /**
212
+ * If using dynamic font size, iteratively increment or decrement the
213
+ * font size to fit the containing box.
214
+ * Calculating space usage involves splitting lines where they exceed
215
+ * the box width based on the proposed size.
216
+ */
217
+ const calculateDynamicFontSize = ({ textSchema, font, input, startingFontSize, }) => __awaiter(void 0, void 0, void 0, function* () {
218
+ var _a;
219
+ const { fontSize: schemaFontSize, dynamicFontSize: dynamicFontSizeSetting, characterSpacing: schemaCharacterSpacing, width: boxWidth, height: boxHeight, lineHeight = constants_1.DEFAULT_LINE_HEIGHT, } = textSchema;
220
+ const fontSize = startingFontSize || schemaFontSize || constants_1.DEFAULT_FONT_SIZE;
153
221
  if (!dynamicFontSizeSetting)
154
222
  return fontSize;
155
- const characterSpacingCount = characterSpacing !== null && characterSpacing !== void 0 ? characterSpacing : constants_1.DEFAULT_CHARACTER_SPACING;
223
+ if (dynamicFontSizeSetting.max < dynamicFontSizeSetting.min)
224
+ return fontSize;
225
+ const characterSpacing = schemaCharacterSpacing !== null && schemaCharacterSpacing !== void 0 ? schemaCharacterSpacing : constants_1.DEFAULT_CHARACTER_SPACING;
156
226
  const fontKitFont = yield (0, exports.getFontKitFont)(textSchema, font);
157
- const textContent = getTextContent(input, fontKitFont, fontSize, characterSpacingCount);
158
- const textWidth = widthOfTextAtSize(textContent, fontKitFont, fontSize);
227
+ const textContentRows = input.split('\n');
159
228
  let dynamicFontSize = fontSize;
160
- let textWidthInMm = calculateTextWidthInMm(textContent, textWidth, characterSpacingCount);
161
- while (textWidthInMm > width - constants_1.DEFAULT_TOLERANCE && dynamicFontSize > dynamicFontSizeSetting.min) {
162
- dynamicFontSize -= constants_1.DEFAULT_FONT_SIZE_ADJUSTMENT;
163
- textWidthInMm = calculateTextWidthInMm(textContent, widthOfTextAtSize(textContent, fontKitFont, dynamicFontSize), characterSpacingCount);
164
- }
165
- while (textWidthInMm < width - constants_1.DEFAULT_TOLERANCE && dynamicFontSize < dynamicFontSizeSetting.max) {
166
- dynamicFontSize += constants_1.DEFAULT_FONT_SIZE_ADJUSTMENT;
167
- textWidthInMm = calculateTextWidthInMm(textContent, widthOfTextAtSize(textContent, fontKitFont, dynamicFontSize), characterSpacingCount);
229
+ if (dynamicFontSize < dynamicFontSizeSetting.min) {
230
+ dynamicFontSize = dynamicFontSizeSetting.min;
231
+ }
232
+ else if (dynamicFontSize > dynamicFontSizeSetting.max) {
233
+ dynamicFontSize = dynamicFontSizeSetting.max;
234
+ }
235
+ const dynamicFontFit = (_a = dynamicFontSizeSetting.fit) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_DYNAMIC_FIT;
236
+ const calculateConstraints = (size) => {
237
+ let totalWidthInMm = 0;
238
+ let totalHeightInMm = 0;
239
+ const boxWidthInPt = (0, helper_1.mm2pt)(boxWidth);
240
+ const textHeight = (0, exports.heightOfFontAtSize)(fontKitFont, size);
241
+ const textHeightInMm = (0, helper_1.pt2mm)(textHeight * lineHeight);
242
+ textContentRows.forEach((paragraph) => {
243
+ const lines = (0, exports.getSplittedLines)(paragraph, {
244
+ font: fontKitFont,
245
+ fontSize: size,
246
+ characterSpacing,
247
+ boxWidthInPt,
248
+ });
249
+ lines.forEach((line) => {
250
+ if (dynamicFontFit === constants_1.DYNAMIC_FIT_VERTICAL) {
251
+ // For vertical fit we want to consider the width of text lines where we detect a split
252
+ const textWidth = (0, exports.widthOfTextAtSize)(line, fontKitFont, size, characterSpacing);
253
+ const textWidthInMm = (0, helper_1.pt2mm)(textWidth);
254
+ totalWidthInMm = Math.max(totalWidthInMm, textWidthInMm);
255
+ }
256
+ totalHeightInMm += textHeightInMm;
257
+ });
258
+ if (dynamicFontFit === constants_1.DYNAMIC_FIT_HORIZONTAL) {
259
+ // For horizontal fit we want to consider the line's width 'unsplit'
260
+ const textWidth = (0, exports.widthOfTextAtSize)(paragraph, fontKitFont, size, characterSpacing);
261
+ const textWidthInMm = (0, helper_1.pt2mm)(textWidth);
262
+ totalWidthInMm = Math.max(totalWidthInMm, textWidthInMm);
263
+ }
264
+ });
265
+ return { totalWidthInMm, totalHeightInMm };
266
+ };
267
+ const shouldFontGrowToFit = (totalWidthInMm, totalHeightInMm) => {
268
+ if (dynamicFontSize >= dynamicFontSizeSetting.max) {
269
+ return false;
270
+ }
271
+ if (dynamicFontFit === constants_1.DYNAMIC_FIT_HORIZONTAL) {
272
+ return totalWidthInMm < boxWidth;
273
+ }
274
+ return totalHeightInMm < boxHeight;
275
+ };
276
+ const shouldFontShrinkToFit = (totalWidthInMm, totalHeightInMm) => {
277
+ if (dynamicFontSize <= dynamicFontSizeSetting.min || dynamicFontSize <= 0) {
278
+ return false;
279
+ }
280
+ return totalWidthInMm > boxWidth || totalHeightInMm > boxHeight;
281
+ };
282
+ let { totalWidthInMm, totalHeightInMm } = calculateConstraints(dynamicFontSize);
283
+ // Attempt to increase the font size up to desired fit
284
+ while (shouldFontGrowToFit(totalWidthInMm, totalHeightInMm)) {
285
+ dynamicFontSize += constants_1.FONT_SIZE_ADJUSTMENT;
286
+ const { totalWidthInMm: newWidth, totalHeightInMm: newHeight } = calculateConstraints(dynamicFontSize);
287
+ if (newHeight < boxHeight) {
288
+ totalWidthInMm = newWidth;
289
+ totalHeightInMm = newHeight;
290
+ }
291
+ else {
292
+ dynamicFontSize -= constants_1.FONT_SIZE_ADJUSTMENT;
293
+ break;
294
+ }
295
+ }
296
+ // Attempt to decrease the font size down to desired fit
297
+ while (shouldFontShrinkToFit(totalWidthInMm, totalHeightInMm)) {
298
+ dynamicFontSize -= constants_1.FONT_SIZE_ADJUSTMENT;
299
+ ({ totalWidthInMm, totalHeightInMm } = calculateConstraints(dynamicFontSize));
168
300
  }
169
301
  return dynamicFontSize;
170
302
  });
@@ -1 +1 @@
1
- {"version":3,"file":"font.js","sourceRoot":"","sources":["../../../src/font.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAEnC,iCAA0E;AAC1E,mCAAgC;AAChC,2CASqB;AACrB,wBAAmC;AAE5B,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,GAAG,CAAC;QAElC,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,KAAK,OAAO,EAAE;QAChC,MAAM,KAAK,CAAC,0EAA0E,CAAC,CAAC;KACzF;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B;AAEF,MAAM,eAAe,GAAG,CAAC,IAAU,EAAE,EAAE;IACrC,MAAM,gBAAgB,GAAG,IAAA,2BAAmB,EAAC,IAAI,CAAC,CAAC;IACnD,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC;AAChC,CAAC,CAAA;AAEM,MAAM,cAAc,GAAG,GAAS,EAAE,CAAC,CAAC;IACzC,CAAC,6BAAiB,CAAC,EAAE,EAAE,IAAI,EAAE,IAAA,kBAAe,EAAC,8BAAkB,CAAC,EAAE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xC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC;QAEvG,IAAI,SAAS,GAAG,SAAS,EAAE;YACzB,cAAc,GAAG,QAAQ,CAAC;YAC1B,eAAe,GAAG,SAAS,CAAC;SAC7B;aAAM;YACL,eAAe,IAAI,gCAAoB,CAAC;YACxC,MAAM;SACP;KACF;IAED,wDAAwD;IACxD,OAAO,qBAAqB,CAAC,cAAc,EAAE,eAAe,CAAC,EAAE;QAC7D,eAAe,IAAI,gCAAoB,CAAC;QACxC,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC;KAC/E;IAED,OAAO,eAAe,CAAC;AACzB,CAAC,CAAA,CAAC;AA/GW,QAAA,wBAAwB,4BA+GnC"}
@@ -1,10 +1,23 @@
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 = void 0;
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;
4
4
  const zod_1 = require("zod");
5
5
  const buffer_1 = require("buffer");
6
6
  const schema_1 = require("./schema");
7
+ const constants_1 = require("./constants");
7
8
  const font_1 = require("./font");
9
+ const mm2pt = (mm) => {
10
+ return parseFloat(String(mm)) * constants_1.MM_TO_PT_RATIO;
11
+ };
12
+ exports.mm2pt = mm2pt;
13
+ const pt2mm = (pt) => {
14
+ return pt * constants_1.PT_TO_MM_RATIO;
15
+ };
16
+ exports.pt2mm = pt2mm;
17
+ const pt2px = (pt) => {
18
+ return pt * constants_1.PT_TO_PX_RATIO;
19
+ };
20
+ exports.pt2px = pt2px;
8
21
  const blob2Base64Pdf = (blob) => {
9
22
  return new Promise((resolve, reject) => {
10
23
  const reader = new FileReader();
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/helper.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mCAAgC;AAEhC,qCAQkB;AAClB,iCAAkC;AAElC,MAAM,cAAc,GAAG,CAAC,IAAU,EAAE,EAAE;IACpC,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAChC,MAAM,CAAC,SAAS,GAAG,GAAG,EAAE;YACtB,IAAK,MAAM,CAAC,MAAiB,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE;gBACjE,OAAO,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC;aAClC;iBAAM;gBACL,MAAM,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC;aACrD;QACH,CAAC,CAAC;QACF,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,MAAM,aAAa,GAAG,CAAC,OAAgB,EAAE,EAAE;IAChD,MAAM,oBAAoB,GACxB,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAC9E,IAAI,oBAAoB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACzD,OAAO,KAAK,CAAC,OAAO,CAAC;aAClB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACzB,IAAI,CAAC,cAAc,CAAC;aACpB,KAAK,CAAC,CAAC,CAAQ,EAAE,EAAE;YAClB,MAAM,CAAC,CAA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OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAjFW,QAAA,oBAAoB,wBAiF/B"}
@@ -1,17 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.calculateDynamicFontSize = exports.validateBarcodeInput = exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.getFontAlignmentValue = exports.getFontKitFont = exports.checkFont = exports.heightOfFontAtSize = exports.getDefaultFont = exports.getFallbackFontName = exports.b64toUint8Array = exports.getB64BasePdf = exports.isBarcodeSchema = exports.isImageSchema = exports.isTextSchema = exports.schemaTypes = exports.DEFAULT_FONT_VALUE = exports.BLANK_PDF = exports.DEFAULT_PT_TO_PX_RATIO = exports.DEFAULT_PT_TO_MM_RATIO = exports.DEFAULT_FONT_SIZE_ADJUSTMENT = exports.DEFAULT_TOLERANCE = exports.DEFAULT_FONT_COLOR = exports.DEFAULT_CHARACTER_SPACING = exports.DEFAULT_LINE_HEIGHT = exports.DEFAULT_ALIGNMENT = exports.DEFAULT_FONT_SIZE = exports.DEFAULT_FONT_NAME = void 0;
3
+ 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_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;
4
4
  const constants_js_1 = require("./constants.js");
5
5
  Object.defineProperty(exports, "DEFAULT_FONT_NAME", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_NAME; } });
6
6
  Object.defineProperty(exports, "DEFAULT_FONT_SIZE", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_SIZE; } });
7
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; } });
8
12
  Object.defineProperty(exports, "DEFAULT_LINE_HEIGHT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_LINE_HEIGHT; } });
9
13
  Object.defineProperty(exports, "DEFAULT_CHARACTER_SPACING", { enumerable: true, get: function () { return constants_js_1.DEFAULT_CHARACTER_SPACING; } });
10
14
  Object.defineProperty(exports, "DEFAULT_FONT_COLOR", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_COLOR; } });
11
- Object.defineProperty(exports, "DEFAULT_TOLERANCE", { enumerable: true, get: function () { return constants_js_1.DEFAULT_TOLERANCE; } });
12
- Object.defineProperty(exports, "DEFAULT_FONT_SIZE_ADJUSTMENT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_SIZE_ADJUSTMENT; } });
13
- Object.defineProperty(exports, "DEFAULT_PT_TO_MM_RATIO", { enumerable: true, get: function () { return constants_js_1.DEFAULT_PT_TO_MM_RATIO; } });
14
- Object.defineProperty(exports, "DEFAULT_PT_TO_PX_RATIO", { enumerable: true, get: function () { return constants_js_1.DEFAULT_PT_TO_PX_RATIO; } });
15
+ Object.defineProperty(exports, "DYNAMIC_FIT_VERTICAL", { enumerable: true, get: function () { return constants_js_1.DYNAMIC_FIT_VERTICAL; } });
16
+ Object.defineProperty(exports, "DYNAMIC_FIT_HORIZONTAL", { enumerable: true, get: function () { return constants_js_1.DYNAMIC_FIT_HORIZONTAL; } });
17
+ Object.defineProperty(exports, "DEFAULT_DYNAMIC_FIT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_DYNAMIC_FIT; } });
18
+ Object.defineProperty(exports, "FONT_SIZE_ADJUSTMENT", { enumerable: true, get: function () { return constants_js_1.FONT_SIZE_ADJUSTMENT; } });
19
+ Object.defineProperty(exports, "MM_TO_PT_RATIO", { enumerable: true, get: function () { return constants_js_1.MM_TO_PT_RATIO; } });
20
+ Object.defineProperty(exports, "PT_TO_MM_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_MM_RATIO; } });
21
+ Object.defineProperty(exports, "PT_TO_PX_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_PX_RATIO; } });
15
22
  Object.defineProperty(exports, "BLANK_PDF", { enumerable: true, get: function () { return constants_js_1.BLANK_PDF; } });
16
23
  Object.defineProperty(exports, "DEFAULT_FONT_VALUE", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_VALUE; } });
17
24
  const type_js_1 = require("./type.js");
@@ -29,13 +36,18 @@ Object.defineProperty(exports, "checkUIProps", { enumerable: true, get: function
29
36
  Object.defineProperty(exports, "checkPreviewProps", { enumerable: true, get: function () { return helper_js_1.checkPreviewProps; } });
30
37
  Object.defineProperty(exports, "checkDesignerProps", { enumerable: true, get: function () { return helper_js_1.checkDesignerProps; } });
31
38
  Object.defineProperty(exports, "checkGenerateProps", { enumerable: true, get: function () { return helper_js_1.checkGenerateProps; } });
39
+ Object.defineProperty(exports, "mm2pt", { enumerable: true, get: function () { return helper_js_1.mm2pt; } });
40
+ Object.defineProperty(exports, "pt2px", { enumerable: true, get: function () { return helper_js_1.pt2px; } });
32
41
  Object.defineProperty(exports, "validateBarcodeInput", { enumerable: true, get: function () { return helper_js_1.validateBarcodeInput; } });
33
42
  const font_js_1 = require("./font.js");
34
43
  Object.defineProperty(exports, "calculateDynamicFontSize", { enumerable: true, get: function () { return font_js_1.calculateDynamicFontSize; } });
35
44
  Object.defineProperty(exports, "getFallbackFontName", { enumerable: true, get: function () { return font_js_1.getFallbackFontName; } });
36
45
  Object.defineProperty(exports, "getDefaultFont", { enumerable: true, get: function () { return font_js_1.getDefaultFont; } });
37
46
  Object.defineProperty(exports, "heightOfFontAtSize", { enumerable: true, get: function () { return font_js_1.heightOfFontAtSize; } });
47
+ Object.defineProperty(exports, "widthOfTextAtSize", { enumerable: true, get: function () { return font_js_1.widthOfTextAtSize; } });
38
48
  Object.defineProperty(exports, "checkFont", { enumerable: true, get: function () { return font_js_1.checkFont; } });
39
49
  Object.defineProperty(exports, "getFontKitFont", { enumerable: true, get: function () { return font_js_1.getFontKitFont; } });
40
- Object.defineProperty(exports, "getFontAlignmentValue", { enumerable: true, get: function () { return font_js_1.getFontAlignmentValue; } });
50
+ Object.defineProperty(exports, "getBrowserVerticalFontAdjustments", { enumerable: true, get: function () { return font_js_1.getBrowserVerticalFontAdjustments; } });
51
+ Object.defineProperty(exports, "getFontDescentInPt", { enumerable: true, get: function () { return font_js_1.getFontDescentInPt; } });
52
+ Object.defineProperty(exports, "getSplittedLines", { enumerable: true, get: function () { return font_js_1.getSplittedLines; } });
41
53
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAawB;AAiDtB,kGA7DA,gCAAiB,OA6DA;AACjB,kGA7DA,gCAAiB,OA6DA;AACjB,kGA7DA,gCAAiB,OA6DA;AACjB,oGA7DA,kCAAmB,OA6DA;AACnB,0GA7DA,wCAAyB,OA6DA;AACzB,mGA7DA,iCAAkB,OA6DA;AAClB,kGA7DA,gCAAiB,OA6DA;AACjB,6GA7DA,2CAA4B,OA6DA;AAC5B,uGA7DA,qCAAsB,OA6DA;AACtB,uGA7DA,qCAAsB,OA6DA;AACtB,0FA7DA,wBAAS,OA6DA;AACT,mGA7DA,iCAAkB,OA6DA;AA3DpB,uCAAsF;AA4DpF,4FA5DO,qBAAW,OA4DP;AAEX,8FA9DoB,uBAAa,OA8DpB;AACb,gGA/DmC,yBAAe,OA+DnC;AAFf,6FA7DoD,sBAAY,OA6DpD;AAnCd,2CAWqB;AA2BnB,8FArCA,yBAAa,OAqCA;AACb,gGArCA,2BAAe,OAqCA;AAOf,4FA3CA,uBAAW,OA2CA;AACX,+FA3CA,0BAAc,OA2CA;AACd,8FA3CA,yBAAa,OA2CA;AACb,6FA3CA,wBAAY,OA2CA;AACZ,kGA3CA,6BAAiB,OA2CA;AACjB,mGA3CA,8BAAkB,OA2CA;AAClB,mGA3CA,8BAAkB,OA2CA;AAClB,qGA3CA,gCAAoB,OA2CA;AAzCtB,uCAOmB;AAmCjB,yGAzCA,kCAAwB,OAyCA;AAdxB,oGA3B0B,6BAAmB,OA2B1B;AACnB,+FA3BA,wBAAc,OA2BA;AACd,mGA3BA,4BAAkB,OA2BA;AAClB,0FA3BA,mBAAS,OA2BA;AACT,+FA3BA,wBAAc,OA2BA;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;AAnBxB,oGArCA,6BAAmB,OAqCA;AACnB,+FArCA,wBAAc,OAqCA;AAEd,mGAtCA,4BAAkB,OAsCA;AAClB,kGAtCA,2BAAiB,OAsCA;AAGjB,0FAxCA,mBAAS,OAwCA;AAGT,+FA1CA,wBAAc,OA0CA;AAFd,kHAvCA,2CAAiC,OAuCA;AACjC,mGAvCA,4BAAkB,OAuCA;AAPlB,iGA/BA,0BAAgB,OA+BA"}
@@ -1,13 +1,20 @@
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.Alignment = exports.Size = exports.Lang = void 0;
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
4
  /* eslint dot-notation: "off"*/
5
5
  const zod_1 = require("zod");
6
+ const constants_1 = require("./constants");
6
7
  const langs = ['en', 'ja', 'ar', 'th', 'pl'];
7
8
  exports.Lang = zod_1.z.enum(langs);
8
9
  exports.Size = zod_1.z.object({ height: zod_1.z.number(), width: zod_1.z.number() });
9
10
  const alignments = ['left', 'center', 'right'];
10
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);
11
18
  // prettier-ignore
12
19
  exports.barcodeSchemaTypes = ['qrcode', 'japanpost', 'ean13', 'ean8', 'code39', 'code128', 'nw7', 'itf14', 'upca', 'upce', 'gs1datamatrix'];
13
20
  const notBarcodeSchemaTypes = ['text', 'image'];
@@ -24,6 +31,7 @@ exports.CommonSchema = zod_1.z.object({
24
31
  exports.TextSchema = exports.CommonSchema.extend({
25
32
  type: zod_1.z.literal(exports.SchemaType.Enum.text),
26
33
  alignment: exports.Alignment.optional(),
34
+ verticalAlignment: exports.VerticalAlignment.optional(),
27
35
  fontSize: zod_1.z.number().optional(),
28
36
  fontName: zod_1.z.string().optional(),
29
37
  fontColor: zod_1.z.string().optional(),
@@ -33,6 +41,7 @@ exports.TextSchema = exports.CommonSchema.extend({
33
41
  dynamicFontSize: zod_1.z.object({
34
42
  max: zod_1.z.number(),
35
43
  min: zod_1.z.number(),
44
+ fit: zod_1.z.string().optional(),
36
45
  }).optional(),
37
46
  });
38
47
  exports.ImageSchema = exports.CommonSchema.extend({ type: zod_1.z.literal(exports.SchemaType.Enum.image) });
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,6BAAwB;AAExB,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AACzC,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,EA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AC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC;AAAhF,QAAA,aAAa,iBAAmE;AACtF,MAAM,eAAe,GAAG,CAAC,GAAiB,EAAwB,EAAE,CACzE,8BAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAW,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AADnD,QAAA,eAAe,mBACoC"}
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/type.ts"],"names":[],"mappings":";;;AAGA,2CA2BqB;AAUR,QAAA,WAAW,GAAG,uBAAY,CAAC;AACjC,MAAM,YAAY,GAAG,CAAC,GAAiB,EAAqB,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;AAA7E,QAAA,YAAY,gBAAiE;AACnF,MAAM,aAAa,GAAG,CAAC,GAAiB,EAAsB,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC;AAAhF,QAAA,aAAa,iBAAmE;AACtF,MAAM,eAAe,GAAG,CAAC,GAAiB,EAAwB,EAAE,CACzE,8BAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAW,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AADnD,QAAA,eAAe,mBACoC"}