@pdfme/common 1.1.10 → 1.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 (40) hide show
  1. package/dist/cjs/__tests__/calculateDynamicFontSize.test.js +97 -0
  2. package/dist/cjs/__tests__/calculateDynamicFontSize.test.js.map +1 -0
  3. package/dist/cjs/src/calculateDynamicFontSize.js +103 -0
  4. package/dist/cjs/src/calculateDynamicFontSize.js.map +1 -0
  5. package/dist/cjs/src/constants.js +6 -2
  6. package/dist/cjs/src/constants.js.map +1 -1
  7. package/dist/cjs/src/helper.js +3 -10
  8. package/dist/cjs/src/helper.js.map +1 -1
  9. package/dist/cjs/src/index.js +8 -2
  10. package/dist/cjs/src/index.js.map +1 -1
  11. package/dist/cjs/src/schema.js +11 -6
  12. package/dist/cjs/src/schema.js.map +1 -1
  13. package/dist/cjs/src/type.js.map +1 -1
  14. package/dist/esm/__tests__/calculateDynamicFontSize.test.js +72 -0
  15. package/dist/esm/__tests__/calculateDynamicFontSize.test.js.map +1 -0
  16. package/dist/esm/src/calculateDynamicFontSize.js +76 -0
  17. package/dist/esm/src/calculateDynamicFontSize.js.map +1 -0
  18. package/dist/esm/src/constants.js +5 -1
  19. package/dist/esm/src/constants.js.map +1 -1
  20. package/dist/esm/src/helper.js +4 -11
  21. package/dist/esm/src/helper.js.map +1 -1
  22. package/dist/esm/src/index.js +3 -2
  23. package/dist/esm/src/index.js.map +1 -1
  24. package/dist/esm/src/schema.js +10 -5
  25. package/dist/esm/src/schema.js.map +1 -1
  26. package/dist/esm/src/type.js.map +1 -1
  27. package/dist/types/__tests__/calculateDynamicFontSize.test.d.ts +1 -0
  28. package/dist/types/src/calculateDynamicFontSize.d.ts +6 -0
  29. package/dist/types/src/constants.d.ts +5 -1
  30. package/dist/types/src/index.d.ts +5 -4
  31. package/dist/types/src/schema.d.ts +386 -43
  32. package/dist/types/src/type.d.ts +6 -1
  33. package/package.json +7 -2
  34. package/src/calculateDynamicFontSize.ts +101 -0
  35. package/src/constants.ts +6 -2
  36. package/src/helper.ts +4 -11
  37. package/src/index.ts +14 -2
  38. package/src/schema.ts +12 -5
  39. package/src/type.ts +2 -0
  40. package/tsconfig.json +6 -0
@@ -1,6 +1,7 @@
1
- import { DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, BLANK_PDF, HELVETICA } from './constants.js';
1
+ import { DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, DEFAULT_TOLERANCE, DEFAULT_FONT_SIZE_ADJUSTMENT, DEFAULT_PT_TO_MM_RATIO, BLANK_PDF, DEFAULT_FONT_VALUE } from './constants.js';
2
2
  import { schemaTypes, isImageSchema, isBarcodeSchema, isTextSchema } from './type.js';
3
- import type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, PreviewReactProps, DesignerProps, DesignerReactProps } from './type.js';
3
+ import type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaInputs, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, PreviewReactProps, DesignerProps, DesignerReactProps } from './type.js';
4
4
  import { getB64BasePdf, b64toUint8Array, getFallbackFontName, getDefaultFont, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput } from './helper.js';
5
- export { DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, BLANK_PDF, HELVETICA, schemaTypes, isTextSchema, isImageSchema, isBarcodeSchema, getB64BasePdf, b64toUint8Array, getFallbackFontName, getDefaultFont, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, };
6
- export type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, PreviewReactProps, DesignerProps, DesignerReactProps, };
5
+ import { calculateDynamicFontSize } from './calculateDynamicFontSize.js';
6
+ export { DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, DEFAULT_TOLERANCE, DEFAULT_FONT_SIZE_ADJUSTMENT, DEFAULT_PT_TO_MM_RATIO, BLANK_PDF, DEFAULT_FONT_VALUE, schemaTypes, isTextSchema, isImageSchema, isBarcodeSchema, getB64BasePdf, b64toUint8Array, getFallbackFontName, getDefaultFont, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, calculateDynamicFontSize, };
7
+ export type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaInputs, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, PreviewReactProps, DesignerProps, DesignerReactProps, };