@campxdev/pdfme 1.2.2 → 1.3.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 (46) hide show
  1. package/dist/cjs/chunks/{index-C8qZMUOU.js → fontSizePxWidget-Dmj19RJR.js} +138 -9
  2. package/dist/cjs/chunks/fontSizeTransform-CQQ_O42f.js +37 -0
  3. package/dist/cjs/chunks/{helper-BfoMn47R.js → helper-DGH62Z2s.js} +4 -0
  4. package/dist/cjs/chunks/{index-CVqJfcgy.js → index-BGO0T6u7.js} +743 -597
  5. package/dist/cjs/chunks/{index-COKtXyPp.js → index-CoNR0xQU.js} +6 -2
  6. package/dist/cjs/chunks/{pluginRegistry-C8bMreez.js → pluginRegistry-D2vr9MUy.js} +1 -1
  7. package/dist/cjs/common.js +7 -3
  8. package/dist/cjs/converter.js +1 -1
  9. package/dist/cjs/generator.js +3 -3
  10. package/dist/cjs/index.js +23 -16
  11. package/dist/cjs/print-designer-editor.js +3320 -3296
  12. package/dist/cjs/schemas.js +500 -38
  13. package/dist/cjs/ui.js +2031 -1887
  14. package/dist/esm/chunks/{index-C4F7EwBG.js → fontSizePxWidget-BHHixwEk.js} +130 -5
  15. package/dist/esm/chunks/fontSizeTransform-CkTVJdRF.js +34 -0
  16. package/dist/esm/chunks/{helper-D5PPN6Bv.js → helper-DSxGxZ0j.js} +4 -1
  17. package/dist/esm/chunks/{index-CDhErAtE.js → index-DJkUkUo9.js} +4 -3
  18. package/dist/esm/chunks/{index-C7jr4GIK.js → index-iZeHwQ5z.js} +737 -594
  19. package/dist/esm/chunks/{pluginRegistry-B-XSNgmK.js → pluginRegistry-Bgrz5qWG.js} +1 -1
  20. package/dist/esm/common.js +4 -3
  21. package/dist/esm/converter.js +1 -1
  22. package/dist/esm/generator.js +3 -3
  23. package/dist/esm/index.js +7 -6
  24. package/dist/esm/print-designer-editor.js +3307 -3286
  25. package/dist/esm/schemas.js +472 -13
  26. package/dist/esm/ui.js +2031 -1887
  27. package/dist/types/_vendors/common/fontSizeTransform.d.ts +5 -0
  28. package/dist/types/_vendors/common/helper.d.ts +1 -0
  29. package/dist/types/_vendors/common/index.d.ts +3 -2
  30. package/dist/types/_vendors/print-designer-editor/index.d.ts +2 -1
  31. package/dist/types/_vendors/print-designer-editor/types.d.ts +2 -1
  32. package/dist/types/_vendors/print-designer-editor/useDesigner.d.ts +1 -1
  33. package/dist/types/_vendors/schemas/index.d.ts +8 -2
  34. package/dist/types/_vendors/schemas/richText/helper.d.ts +3 -0
  35. package/dist/types/_vendors/schemas/richText/index.d.ts +4 -0
  36. package/dist/types/_vendors/schemas/richText/pdfRender.d.ts +3 -0
  37. package/dist/types/_vendors/schemas/richText/propPanel.d.ts +3 -0
  38. package/dist/types/_vendors/schemas/richText/types.d.ts +7 -0
  39. package/dist/types/_vendors/schemas/richText/uiRender.d.ts +3 -0
  40. package/dist/types/_vendors/schemas/singleVariableText/index.d.ts +4 -0
  41. package/dist/types/_vendors/schemas/singleVariableText/propPanel.d.ts +3 -0
  42. package/dist/types/_vendors/schemas/singleVariableText/types.d.ts +4 -0
  43. package/dist/types/_vendors/schemas/text/fontSizePxWidget.d.ts +9 -0
  44. package/dist/types/_vendors/ui/components/CtlBar.d.ts +1 -1
  45. package/dist/types/_vendors/ui/components/Paper.d.ts +1 -0
  46. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { v as isBlankPdf, l as cloneDeep } from './helper-D5PPN6Bv.js';
1
+ import { v as isBlankPdf, l as cloneDeep } from './helper-DSxGxZ0j.js';
2
2
 
3
3
  /** Floating point tolerance for comparisons */
4
4
  const EPSILON = 0.01;
@@ -1,7 +1,8 @@
1
- export { B as BLANK_A4_PDF, a as BLANK_PDF, C as CUSTOM_A4_PDF, D as DEFAULT_FONT_NAME, M as MM_TO_PT_RATIO, P as PT_TO_MM_RATIO, b as PT_TO_PX_RATIO, Z as ZOOM, c as b64toUint8Array, d as checkDesignerProps, e as checkFont, f as checkGenerateProps, g as checkInputs, h as checkPreviewProps, i as checkTemplate, j as checkUIOptions, k as checkUIProps, l as cloneDeep, m as getAllFonts, n as getAllFontsWithGoogle, o as getB64BasePdf, p as getBuiltinFontsData, q as getDefaultFont, r as getFallbackFontName, s as getGoogleFontsData, t as getInputFromTemplate, u as googleFonts, v as isBlankPdf, w as isGoogleFont, x as isHexValid, y as mm2pt, z as pt2mm, A as pt2px, E as px2mm } from './chunks/helper-D5PPN6Bv.js';
2
- export { PDFME_VERSION } from './chunks/index-CDhErAtE.js';
3
- export { g as getDynamicTemplate, p as pluginRegistry } from './chunks/pluginRegistry-B-XSNgmK.js';
1
+ export { B as BLANK_A4_PDF, a as BLANK_PDF, C as CUSTOM_A4_PDF, D as DEFAULT_FONT_NAME, M as MM_TO_PT_RATIO, P as PT_TO_MM_RATIO, b as PT_TO_PX_RATIO, Z as ZOOM, c as b64toUint8Array, d as checkDesignerProps, e as checkFont, f as checkGenerateProps, g as checkInputs, h as checkPreviewProps, i as checkTemplate, j as checkUIOptions, k as checkUIProps, l as cloneDeep, m as getAllFonts, n as getAllFontsWithGoogle, o as getB64BasePdf, p as getBuiltinFontsData, q as getDefaultFont, r as getFallbackFontName, s as getGoogleFontsData, t as getInputFromTemplate, u as googleFonts, v as isBlankPdf, w as isGoogleFont, x as isHexValid, y as mm2pt, z as pt2mm, A as pt2px, E as px2mm, F as px2pt } from './chunks/helper-DSxGxZ0j.js';
2
+ export { PDFME_VERSION } from './chunks/index-DJkUkUo9.js';
3
+ export { g as getDynamicTemplate, p as pluginRegistry } from './chunks/pluginRegistry-Bgrz5qWG.js';
4
4
  export { r as replacePlaceholders } from './chunks/expression-B-F1KCfk.js';
5
+ export { t as templatePtToPx, a as templatePxToPt } from './chunks/fontSizeTransform-CkTVJdRF.js';
5
6
  import 'zod';
6
7
  import 'buffer';
7
8
  import 'acorn';
@@ -1,6 +1,6 @@
1
1
  import * as pdfjsLib from 'pdfjs-dist';
2
2
  import PDFJSWorker from 'pdfjs-dist/build/pdf.worker.entry.js';
3
- import { z as pt2mm, y as mm2pt } from './chunks/helper-D5PPN6Bv.js';
3
+ import { z as pt2mm, y as mm2pt } from './chunks/helper-DSxGxZ0j.js';
4
4
  import { Z as PDFDocument } from './chunks/PDFButton-CvvB9ITJ.js';
5
5
  import 'zod';
6
6
  import 'buffer';
@@ -1,10 +1,10 @@
1
1
  import { A as AFRelationship, a as AcroButtonFlags, b as AcroChoiceFlags, c as AcroFieldFlags, d as AcroTextFlags, e as AnnotationFlags, f as AppearanceCharacteristics, B as BlendMode, C as Cache, g as CombedTextLayoutError, h as CustomFontEmbedder, i as CustomFontSubsetEmbedder, D as Duplex, E as EncryptedPDFError, j as ExceededMaxLengthError, F as FieldAlreadyExistsError, k as FieldExistsAsNonTerminalError, l as FileEmbedder, m as FontkitNotRegisteredError, n as ForeignPageError, I as ImageAlignment, o as InvalidFieldNamePartError, p as InvalidMaxLengthError, J as JpegEmbedder, M as MissingOnValueCheckError, N as NoSuchFieldError, q as NonFullScreenPageMode, P as PDFAcroButton, r as PDFAcroCheckBox, s as PDFAcroChoice, t as PDFAcroComboBox, u as PDFAcroField, v as PDFAcroForm, w as PDFAcroListBox, x as PDFAcroNonTerminal, y as PDFAcroPushButton, z as PDFAcroRadioButton, G as PDFAcroSignature, H as PDFAcroTerminal, K as PDFAcroText, L as PDFAnnotation, O as PDFArray, Q as PDFBool, R as PDFButton, S as PDFCatalog, T as PDFCheckBox, U as PDFContentStream, V as PDFContext, W as PDFCrossRefSection, X as PDFCrossRefStream, Y as PDFDict, Z as PDFDocument, _ as PDFDropdown, $ as PDFEmbeddedPage, a0 as PDFField, a1 as PDFFlateStream, a2 as PDFFont, a3 as PDFForm, a4 as PDFHeader, a5 as PDFHexString, a6 as PDFImage, a7 as PDFInvalidObject, a8 as PDFJavaScript, a9 as PDFNull, aa as PDFObjectCopier, ab as PDFObjectParser, ac as PDFObjectStream, ad as PDFObjectStreamParser, ae as PDFOptionList, af as PDFPage, ag as PDFPageEmbedder, ah as PDFPageLeaf, ai as PDFPageTree, aj as PDFParser, ak as PDFRadioGroup, al as PDFRawStream, am as PDFRef, an as PDFSignature, ao as PDFStream, ap as PDFStreamWriter, aq as PDFString, ar as PDFTextField, as as PDFTrailer, at as PDFTrailerDict, au as PDFWidgetAnnotation, av as PDFWriter, aw as PDFXRefStreamParser, ax as PageSizes, ay as ParseSpeeds, az as PngEmbedder, aA as PrintScaling, aB as ReadingDirection, aC as RemovePageFromEmptyDocumentError, aD as RichTextFieldReadError, aE as StandardFontEmbedder, aF as StandardFonts, aG as TextAlignment, aH as UnexpectedFieldTypeError, aI as ViewerPreferences, aJ as createPDFAcroField, aK as createPDFAcroFields, aL as decodePDFRawStream, aM as defaultButtonAppearanceProvider, aN as defaultCheckBoxAppearanceProvider, aO as defaultDropdownAppearanceProvider, aP as defaultOptionListAppearanceProvider, aQ as defaultRadioGroupAppearanceProvider, aR as defaultTextFieldAppearanceProvider, aS as drawButton, aT as drawCheckBox, aU as drawCheckMark, aV as drawEllipse, aW as drawEllipsePath, aX as drawImage, aY as drawLine, aZ as drawLinesOfText, a_ as drawOptionList, a$ as drawPage, b0 as drawRadioButton, b1 as drawRectangle, b2 as drawSvgPath, b3 as drawText, b4 as drawTextField, b5 as drawTextLines, b6 as hasSurrogates, b7 as hasUtf16BOM, b8 as highSurrogate, b9 as isWithinBMP, ba as layoutCombedText, bb as layoutMultilineText, bc as layoutSinglelineText, bd as lowSurrogate, be as normalizeAppearance, bf as pdfDocEncodingDecode, bg as rotateInPlace, bh as utf16Decode, bi as utf16Encode, bj as utf8Encode, bk as waitForTick } from './chunks/PDFButton-CvvB9ITJ.js';
2
2
  import { C as CharCodes, be as ColorTypes, X as CorruptPageTreeError, aH as FillRule, S as IndexOutOfBoundsError, T as InvalidAcroFieldValueError, I as InvalidPDFDateStringError, W as InvalidTargetIndexError, ba as LineCapStyle, b9 as LineJoinStyle, M as MethodNotImplementedError, bf as MissingCatalogError, O as MissingDAEntryError, a6 as MissingKeywordError, a5 as MissingPDFHeaderError, F as MissingPageContentsEmbeddingError, R as MissingTfOperatorError, V as MultiSelectValueError, _ as NextByteAssertionError, Y as NumberParsingError, h as PDFArrayIsNotRectangleError, a7 as PDFInvalidObjectParsingError, k as PDFName, i as PDFNumber, P as PDFObject, $ as PDFObjectParsingError, n as PDFOperator, o as PDFOperatorNames, bg as PDFParsingError, a2 as PDFStreamParsingError, b7 as PageEmbeddingMismatchedContextError, j as PrivateConstructorError, a3 as ReparseError, bh as RotationTypes, a4 as StalledParserError, bi as StandardFontValues, bj as TextRenderingMode, a0 as UnbalancedParenthesisError, U as UnexpectedObjectTypeError, G as UnrecognizedStreamTypeError, E as UnsupportedEncodingError, bk as addRandomSuffix, aP as adjustDimsForRotation, ab as appendBezierCurve, aa as appendQuadraticCurve, l as arrayAsString, an as asNumber, bl as asPDFName, bm as asPDFNumber, K as assertEachIs, N as assertInteger, aS as assertIs, J as assertIsOneOf, b3 as assertIsOneOfOrUndefined, aZ as assertIsSubset, aV as assertMultiple, aT as assertOrUndefined, aY as assertPositive, L as assertRange, a_ as assertRangeOrUndefined, bn as backtick, aF as beginMarkedContent, aw as beginText, bd as breakTextIntoLines, B as byAscendingId, v as bytesFor, b5 as canBeConvertedToUint8Array, aL as charAtIndex, g as charFromCode, bo as charFromHexCode, aN as charSplit, aK as cleanText, aD as clip, bp as clipEvenOdd, a8 as closePath, c as cmyk, bb as colorString, aW as colorToComponents, aQ as componentsToColor, ah as concatTransformationMatrix, f as copyStringIntoBuffer, bq as createTypeErrorMsg, br as createValueErrorMsg, bs as decodeFromBase64, bt as decodeFromBase64DataUri, d as degrees, a as degreesToRadians, al as drawObject, b8 as encodeToBase64, aG as endMarkedContent, aE as endPath, aC as endText, bu as error, bv as escapeRegExp, bw as escapedNewlineChars, av as fill, au as fillAndStroke, aI as fillEvenOdd, Q as findLastMatch, bx as getType, aR as grayscale, b0 as isArrayEqual, by as isNewlineChar, b4 as isStandardFont, bz as isType, q as last, aM as lineSplit, a9 as lineTo, H as mergeIntoTypedArray, aJ as mergeLines, D as mergeUint8Arrays, bA as moveText, ac as moveTo, bB as newlineChars, aB as nextLine, bC as numberToString, p as padStart, x as parseDate, b6 as pluckIndices, am as popGraphicsState, af as pushGraphicsState, bD as radians, bE as radiansToDegrees, b2 as range, bF as rectangle, bc as rectanglesAreEqual, aO as reduceRotation, bG as restoreDashPattern, u as reverseArray, r as rgb, bH as rotateAndSkewTextDegreesAndTranslate, az as rotateAndSkewTextRadiansAndTranslate, ae as rotateDegrees, ai as rotateRadians, aX as rotateRectangle, aj as scale, bI as setCharacterSpacing, bJ as setCharacterSqueeze, at as setDashPattern, bK as setFillingCmykColor, ar as setFillingColor, bL as setFillingGrayscaleColor, bM as setFillingRgbColor, ax as setFontAndSize, ag as setGraphicsState, as as setLineCap, ay as setLineHeight, bN as setLineJoin, ap as setLineWidth, bO as setStrokingCmykColor, ao as setStrokingColor, bP as setStrokingGrayscaleColor, bQ as setStrokingRgbColor, bR as setTextMatrix, bS as setTextRenderingMode, bT as setTextRise, bU as setWordSpacing, aA as showText, bV as singleQuote, s as sizeInBytes, bW as skewDegrees, ak as skewRadians, A as sortedUniq, bX as square, a$ as stringAsByteArray, aq as stroke, w as sum, e as toCharCode, z as toCodePoint, aU as toDegrees, b as toHexString, y as toHexStringOfMinLength, t as toRadians, b1 as toUint8Array, ad as translate, m as typedArrayFor, bY as values } from './chunks/colors-jzbEzNi4.js';
3
- import { v as isBlankPdf, o as getB64BasePdf, y as mm2pt, f as checkGenerateProps, l as cloneDeep, z as pt2mm } from './chunks/helper-D5PPN6Bv.js';
4
- import { p as pluginRegistry, g as getDynamicTemplate } from './chunks/pluginRegistry-B-XSNgmK.js';
3
+ import { v as isBlankPdf, o as getB64BasePdf, y as mm2pt, f as checkGenerateProps, l as cloneDeep, z as pt2mm } from './chunks/helper-DSxGxZ0j.js';
4
+ import { p as pluginRegistry, g as getDynamicTemplate } from './chunks/pluginRegistry-Bgrz5qWG.js';
5
5
  import { r as replacePlaceholders } from './chunks/expression-B-F1KCfk.js';
6
6
  import * as fontkit from 'fontkit';
7
- import { b as builtInPlugins, g as getDynamicHeightsForTable } from './chunks/index-C7jr4GIK.js';
7
+ import { b as builtInPlugins, g as getDynamicHeightsForTable } from './chunks/index-iZeHwQ5z.js';
8
8
  import 'pako';
9
9
  import '@pdf-lib/standard-fonts';
10
10
  import '@pdf-lib/upng';
package/dist/esm/index.js CHANGED
@@ -1,15 +1,16 @@
1
1
  export { Designer, Form, Viewer } from './ui.js';
2
- export { b as builtInPlugins, g as getDynamicHeightsForTable, s as multiVariableText } from './chunks/index-C7jr4GIK.js';
2
+ export { b as builtInPlugins, g as getDynamicHeightsForTable, s as richText, a as singleVariableText, t as text } from './chunks/index-iZeHwQ5z.js';
3
3
  export { img2pdf, pdf2img, pdf2size } from './converter.js';
4
4
  export { insert, merge, move, organize, remove, rotate, split } from './manipulator.js';
5
5
  export { Canvas, PropPanel as DesignerPropPanel, PdfmeProvider, SchemaList, convertPdfToBase64, plugins, useDesigner, useDesignerContext } from './print-designer-editor.js';
6
- export { barcodes, checkbox, date, dateTime, radioGroup, select, svg, table, text, time } from './schemas.js';
7
- export { d as dynamicBarcode, a as dynamicQrCode, b as dynamicTable, e as ellipse, i as image, l as line, r as rectangle, s as signature, v as variableBarcodes } from './chunks/index-C4F7EwBG.js';
6
+ export { barcodes, checkbox, date, dateTime, multiVariableText, radioGroup, select, svg, table, time } from './schemas.js';
7
+ export { d as dynamicBarcode, a as dynamicQrCode, b as dynamicTable, e as ellipse, f as fontSizePxWidget, i as image, l as line, r as rectangle, s as signature, v as variableBarcodes } from './chunks/fontSizePxWidget-BHHixwEk.js';
8
8
  export { generate } from './generator.js';
9
- export { B as BLANK_A4_PDF, a as BLANK_PDF, C as CUSTOM_A4_PDF, D as DEFAULT_FONT_NAME, M as MM_TO_PT_RATIO, P as PT_TO_MM_RATIO, b as PT_TO_PX_RATIO, Z as ZOOM, c as b64toUint8Array, d as checkDesignerProps, e as checkFont, f as checkGenerateProps, g as checkInputs, h as checkPreviewProps, i as checkTemplate, j as checkUIOptions, k as checkUIProps, l as cloneDeep, m as getAllFonts, n as getAllFontsWithGoogle, o as getB64BasePdf, p as getBuiltinFontsData, q as getDefaultFont, r as getFallbackFontName, s as getGoogleFontsData, t as getInputFromTemplate, u as googleFonts, v as isBlankPdf, w as isGoogleFont, x as isHexValid, y as mm2pt, z as pt2mm, A as pt2px, E as px2mm } from './chunks/helper-D5PPN6Bv.js';
10
- export { PDFME_VERSION } from './chunks/index-CDhErAtE.js';
11
- export { g as getDynamicTemplate, p as pluginRegistry } from './chunks/pluginRegistry-B-XSNgmK.js';
9
+ export { B as BLANK_A4_PDF, a as BLANK_PDF, C as CUSTOM_A4_PDF, D as DEFAULT_FONT_NAME, M as MM_TO_PT_RATIO, P as PT_TO_MM_RATIO, b as PT_TO_PX_RATIO, Z as ZOOM, c as b64toUint8Array, d as checkDesignerProps, e as checkFont, f as checkGenerateProps, g as checkInputs, h as checkPreviewProps, i as checkTemplate, j as checkUIOptions, k as checkUIProps, l as cloneDeep, m as getAllFonts, n as getAllFontsWithGoogle, o as getB64BasePdf, p as getBuiltinFontsData, q as getDefaultFont, r as getFallbackFontName, s as getGoogleFontsData, t as getInputFromTemplate, u as googleFonts, v as isBlankPdf, w as isGoogleFont, x as isHexValid, y as mm2pt, z as pt2mm, A as pt2px, E as px2mm, F as px2pt } from './chunks/helper-DSxGxZ0j.js';
10
+ export { PDFME_VERSION } from './chunks/index-DJkUkUo9.js';
11
+ export { g as getDynamicTemplate, p as pluginRegistry } from './chunks/pluginRegistry-Bgrz5qWG.js';
12
12
  export { r as replacePlaceholders } from './chunks/expression-B-F1KCfk.js';
13
+ export { t as templatePtToPx, a as templatePxToPt } from './chunks/fontSizeTransform-CkTVJdRF.js';
13
14
  import 'fontkit';
14
15
  import 'buffer';
15
16
  import './chunks/colors-jzbEzNi4.js';