@yudaocode/univer-pdfs 1.6.209 → 1.6.211

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.
@@ -1,7 +1,7 @@
1
1
  import { I as IPdfUnitData, a as IPdfDocument, b as IPdfPage, c as IPdfPageSize, d as IPdfPageElement, e as IPdfLayer, f as IPdfSourceDocumentRef, g as IPdfResourceBinding, h as IPdfUnitMetadata, i as IPdfAttachment, j as IPdfSecurityPermissions, k as IPdfSignatureEnvelope, P as PdfElementType, l as IPdfTextStyle, m as PdfPageRotation, n as IPdfBatesConfig, o as IPdfBookmarkItem, p as IPdfHeaderFooterConfig, q as IPdfNativeTextSpan, r as IPdfCropBox, s as IPdfWatermarkConfig, t as IPdfDocumentData, u as IPdfTextElement, v as PdfDateTimeKind, w as IPdfCircleMarkElement, x as IPdfListElement, y as IPdfRichTextSpan, z as PdfColorSpaceType, A as IPdfExportOptions, B as PDF_PAGE_PRESETS, C as PdfBatesPosition, D as IPdfSignerInfo, E as IPdfjsAssetsConfig, F as PdfDisplayUnit, G as PdfInteractionMode, H as IPdfVersionSnapshot } from './jsx-dev-runtime-5tXCUq4v.js';
2
2
  export { J as Fragment, K as ICjkDetectionSummary, L as IComputeDynamicFontSizeParams, M as IDetectedPaperPreset, N as IDiagnosePdfFontsOptions, O as IDiagnosticGridOverlayOptions, Q as IExportJsxToPdfOptions, R as IInputsCjkReport, S as IJsxAbsoluteProps, T as IJsxBarcodeProps, U as IJsxBoxProps, V as IJsxContainerStyleProps, W as IJsxDocumentProps, X as IJsxHeaderFooterProps, Y as IJsxImageProps, Z as IJsxLineProps, _ as IJsxListProps, $ as IJsxMultiVariableTextProps, a0 as IJsxPageBreakProps, a1 as IJsxPageProps, a2 as IJsxQrCodeProps, a3 as IJsxRowProps, a4 as IJsxShapeProps, a5 as IJsxSpacerProps, a6 as IJsxStackProps, a7 as IJsxStaticProps, a8 as IJsxSvgProps, a9 as IJsxTableColumnSpec, aa as IJsxTableProps, ab as IJsxTextProps, ac as IPdfAnnotationElement, ad as IPdfAnnotationReply, ae as IPdfBarcodeElement, af as IPdfCheckboxElement, ag as IPdfDatasetField, ah as IPdfDatasetSchema, ai as IPdfDateTimeElement, aj as IPdfDocumentMetadata, ak as IPdfDurableEditState, al as IPdfDynamicFontSizeConfig, am as IPdfElement, an as IPdfElementBase, ao as IPdfElementTransform, ap as IPdfEllipseElement, aq as IPdfExportCapabilitiesReport, ar as IPdfFieldContractHint, as as IPdfFontDiagnosisReport, at as IPdfFontDiagnosticIssue, au as IPdfFontDoctorInputEntry, av as IPdfImageCrop, aw as IPdfImageElement, ax as IPdfInkElement, ay as IPdfInkPoint, az as IPdfInputContractValidationResult, aA as IPdfInputContractViolation, aB as IPdfJsxNode, aC as IPdfLineElement, aD as IPdfPageElementBase, aE as IPdfParagraphBlock, aF as IPdfPolygonElement, aG as IPdfPolygonPoint, aH as IPdfQrCodeElement, aI as IPdfRadioGroupElement, aJ as IPdfRedactionElement, aK as IPdfSchemaDiagnosticIssue, aL as IPdfSelectElement, aM as IPdfShapeElement, aN as IPdfSignatureElement, aO as IPdfStampElement, aP as IPdfSvgElement, aQ as IPdfTableBorderWidths, aR as IPdfTableCellStyle, aS as IPdfTableColumn, aT as IPdfTableElement, aU as IPdfTableMerge, aV as IPdfTablePageChunk, aW as IPdfTableThemePreset, aX as IPdfTemplateSchemaValidationResult, aY as IPdfVariableValidationResult, aZ as IPdfmeBlankPdf, a_ as IPdfmeSchemaItem, a$ as IPdfmeTemplate, b0 as IRenderJsxOptions, b1 as ITemplateCjkReport, b2 as IValidatePdfTemplateSchemaOptions, b3 as JSX, b4 as PAGE_SIZE_PRESETS_MM, b5 as PDF_JSX_ELEMENT_SYMBOL, b6 as PDF_JSX_FRAGMENT_SYMBOL, b7 as PDF_TABLE_THEME_PRESETS, b8 as PT_PER_MM, b9 as PdfAnnotationStatus, ba as PdfAnnotationType, bb as PdfBarcodeFormat, bc as PdfCjkScriptBlock, bd as PdfCjkTextMode, be as PdfDynamicFontFitMode, bf as PdfImageSourceType, bg as PdfJsxChild, bh as PdfJsxComponent, bi as PdfJsxIntrinsicKind, bj as PdfJsxPaddingSpec, bk as PdfListKind, bl as PdfListPresetId, bm as PdfPaperPresetName, bn as PdfTableBorderStyle, bo as PdfTableCellVerticalAlign, bp as PdfTextAnchor, bq as PdfTextFormatMode, br as PdfTextOverflowMode, bs as UNIVER_PDF_SCHEMA, bt as UNIVER_PDF_SCHEMA_VERSION, bu as collectPdfInputContractHints, bv as computeAutoFitFontSize, bw as computeDynamicFontSize, bx as computePdfTableSummaryRow, by as createPdfJsxNode, bz as detectCJKCharacters, bA as detectCJKInPdfInputs, bB as detectCJKInPdfTemplate, bC as detectPaperSizePreset, bD as diagnosePdfFonts, bE as evaluatePdfJsxElement, bF as exportBatchPdfBytes, bG as exportCalibrationGridPdfBytes, bH as exportPdfBytes, bI as exportToPdfmeTemplate, bJ as extractAcroFormValuesFromPdfBytes, bK as extractJsxTextContent, bL as extractPdfFormValues, bM as fillPdfFormValues, bN as flattenJsxChildrenToNodes, bO as formatBatesNumber, bP as formatPdfTableCell, bQ as fromPdfmeTemplate, bR as importFromPdfmeTemplate, bS as inspectPdfExportCapabilities, bT as isFontUrlSafeToFetch, bU as isPdfJsxNode, bV as jsx, bW as jsxDEV, bX as jsxs, bY as mmToPt, bZ as normalizeBarcodePayloadForFormat, b_ as normalizeImageCrop, b$ as overlayDiagnosticGridOnPdfBytes, c0 as paginatePdfTableRows, c1 as ptToMm, c2 as renderBarcodeDataUrl, c3 as renderQrCodeDataUrl, c4 as resolveDynamicTableRawRows, c5 as resolvePaddingMm, c6 as resolvePageSizeMm, c7 as resolvePolygonNormalizedPoints, c8 as resolveTemplateString, c9 as toPdfmeTemplate, ca as validatePdfInputContract, cb as validatePdfTemplateSchema, cc as validatePdfTemplateVariables } from './jsx-dev-runtime-5tXCUq4v.js';
3
3
  import * as _univerjs_core from '@univerjs/core';
4
- import { UnitModel, UniverInstanceType, ICommand, IMutation, IDisposable, Disposable, Plugin, Injector, IUniverInstanceService, ICommandService } from '@univerjs/core';
4
+ import { UnitModel, UniverInstanceType, ICommand, IMutation, IDisposable, Disposable, IUniverInstanceService, Plugin, Injector, ICommandService } from '@univerjs/core';
5
5
  import { Observable } from 'rxjs';
6
6
  import * as pdf_lib from 'pdf-lib';
7
7
  import { PDFDocument, PDFDict, PDFPage } from 'pdf-lib';
@@ -1611,16 +1611,50 @@ declare function subsetTrueTypeFont(ttfBytes: Uint8Array, codePoints: number[]):
1611
1611
  */
1612
1612
  declare function buildMinimalTestTrueTypeFont(extraCodePoints?: number[]): Uint8Array;
1613
1613
 
1614
+ interface IPdfImportWarning {
1615
+ code: string;
1616
+ message: string;
1617
+ count?: number;
1618
+ }
1619
+ type PdfRawImportWarning = IPdfImportWarning | string;
1614
1620
  type IPdfImportOutcome = {
1615
1621
  /** Keep/replace background base PDF for print-overlay while preserving or resizing pages */
1616
1622
  mode: 'overlay';
1617
1623
  sourceDocumentRef: IPdfSourceDocumentRef;
1618
1624
  pageSizes: IPdfPageSize[];
1625
+ warnings?: IPdfImportWarning[];
1619
1626
  } | {
1620
1627
  /** Replace the entire editable `IPdfUnitData` unit snapshot (e.g. parsed by backend PDF parser) */
1621
1628
  mode: 'snapshot';
1622
1629
  snapshot: IPdfUnitData;
1630
+ warnings?: IPdfImportWarning[];
1623
1631
  };
1632
+ type IPdfIoAdapterImportResult = (Omit<Extract<IPdfImportOutcome, {
1633
+ mode: 'overlay';
1634
+ }>, 'warnings'> & {
1635
+ warnings?: PdfRawImportWarning[];
1636
+ }) | (Omit<Extract<IPdfImportOutcome, {
1637
+ mode: 'snapshot';
1638
+ }>, 'warnings'> & {
1639
+ warnings?: PdfRawImportWarning[];
1640
+ }) | {
1641
+ snapshot: IPdfUnitData;
1642
+ warnings?: PdfRawImportWarning[];
1643
+ } | IPdfUnitData;
1644
+ interface IPdfImportOutcomeReport {
1645
+ snapshot: IPdfUnitData;
1646
+ outcome: IPdfImportOutcome;
1647
+ warnings: IPdfImportWarning[];
1648
+ executedBy: 'browser' | 'server';
1649
+ fileName?: string;
1650
+ }
1651
+ interface IPdfImportWithReportContext {
1652
+ unitId?: string;
1653
+ snapshot?: IPdfUnitData;
1654
+ target?: PdfIoTarget;
1655
+ password?: string;
1656
+ defaultImport?: (file: File) => Promise<any>;
1657
+ }
1624
1658
  interface IPdfImportContext {
1625
1659
  unitId: string;
1626
1660
  snapshot: IPdfUnitData;
@@ -1665,6 +1699,10 @@ interface IHttpSilentPrintAdapterConfig {
1665
1699
  headers?: Record<string, string>;
1666
1700
  fetchImpl?: typeof fetch;
1667
1701
  }
1702
+ interface IPdfIoFormatListConfig {
1703
+ import?: string[];
1704
+ export?: string[];
1705
+ }
1668
1706
  /**
1669
1707
  * Pluggable Import / Export / Save / Silent-Print SPI for `@yudaocode/univer-pdfs`.
1670
1708
  * By default, all operations run purely in the browser. Host applications (e.g. Spring Boot / Node.js / Local Print Agent)
@@ -1673,8 +1711,14 @@ interface IHttpSilentPrintAdapterConfig {
1673
1711
  interface IPdfIoAdapter {
1674
1712
  /** Optional human-readable adapter label (e.g. `'frontend-default'` or `'yudao-spring-boot'`) */
1675
1713
  name?: string;
1676
- /** Custom PDF import hook (supports returning either an `overlay` base PDF or a parsed `snapshot`) */
1677
- importPdf?: (file: File, context: IPdfImportContext) => Promise<IPdfImportOutcome>;
1714
+ /** Optional default IO target preference (`'auto' | 'browser' | 'server'`) */
1715
+ defaultIoTarget?: PdfIoTarget;
1716
+ /** Optional browser-side supported formats override (`boolean` or `{ import?: string[]; export?: string[] }`) */
1717
+ browserFormats?: IPdfIoFormatListConfig | boolean;
1718
+ /** Optional server-side supported formats declaration (`{ import?: string[]; export?: string[] }`) */
1719
+ serverFormats?: IPdfIoFormatListConfig;
1720
+ /** Custom PDF import hook (supports returning an `overlay` base PDF, a `snapshot` outcome, `{ snapshot, warnings }`, or raw `IPdfUnitData`) */
1721
+ importPdf?: (file: File, context: IPdfImportContext) => Promise<IPdfIoAdapterImportResult>;
1678
1722
  /** Custom PDF export hook (can call backend PDF engine or wrap `context.defaultExport()`) */
1679
1723
  exportPdf?: (context: IPdfExportContext) => Promise<Uint8Array | ArrayBuffer | Blob>;
1680
1724
  /** Custom template persistence hook triggered when saving template snapshot to host system */
@@ -1708,6 +1752,11 @@ declare class PdfImportError extends Error {
1708
1752
  * so two base64 PDFs or binary buffers of identical length never collide in document caches.
1709
1753
  */
1710
1754
  declare function computePdfPayloadDigest(input: string | Uint8Array): string;
1755
+ interface IPdfIoFormatCapability {
1756
+ browser: boolean;
1757
+ server: boolean;
1758
+ defaultTarget: 'browser' | 'server';
1759
+ }
1711
1760
  interface IPdfIoCapabilities {
1712
1761
  browser: {
1713
1762
  importOverlayPdf: true;
@@ -1721,7 +1770,12 @@ interface IPdfIoCapabilities {
1721
1770
  onSave: boolean;
1722
1771
  silentPrint: boolean;
1723
1772
  };
1773
+ defaultIoTarget: PdfIoTarget;
1724
1774
  recommendedDefaultTarget: 'server' | 'browser';
1775
+ formats: {
1776
+ import: Record<string, IPdfIoFormatCapability>;
1777
+ export: Record<string, IPdfIoFormatCapability>;
1778
+ };
1725
1779
  }
1726
1780
  interface IBeforePdfExportHookParams {
1727
1781
  unitId: string;
@@ -1748,6 +1802,8 @@ interface IPdfIoService {
1748
1802
  getAdapter(): IPdfIoAdapter;
1749
1803
  setAdapter(adapter: IPdfIoAdapter): void;
1750
1804
  patchAdapter(patch: Partial<IPdfIoAdapter>): void;
1805
+ getDefaultIoTarget(): PdfIoTarget;
1806
+ setDefaultIoTarget(target: PdfIoTarget): void;
1751
1807
  getIoCapabilities(): IPdfIoCapabilities;
1752
1808
  getAiCopilotAdapter(): IPdfAiCopilotAdapter;
1753
1809
  setAiCopilotAdapter(adapter: IPdfAiCopilotAdapter): void;
@@ -1764,6 +1820,7 @@ interface IPdfIoService {
1764
1820
  target?: PdfIoTarget;
1765
1821
  password?: string;
1766
1822
  }): Promise<IPdfImportOutcome>;
1823
+ importPdfWithReport(file: File, context?: IPdfImportWithReportContext): Promise<IPdfImportOutcomeReport>;
1767
1824
  exportPdf(params: {
1768
1825
  unitId: string;
1769
1826
  snapshot: IPdfUnitData;
@@ -1793,7 +1850,12 @@ interface IPdfImportSourceOptions {
1793
1850
  type IPdfImportSourceResult = IPdfImportOutcome & {
1794
1851
  mode: 'overlay';
1795
1852
  bytes: Uint8Array;
1853
+ warnings?: IPdfImportWarning[];
1796
1854
  };
1855
+ declare function normalizePdfImportWarnings(raw?: ReadonlyArray<IPdfImportWarning | string> | null): IPdfImportWarning[];
1856
+ declare function buildOverlayImportCandidateSnapshot(baseSnapshot: IPdfUnitData, outcome: Extract<IPdfImportOutcome, {
1857
+ mode: 'overlay';
1858
+ }>): IPdfUnitData;
1797
1859
  /**
1798
1860
  * Validates and imports a PDF source (`File`, `Blob`, `ArrayBuffer`, `Uint8Array`, or Base64 / Data URI string).
1799
1861
  * Strictly verifies the `%PDF-` magic header and `PDFDocument.load` structure (with optional `password`),
@@ -1802,6 +1864,7 @@ type IPdfImportSourceResult = IPdfImportOutcome & {
1802
1864
  */
1803
1865
  declare function importPdfSource(source: File | Blob | ArrayBuffer | Uint8Array | string, options?: IPdfImportSourceOptions): Promise<IPdfImportSourceResult>;
1804
1866
  declare class PdfIoService extends Disposable implements IPdfIoService {
1867
+ private readonly _univerInstanceService?;
1805
1868
  private readonly _adapter$;
1806
1869
  readonly adapter$: Observable<IPdfIoAdapter>;
1807
1870
  private readonly _exported$;
@@ -1811,7 +1874,8 @@ declare class PdfIoService extends Disposable implements IPdfIoService {
1811
1874
  private _aiCopilotAdapter;
1812
1875
  private _ocrAdapter;
1813
1876
  private _pdfjsAssets?;
1814
- constructor();
1877
+ private _serviceDefaultIoTarget?;
1878
+ constructor(_univerInstanceService?: IUniverInstanceService | undefined);
1815
1879
  registerBeforeExportHook(fn: (event: IBeforePdfExportHookParams) => void): IDisposable;
1816
1880
  runBeforeExportHooks(event: IBeforePdfExportHookParams): boolean;
1817
1881
  notifyExported(event: IPdfExportedHookParams): void;
@@ -1820,6 +1884,8 @@ declare class PdfIoService extends Disposable implements IPdfIoService {
1820
1884
  getAdapter(): IPdfIoAdapter;
1821
1885
  setAdapter(adapter: IPdfIoAdapter): void;
1822
1886
  patchAdapter(patch: Partial<IPdfIoAdapter>): void;
1887
+ getDefaultIoTarget(): PdfIoTarget;
1888
+ setDefaultIoTarget(target: PdfIoTarget): void;
1823
1889
  getAiCopilotAdapter(): IPdfAiCopilotAdapter;
1824
1890
  setAiCopilotAdapter(adapter: IPdfAiCopilotAdapter): void;
1825
1891
  generateTemplateByAi(prompt: string): Promise<IPdfUnitData>;
@@ -1829,6 +1895,7 @@ declare class PdfIoService extends Disposable implements IPdfIoService {
1829
1895
  getPdfjsAssets(): IPdfjsAssetsConfig | undefined;
1830
1896
  setPdfjsAssets(assets?: IPdfjsAssetsConfig): void;
1831
1897
  getIoCapabilities(): IPdfIoCapabilities;
1898
+ private _resolveBaseSnapshotForImport;
1832
1899
  importPdf(file: File, context: {
1833
1900
  unitId: string;
1834
1901
  snapshot: IPdfUnitData;
@@ -1836,6 +1903,7 @@ declare class PdfIoService extends Disposable implements IPdfIoService {
1836
1903
  target?: PdfIoTarget;
1837
1904
  password?: string;
1838
1905
  }): Promise<IPdfImportOutcome>;
1906
+ importPdfWithReport(file: File, context?: IPdfImportWithReportContext): Promise<IPdfImportOutcomeReport>;
1839
1907
  exportPdf(params: {
1840
1908
  unitId: string;
1841
1909
  snapshot: IPdfUnitData;
@@ -1855,6 +1923,8 @@ declare class PdfIoService extends Disposable implements IPdfIoService {
1855
1923
  interface IUniverPdfsConfig {
1856
1924
  /** Default physical unit displayed in rulers and inspector (`'mm'` or `'pt'`) */
1857
1925
  defaultDisplayUnit?: 'pt' | 'mm';
1926
+ /** Default IO execution target (`'auto' | 'browser' | 'server'`, defaults to `'auto'`) */
1927
+ defaultIoTarget?: PdfIoTarget;
1858
1928
  /**
1859
1929
  * Optional pluggable Import / Export / Save / Silent-Print IO adapter.
1860
1930
  * Defaults to built-in pure frontend engine (`pdfjs-dist` + `pdf-lib`);
@@ -2022,4 +2092,4 @@ declare class PdfSelectionService extends Disposable implements IPdfSelectionSer
2022
2092
  getVersionSnapshot(unitId: string, versionId: string): IPdfVersionSnapshot | null;
2023
2093
  }
2024
2094
 
2025
- export { ASPECT_RATIO_LOCKED_BARCODE_TYPES, AddPdfElementCommand, AddPdfElementMutation, AddPdfLayerCommand, AddPdfPageCommand, AddPdfPageMutation, AlignSelectedPdfElementsCommand, type AspectRatioLockedBarcodeType, AssignPdfElementLayerCommand, BARCODE_TYPES, CIRCLE_MARK_BEZIER_KAPPA, DeleteSelectedPdfElementsCommand, DistributeSelectedPdfElementsCommand, DuplicateSelectedPdfElementsCommand, FindAndReplacePdfTextCommand, type IAddPdfElementCommandParams, type IAddPdfLayerCommandParams, type IAssignPdfElementLayerCommandParams, type IBarcodeBarRun, type IBarcodeLayoutBox, type IBeforePdfExportHookParams, type IBeforePdfPrintHookParams, type ICircleMarkBezierEllipse, type IComputeSmartSnapParams, type IConvertImagesToPdfOptions, type IConvertMarkdownToPdfOptions, type IDataMatrixEncodedResult, type IDeleteSelectedPdfElementsCommandParams, type IDistributeSelectedPdfElementsCommandParams, type IDynamicLayoutItemInput, type IDynamicLayoutPlacement, type IDynamicLayoutSplitOptions, type IDynamicLayoutSplitRange, type IFindAndReplacePdfTextCommandParams, type IGs1128EncodedResult, type IGs1DataMatrixEncodedResult, type IHttpSilentPrintAdapterConfig, type IImageFitPlacement, type IImportPdfSourceCommandParams, type IJapanPostBar, type IJapanPostEncodedResult, type ILinear1dEncodedResult, type INw7EncodedResult, type IParsedPdfColor, type IParsedStreamTextOp, type IPdf417EncodedResult, type IPdfAiCopilotAdapter, IPdfAttachment, type IPdfAuditSealOptions, type IPdfAuditVerificationResult, type IPdfBatchAction, type IPdfBatchPipelineFileInput, type IPdfBatchPipelineItemResult, IPdfBatesConfig, IPdfBookmarkItem, IPdfCircleMarkElement, type IPdfComparisonResult, IPdfCropBox, IPdfDocument, IPdfDocumentData, type IPdfDocxDocumentSnapshot, type IPdfElementDiffItem, type IPdfExportContext, IPdfExportOptions, type IPdfExportedHookParams, type IPdfFormFieldIssue, type IPdfFormValidationResult, IPdfHeaderFooterConfig, type IPdfImportContext, type IPdfImportOutcome, type IPdfImportSourceOptions, type IPdfImportSourceResult, type IPdfInspectedPageSize, type IPdfIoAdapter, type IPdfIoCapabilities, IPdfIoService, IPdfLayer, IPdfListElement, type IPdfListPageChunk, IPdfNativeTextSpan, type IPdfOcrAdapter, type IPdfOcrFieldInput, type IPdfOcrPageInfo, type IPdfOcrRecognizedBlock, type IPdfOptimizeUnitOptions, type IPdfOrganizeAction, IPdfPage, IPdfPageElement, IPdfPageSize, type IPdfRenderedPageImage, IPdfResourceBinding, IPdfRichTextSpan, type IPdfSanitizeOptions, type IPdfSaveContext, IPdfSecurityPermissions, IPdfSelectionService, type IPdfSelectionState, type IPdfSheetConvertedStructure, type IPdfSheetConvertedTable, IPdfSignatureEnvelope, type IPdfSignedAuditResult, IPdfSignerInfo, IPdfSourceDocumentRef, type IPdfTextDiffItem, IPdfTextElement, IPdfTextStyle, IPdfUnitData, IPdfUnitMetadata, type IPdfUnitPropsPatch, type IPdfUnitSignatureVerificationResult, IPdfVersionSnapshot, type IPdfViewportRatio, IPdfWatermarkConfig, type IPdfWordBlock, type IPdfWordConvertedPage, type IPdfWordConvertedStructure, type IPdfWorkbookCell, type IPdfWorkbookSnapshot, IPdfjsAssetsConfig, type IRemovePdfLayerCommandParams, type IRenderPdfBytesToImagesOptions, type IReplacePdfNativeTextCommandParams, type IRotatePdfPageCommandParams, type ISetPdfAttachmentsCommandParams, type ISetPdfBatesConfigCommandParams, type ISetPdfBookmarksCommandParams, type ISetPdfHeaderFooterConfigCommandParams, type ISetPdfNativeTextSpansCommandParams, type ISetPdfPageCropBoxCommandParams, type ISetPdfWatermarkConfigCommandParams, type ISilentPrintOptions, type ISilentPrintResult, type ISmartSnapBox, type ISnapGuideLine, type ISubsetFontResult, type ITemplateVariableMatch, type ITrueTypeFontInspection, type IUnifiedBarcodeEncoded, type IUniverPdfsConfig, type IUpdatePdfElementsCommandParams, type IUpdatePdfLayerCommandParams, type IUpdatePdfPageMutationParams, type IUpdatePdfPagePropsCommandParams, type IUpdatePdfUnitPropsCommandParams, type IUpdatePdfUnitPropsMutationParams, ImportPdfSourceCommand, type JapanPostBarState, PDF_DIFF_COLORS, PDF_PAGE_PRESETS, type PdfAlignMode, PdfBatesPosition, type PdfCanonicalBarcodeType, PdfColorSpaceType, type PdfConvertibleImageInput, PdfDateTimeKind, PdfDisplayUnit, type PdfDistributeDirection, PdfElementType, type PdfExifMatrixTuple, type PdfExifOrientation, PdfImportError, type PdfImportErrorCode, PdfInteractionMode, PdfIoService, type PdfIoTarget, PdfIoTargetError, type PdfLayerOrderMode, PdfPageRotation, PdfSelectionService, PdfUnitModel, RemovePdfElementsMutation, RemovePdfLayerCommand, RemovePdfPageCommand, RemovePdfPageMutation, ReorderPdfElementOrderMutation, ReorderPdfLayerCommand, ReorderPdfPagesCommand, ReorderPdfPagesMutation, ReplacePdfNativeTextCommand, ReplacePdfSnapshotCommand, RestorePdfVersionCommand, RotatePdfPageCommand, SavePdfVersionCommand, SetPdfAttachmentsCommand, SetPdfBatesConfigCommand, SetPdfBookmarksCommand, SetPdfHeaderFooterConfigCommand, SetPdfNativeTextSpansCommand, SetPdfPageCropBoxCommand, SetPdfPageSizeCommand, SetPdfWatermarkConfigCommand, type SignatureQuadraticSegment, type SilentPrintDriverType, type SvgMat2D, UNIVER_PDFS_PLUGIN_NAME, UniverPdfsPlugin, UpdatePdfElementsCommand, UpdatePdfElementsMutation, UpdatePdfLayerCommand, UpdatePdfPageMutation, UpdatePdfPagePropsCommand, UpdatePdfUnitPropsCommand, UpdatePdfUnitPropsMutation, applyOcrToUnitPage, autoDetectFormFieldsOnPage, buildMinimalTestTrueTypeFont, buildPdfTemplateFromOcrFields, canonicalJsonStringify, cmykToRgb, collectUsedCodePointsFromPdfUnit, comparePdfBytes, comparePdfUnits, computeBarcodeLayoutBox, computeCircleMarkBezierEllipse, computeDynamicLayoutSplitRanges, computeElementCenterTransformMatrix, computeExifTransformMatrix, computeExpandedTextHeightMm, computeExpandedTextHeightPt, computeImageFitPlacement, computePasteCascadeOffset, computePdfPayloadDigest, computeSmartSnapWithEqualGap, convertImagesToPdfBytes, convertMarkdownToPdfBytes, convertMarkdownToPdfUnit, convertPdfBytesToCsv, convertPdfBytesToDocxBytes, convertPdfToSheetStructure, convertPdfToWordStructure, convertPdfUnitToCsv, createDefaultElement, createDefaultPdfUnitData, createHttpSilentPrintAdapter, detectFormFieldsFromPageSpans, drawVectorSvgOnPdfPage, encodeBarcodeByFormat, encodeCodabar, encodeCode128, encodeCode39, encodeDataMatrix, encodeEan13, encodeEan8, encodeGs1128, encodeGs1DataMatrix, encodeItf14, encodeJapanPost, encodeNw7, encodePdf417, encodeQrCodeMatrix, encodeUpcA, encodeUpcE, evaluatePdfFormExpression, evaluateSafeTemplateExpression, exportFormDataToFdf, exportFormDataToXfdf, exportPdfToDocxSnapshot, exportPdfToWorkbookSnapshot, exportSignedPdfWithAuditSeal, extractAttachmentsFromPdfBytes, extractNativeTextSpansFromPdfBytes, formatGs1HumanReadable, formatPdfDateTimeValue, generatePdfTemplateByPrompt, getDefaultDateTimeFormat, getRegisteredOcrAdapter, getTrueTypeMappedCodePoints, importAcroFormPdfToUnit, importFormDataFromFdf, importFormDataFromXfdf, importPdfSource, insertPdfPagesBytes, inspectPdfBytePageSizes, inspectTrueTypeFont, isAspectRatioLockedBarcodeType, isCircleMarkChecked, isExifDimensionsSwapped, mayBeJson, mergePdfBytes, movePdfPageBytes, normalizeBarcodeFormatType, optimizePdfUnit, organizePdfBytes, paginatePdfListItems, parseGs1ApplicationIdentifiers, parseInlineMarkdownToSpans, parseObjectPositionRatios, parsePdfColorWithAlpha, parsePdfContentStreamTextOps, parsePdfPageRange, parseSafeKeyValueRecord, parseSvgToVectorCommands, parseSvgTransformAttr, readJpegExifOrientation, recalculatePdfFormFields, rectsIntersect, registerOcrAdapter, removePdfPagesBytes, renderBarcodeSvgByFormat, renderBarcodeSvgDataUrlByFormat, renderDataMatrixSvg, renderDataMatrixSvgDataUrl, renderGs1128Svg, renderGs1128SvgDataUrl, renderGs1DataMatrixSvg, renderGs1DataMatrixSvgDataUrl, renderPdf417Svg, renderPdf417SvgDataUrl, renderPdfBytesToImages, resolveMultiVariableText, rgbToCmyk, rotatePdfPagesBytes, runPdfBatchPipeline, safeLookupVariablePath, sanitizePdfUnit, scanTemplateExpressionTokens, sha256BytesSync, sha256Hex, sha256HexSync, signPdfUnitWithDigest, exportSignedPdfWithAuditSeal as signPdfWithAuditDigest, smoothSignatureStrokeQuadratic, splitPdfBytes, stripPdfPageNativeTextInRects, subsetTrueTypeFont, svgToDataUri, toHtmlDateTimeInputValue, toPdfLibColor, toggleCircleMarkState, validatePdfFormFields, verifyPdfAuditSeal as verifyPdfAuditDigest, verifyPdfAuditSeal, verifyPdfUnitSignature, visitTemplateVariables, wrapPdfTextLines };
2095
+ export { ASPECT_RATIO_LOCKED_BARCODE_TYPES, AddPdfElementCommand, AddPdfElementMutation, AddPdfLayerCommand, AddPdfPageCommand, AddPdfPageMutation, AlignSelectedPdfElementsCommand, type AspectRatioLockedBarcodeType, AssignPdfElementLayerCommand, BARCODE_TYPES, CIRCLE_MARK_BEZIER_KAPPA, DeleteSelectedPdfElementsCommand, DistributeSelectedPdfElementsCommand, DuplicateSelectedPdfElementsCommand, FindAndReplacePdfTextCommand, type IAddPdfElementCommandParams, type IAddPdfLayerCommandParams, type IAssignPdfElementLayerCommandParams, type IBarcodeBarRun, type IBarcodeLayoutBox, type IBeforePdfExportHookParams, type IBeforePdfPrintHookParams, type ICircleMarkBezierEllipse, type IComputeSmartSnapParams, type IConvertImagesToPdfOptions, type IConvertMarkdownToPdfOptions, type IDataMatrixEncodedResult, type IDeleteSelectedPdfElementsCommandParams, type IDistributeSelectedPdfElementsCommandParams, type IDynamicLayoutItemInput, type IDynamicLayoutPlacement, type IDynamicLayoutSplitOptions, type IDynamicLayoutSplitRange, type IFindAndReplacePdfTextCommandParams, type IGs1128EncodedResult, type IGs1DataMatrixEncodedResult, type IHttpSilentPrintAdapterConfig, type IImageFitPlacement, type IImportPdfSourceCommandParams, type IJapanPostBar, type IJapanPostEncodedResult, type ILinear1dEncodedResult, type INw7EncodedResult, type IParsedPdfColor, type IParsedStreamTextOp, type IPdf417EncodedResult, type IPdfAiCopilotAdapter, IPdfAttachment, type IPdfAuditSealOptions, type IPdfAuditVerificationResult, type IPdfBatchAction, type IPdfBatchPipelineFileInput, type IPdfBatchPipelineItemResult, IPdfBatesConfig, IPdfBookmarkItem, IPdfCircleMarkElement, type IPdfComparisonResult, IPdfCropBox, IPdfDocument, IPdfDocumentData, type IPdfDocxDocumentSnapshot, type IPdfElementDiffItem, type IPdfExportContext, IPdfExportOptions, type IPdfExportedHookParams, type IPdfFormFieldIssue, type IPdfFormValidationResult, IPdfHeaderFooterConfig, type IPdfImportContext, type IPdfImportOutcome, type IPdfImportOutcomeReport, type IPdfImportSourceOptions, type IPdfImportSourceResult, type IPdfImportWarning, type IPdfImportWithReportContext, type IPdfInspectedPageSize, type IPdfIoAdapter, type IPdfIoAdapterImportResult, type IPdfIoCapabilities, type IPdfIoFormatCapability, type IPdfIoFormatListConfig, IPdfIoService, IPdfLayer, IPdfListElement, type IPdfListPageChunk, IPdfNativeTextSpan, type IPdfOcrAdapter, type IPdfOcrFieldInput, type IPdfOcrPageInfo, type IPdfOcrRecognizedBlock, type IPdfOptimizeUnitOptions, type IPdfOrganizeAction, IPdfPage, IPdfPageElement, IPdfPageSize, type IPdfRenderedPageImage, IPdfResourceBinding, IPdfRichTextSpan, type IPdfSanitizeOptions, type IPdfSaveContext, IPdfSecurityPermissions, IPdfSelectionService, type IPdfSelectionState, type IPdfSheetConvertedStructure, type IPdfSheetConvertedTable, IPdfSignatureEnvelope, type IPdfSignedAuditResult, IPdfSignerInfo, IPdfSourceDocumentRef, type IPdfTextDiffItem, IPdfTextElement, IPdfTextStyle, IPdfUnitData, IPdfUnitMetadata, type IPdfUnitPropsPatch, type IPdfUnitSignatureVerificationResult, IPdfVersionSnapshot, type IPdfViewportRatio, IPdfWatermarkConfig, type IPdfWordBlock, type IPdfWordConvertedPage, type IPdfWordConvertedStructure, type IPdfWorkbookCell, type IPdfWorkbookSnapshot, IPdfjsAssetsConfig, type IRemovePdfLayerCommandParams, type IRenderPdfBytesToImagesOptions, type IReplacePdfNativeTextCommandParams, type IRotatePdfPageCommandParams, type ISetPdfAttachmentsCommandParams, type ISetPdfBatesConfigCommandParams, type ISetPdfBookmarksCommandParams, type ISetPdfHeaderFooterConfigCommandParams, type ISetPdfNativeTextSpansCommandParams, type ISetPdfPageCropBoxCommandParams, type ISetPdfWatermarkConfigCommandParams, type ISilentPrintOptions, type ISilentPrintResult, type ISmartSnapBox, type ISnapGuideLine, type ISubsetFontResult, type ITemplateVariableMatch, type ITrueTypeFontInspection, type IUnifiedBarcodeEncoded, type IUniverPdfsConfig, type IUpdatePdfElementsCommandParams, type IUpdatePdfLayerCommandParams, type IUpdatePdfPageMutationParams, type IUpdatePdfPagePropsCommandParams, type IUpdatePdfUnitPropsCommandParams, type IUpdatePdfUnitPropsMutationParams, ImportPdfSourceCommand, type JapanPostBarState, PDF_DIFF_COLORS, PDF_PAGE_PRESETS, type PdfAlignMode, PdfBatesPosition, type PdfCanonicalBarcodeType, PdfColorSpaceType, type PdfConvertibleImageInput, PdfDateTimeKind, PdfDisplayUnit, type PdfDistributeDirection, PdfElementType, type PdfExifMatrixTuple, type PdfExifOrientation, PdfImportError, type PdfImportErrorCode, PdfInteractionMode, PdfIoService, type PdfIoTarget, PdfIoTargetError, type PdfLayerOrderMode, PdfPageRotation, type PdfRawImportWarning, PdfSelectionService, PdfUnitModel, RemovePdfElementsMutation, RemovePdfLayerCommand, RemovePdfPageCommand, RemovePdfPageMutation, ReorderPdfElementOrderMutation, ReorderPdfLayerCommand, ReorderPdfPagesCommand, ReorderPdfPagesMutation, ReplacePdfNativeTextCommand, ReplacePdfSnapshotCommand, RestorePdfVersionCommand, RotatePdfPageCommand, SavePdfVersionCommand, SetPdfAttachmentsCommand, SetPdfBatesConfigCommand, SetPdfBookmarksCommand, SetPdfHeaderFooterConfigCommand, SetPdfNativeTextSpansCommand, SetPdfPageCropBoxCommand, SetPdfPageSizeCommand, SetPdfWatermarkConfigCommand, type SignatureQuadraticSegment, type SilentPrintDriverType, type SvgMat2D, UNIVER_PDFS_PLUGIN_NAME, UniverPdfsPlugin, UpdatePdfElementsCommand, UpdatePdfElementsMutation, UpdatePdfLayerCommand, UpdatePdfPageMutation, UpdatePdfPagePropsCommand, UpdatePdfUnitPropsCommand, UpdatePdfUnitPropsMutation, applyOcrToUnitPage, autoDetectFormFieldsOnPage, buildMinimalTestTrueTypeFont, buildOverlayImportCandidateSnapshot, buildPdfTemplateFromOcrFields, canonicalJsonStringify, cmykToRgb, collectUsedCodePointsFromPdfUnit, comparePdfBytes, comparePdfUnits, computeBarcodeLayoutBox, computeCircleMarkBezierEllipse, computeDynamicLayoutSplitRanges, computeElementCenterTransformMatrix, computeExifTransformMatrix, computeExpandedTextHeightMm, computeExpandedTextHeightPt, computeImageFitPlacement, computePasteCascadeOffset, computePdfPayloadDigest, computeSmartSnapWithEqualGap, convertImagesToPdfBytes, convertMarkdownToPdfBytes, convertMarkdownToPdfUnit, convertPdfBytesToCsv, convertPdfBytesToDocxBytes, convertPdfToSheetStructure, convertPdfToWordStructure, convertPdfUnitToCsv, createDefaultElement, createDefaultPdfUnitData, createHttpSilentPrintAdapter, detectFormFieldsFromPageSpans, drawVectorSvgOnPdfPage, encodeBarcodeByFormat, encodeCodabar, encodeCode128, encodeCode39, encodeDataMatrix, encodeEan13, encodeEan8, encodeGs1128, encodeGs1DataMatrix, encodeItf14, encodeJapanPost, encodeNw7, encodePdf417, encodeQrCodeMatrix, encodeUpcA, encodeUpcE, evaluatePdfFormExpression, evaluateSafeTemplateExpression, exportFormDataToFdf, exportFormDataToXfdf, exportPdfToDocxSnapshot, exportPdfToWorkbookSnapshot, exportSignedPdfWithAuditSeal, extractAttachmentsFromPdfBytes, extractNativeTextSpansFromPdfBytes, formatGs1HumanReadable, formatPdfDateTimeValue, generatePdfTemplateByPrompt, getDefaultDateTimeFormat, getRegisteredOcrAdapter, getTrueTypeMappedCodePoints, importAcroFormPdfToUnit, importFormDataFromFdf, importFormDataFromXfdf, importPdfSource, insertPdfPagesBytes, inspectPdfBytePageSizes, inspectTrueTypeFont, isAspectRatioLockedBarcodeType, isCircleMarkChecked, isExifDimensionsSwapped, mayBeJson, mergePdfBytes, movePdfPageBytes, normalizeBarcodeFormatType, normalizePdfImportWarnings, optimizePdfUnit, organizePdfBytes, paginatePdfListItems, parseGs1ApplicationIdentifiers, parseInlineMarkdownToSpans, parseObjectPositionRatios, parsePdfColorWithAlpha, parsePdfContentStreamTextOps, parsePdfPageRange, parseSafeKeyValueRecord, parseSvgToVectorCommands, parseSvgTransformAttr, readJpegExifOrientation, recalculatePdfFormFields, rectsIntersect, registerOcrAdapter, removePdfPagesBytes, renderBarcodeSvgByFormat, renderBarcodeSvgDataUrlByFormat, renderDataMatrixSvg, renderDataMatrixSvgDataUrl, renderGs1128Svg, renderGs1128SvgDataUrl, renderGs1DataMatrixSvg, renderGs1DataMatrixSvgDataUrl, renderPdf417Svg, renderPdf417SvgDataUrl, renderPdfBytesToImages, resolveMultiVariableText, rgbToCmyk, rotatePdfPagesBytes, runPdfBatchPipeline, safeLookupVariablePath, sanitizePdfUnit, scanTemplateExpressionTokens, sha256BytesSync, sha256Hex, sha256HexSync, signPdfUnitWithDigest, exportSignedPdfWithAuditSeal as signPdfWithAuditDigest, smoothSignatureStrokeQuadratic, splitPdfBytes, stripPdfPageNativeTextInRects, subsetTrueTypeFont, svgToDataUri, toHtmlDateTimeInputValue, toPdfLibColor, toggleCircleMarkState, validatePdfFormFields, verifyPdfAuditSeal as verifyPdfAuditDigest, verifyPdfAuditSeal, verifyPdfUnitSignature, visitTemplateVariables, wrapPdfTextLines };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yudaocode/univer-pdfs",
3
- "version": "1.6.209",
3
+ "version": "1.6.211",
4
4
  "description": "Univer PDFs core unit model, commands, PDF exporter, JSX layout DSL, and template adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/yudaocode/yudao-univer#readme",