From 5b2bb09f7e387e0116ce251ec2c80696c96ad425 Mon Sep 17 00:00:00 2001 From: Valery Buchinsky Date: Fri, 15 Mar 2024 12:42:04 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20=F0=9F=90=9B[placeholde?= =?UTF-8?q?r-pdf-lib]=20Fix=20types:=20Import=20PDFPage=20from=20pdf-lib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #234 --- .../dist/pdflibAddPlaceholder.d.ts | 1 + .../dist/pdflibAddPlaceholder.d.ts.map | 2 +- .../dist/pdflibAddPlaceholder.js | 32 +++++++++++-------- .../src/pdflibAddPlaceholder.js | 32 +++++++++++-------- 4 files changed, 38 insertions(+), 29 deletions(-) diff --git a/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts b/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts index f8fe6593..b2603c60 100644 --- a/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts +++ b/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts @@ -1,5 +1,6 @@ export function pdflibAddPlaceholder({ pdfDoc, pdfPage, reason, contactInfo, name, location, signingTime, signatureLength, byteRangePlaceholder, subFilter, widgetRect, appName, }: InputType): void; export type PDFDocument = import('pdf-lib').PDFDocument; +export type PDFPage = import('pdf-lib').PDFPage; export type InputType = { pdfDoc: PDFDocument; pdfPage: PDFPage; diff --git a/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts.map b/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts.map index bc86ec5a..6ceaf8c6 100644 --- a/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts.map +++ b/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"pdflibAddPlaceholder.d.ts","sourceRoot":"","sources":["../src/pdflibAddPlaceholder.js"],"names":[],"mappings":"AAwCO,oLAHI,SAAS,GACP,IAAI,CAmHhB;0BA5IY,OAAO,SAAS,EAAE,WAAW;;YAK7B,WAAW;;YAEX,MAAM;iBACN,MAAM;UACN,MAAM;cACN,MAAM;kBACN,IAAI;sBACJ,MAAM;2BACN,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM,EAAE;;;;cACR,MAAM"} \ No newline at end of file +{"version":3,"file":"pdflibAddPlaceholder.d.ts","sourceRoot":"","sources":["../src/pdflibAddPlaceholder.js"],"names":[],"mappings":"AA4CO,oLAHI,SAAS,GACP,IAAI,CAmHhB;0BAhJY,OAAO,SAAS,EAAE,WAAW;sBAI7B,OAAO,SAAS,EAAE,OAAO;;YAKxB,WAAW;aACX,OAAO;YACP,MAAM;iBACN,MAAM;UACN,MAAM;cACN,MAAM;kBACN,IAAI;sBACJ,MAAM;2BACN,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM,EAAE;;;;cACR,MAAM"} \ No newline at end of file diff --git a/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.js b/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.js index e2c86a08..45a683a0 100644 --- a/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.js +++ b/packages/placeholder-pdf-lib/dist/pdflibAddPlaceholder.js @@ -11,20 +11,24 @@ var _pdfLib = require("pdf-lib"); */ /** -* @typedef {object} InputType -* @property {PDFDocument} pdfDoc -* @property {PDFPage} pdfPage -* @property {string} reason -* @property {string} contactInfo -* @property {string} name -* @property {string} location -* @property {Date} [signingTime] -* @property {number} [signatureLength] -* @property {string} [byteRangePlaceholder] -* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils -* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle -* @property {string} [appName] Name of the application generating the signature -*/ + * @typedef {import('pdf-lib').PDFPage} PDFPage + */ + +/** + * @typedef {object} InputType + * @property {PDFDocument} pdfDoc + * @property {PDFPage} pdfPage + * @property {string} reason + * @property {string} contactInfo + * @property {string} name + * @property {string} location + * @property {Date} [signingTime] + * @property {number} [signatureLength] + * @property {string} [byteRangePlaceholder] + * @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils + * @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle + * @property {string} [appName] Name of the application generating the signature + */ /** * Adds a signature placeholder to a PDF-LIB PDFDocument. diff --git a/packages/placeholder-pdf-lib/src/pdflibAddPlaceholder.js b/packages/placeholder-pdf-lib/src/pdflibAddPlaceholder.js index 8d5efd2c..b2139365 100644 --- a/packages/placeholder-pdf-lib/src/pdflibAddPlaceholder.js +++ b/packages/placeholder-pdf-lib/src/pdflibAddPlaceholder.js @@ -15,20 +15,24 @@ import { */ /** -* @typedef {object} InputType -* @property {PDFDocument} pdfDoc -* @property {PDFPage} pdfPage -* @property {string} reason -* @property {string} contactInfo -* @property {string} name -* @property {string} location -* @property {Date} [signingTime] -* @property {number} [signatureLength] -* @property {string} [byteRangePlaceholder] -* @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils -* @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle -* @property {string} [appName] Name of the application generating the signature -*/ + * @typedef {import('pdf-lib').PDFPage} PDFPage + */ + +/** + * @typedef {object} InputType + * @property {PDFDocument} pdfDoc + * @property {PDFPage} pdfPage + * @property {string} reason + * @property {string} contactInfo + * @property {string} name + * @property {string} location + * @property {Date} [signingTime] + * @property {number} [signatureLength] + * @property {string} [byteRangePlaceholder] + * @property {string} [subFilter] One of SUBFILTER_* from \@signpdf/utils + * @property {number[]} [widgetRect] [x1, y1, x2, y2] widget rectangle + * @property {string} [appName] Name of the application generating the signature + */ /** * Adds a signature placeholder to a PDF-LIB PDFDocument.