@worm-vue3-print/core 1.3.0 → 1.3.2
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.
- package/dist/browser/index.cjs +300 -63
- package/dist/browser/index.d.cts +2 -2
- package/dist/browser/index.d.ts +2 -2
- package/dist/browser/index.js +1 -1
- package/dist/{chunk-V4A5623C.js → chunk-B2XJSF4V.js} +1 -1
- package/dist/{chunk-VFEURLAZ.js → chunk-BBSFBAWT.js} +308 -63
- package/dist/client/index.cjs +381 -0
- package/dist/client/index.d.cts +241 -0
- package/dist/client/index.d.ts +241 -0
- package/dist/client/index.js +346 -0
- package/dist/designer/index.cjs +196 -11
- package/dist/designer/index.d.cts +21 -6
- package/dist/designer/index.d.ts +21 -6
- package/dist/designer/index.js +35 -4
- package/dist/{driver-CsWkGK4a.d.cts → driver-Dn_YAzO5.d.cts} +4 -1
- package/dist/{driver-CsWkGK4a.d.ts → driver-Dn_YAzO5.d.ts} +4 -1
- package/dist/index.cjs +316 -63
- package/dist/index.d.cts +29 -7
- package/dist/index.d.ts +29 -7
- package/dist/index.js +18 -2
- package/dist/node/index.d.cts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/{ports-B63x7kCX.d.ts → ports-BvwlA_km.d.ts} +1 -1
- package/dist/{ports-q934kIC7.d.cts → ports-Cf5sjwls.d.cts} +1 -1
- package/package.json +6 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TemplateData, C as CodeRenderer, P as PageLayout, I as MeasuredElement, J as TemplateElement, W as WatermarkOptions, K as PaperMm, L as ViewportPx, N as HeightSource, O as MarginsMm, Q as PdfTargetSpec, X as ScreenshotTargetSpec, R as RawMeasurement, a as CodeSpec, Y as CodeRenderOptions, D as DriverFactory, Z as ExecutorBundle, _ as TileLayout, $ as PrintJob, a0 as PreparedDocument, a1 as RenderPdfResult, M as MultiPageTemplateData, a2 as PrintFontDeclaration } from './driver-
|
|
2
|
-
export { a3 as ContinuousPaperSize, a4 as EXECUTOR_TARGETS, a5 as ExecutorMethod, a6 as ExecutorTargetKind, a7 as FALLBACK_FONT_STACK, a8 as MAX_BATCH_COPIES, a9 as NormalizedPrintData, aa as PAPER_DIMENSIONS, ab as PageDriver, ac as PageSection, ad as PaperSize, ae as PrintDataInput, af as PrintFontFile, ag as RenderCell, ah as RenderRequest, ai as RenderRow, aj as SheetPaperSize, ak as TILE_DEFAULTS, G as TextFit, al as TilingError, am as TilingIssue, an as TilingIssueCode, ao as TilingOptions, ap as TilingResolveOptions, aq as TilingTemplateInput, ar as buildFontFaceCss, as as computeMaxColumns, at as computeTileLayout, au as escapeInlineStyleValue, av as getPaperDimensions, aw as isContinuousPaper, ax as isContinuousPaperSize, ay as normalizePrintData, az as normalizeTilingOptions, aA as resolveSheetMm, aB as roundMm, aC as tilePosition, aD as toFontFamilyStack, aE as validateTiling } from './driver-
|
|
3
|
-
import { F as FitFontSize, P as PrintRuntime } from './ports-
|
|
4
|
-
export { C as CellFitRowKind, h as DEFAULT_READINESS_MS, D as DEFAULT_SHRINK_MIN_FONT_SIZE_PT, i as DEFAULT_TIMEOUT_MS, M as MIN_SHRINK_FONT_SIZE_PT, j as MeasureResult, k as PrintSession, S as SessionBudget, c as cellFitCapMm, a as cellFitKey, f as floorFontSize, p as parseCellFitKey, r as resolveCellTextFit, d as resolveElementTextFit, e as resolveShrinkMinFontSize, g as roundFontSize } from './ports-
|
|
1
|
+
import { T as TemplateData, C as CodeRenderer, P as PageLayout, I as MeasuredElement, J as TemplateElement, W as WatermarkOptions, K as PaperMm, L as ViewportPx, N as HeightSource, O as MarginsMm, Q as PdfTargetSpec, X as ScreenshotTargetSpec, R as RawMeasurement, a as CodeSpec, Y as CodeRenderOptions, D as DriverFactory, Z as ExecutorBundle, _ as TileLayout, $ as PrintJob, a0 as PreparedDocument, a1 as RenderPdfResult, M as MultiPageTemplateData, a2 as PrintFontDeclaration } from './driver-Dn_YAzO5.cjs';
|
|
2
|
+
export { a3 as ContinuousPaperSize, a4 as EXECUTOR_TARGETS, a5 as ExecutorMethod, a6 as ExecutorTargetKind, a7 as FALLBACK_FONT_STACK, a8 as MAX_BATCH_COPIES, a9 as NormalizedPrintData, aa as PAPER_DIMENSIONS, ab as PageDriver, ac as PageSection, ad as PaperSize, ae as PrintDataInput, af as PrintFontFile, ag as RenderCell, ah as RenderRequest, ai as RenderRow, aj as SheetPaperSize, ak as TILE_DEFAULTS, G as TextFit, al as TilingError, am as TilingIssue, an as TilingIssueCode, ao as TilingOptions, ap as TilingResolveOptions, aq as TilingTemplateInput, ar as buildFontFaceCss, as as computeMaxColumns, at as computeTileLayout, au as escapeInlineStyleValue, av as getPaperDimensions, aw as isContinuousPaper, ax as isContinuousPaperSize, ay as normalizePrintData, az as normalizeTilingOptions, aA as resolveSheetMm, aB as roundMm, aC as tilePosition, aD as toFontFamilyStack, aE as validateTiling } from './driver-Dn_YAzO5.cjs';
|
|
3
|
+
import { F as FitFontSize, P as PrintRuntime } from './ports-Cf5sjwls.cjs';
|
|
4
|
+
export { C as CellFitRowKind, h as DEFAULT_READINESS_MS, D as DEFAULT_SHRINK_MIN_FONT_SIZE_PT, i as DEFAULT_TIMEOUT_MS, M as MIN_SHRINK_FONT_SIZE_PT, j as MeasureResult, k as PrintSession, S as SessionBudget, c as cellFitCapMm, a as cellFitKey, f as floorFontSize, p as parseCellFitKey, r as resolveCellTextFit, d as resolveElementTextFit, e as resolveShrinkMinFontSize, g as roundFontSize } from './ports-Cf5sjwls.cjs';
|
|
5
5
|
|
|
6
6
|
type TokenType = 'num' | 'str' | 'bool' | 'ident' | 'punc';
|
|
7
7
|
interface Token {
|
|
@@ -131,6 +131,25 @@ declare const systemVars: {
|
|
|
131
131
|
printTime: () => number;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
+
/** ADD(a, b, …):相加,无法解析为数字的参数按 0 处理 */
|
|
135
|
+
declare function addNumbers(...values: unknown[]): number;
|
|
136
|
+
/** SUB(a, b, …):首项依次减去后续各项 */
|
|
137
|
+
declare function subtractNumbers(...values: unknown[]): number;
|
|
138
|
+
/** MUL(a, b, …):相乘 */
|
|
139
|
+
declare function multiplyNumbers(...values: unknown[]): number;
|
|
140
|
+
/** DIV(a, b):相除,除数为 0 返回 0(不产生 Infinity / NaN) */
|
|
141
|
+
declare function divideNumbers(a: unknown, b: unknown): number;
|
|
142
|
+
/**
|
|
143
|
+
* ROUND(n, d):四舍五入到 d 位小数(d 缺省 2;负数修约到整十/整百,如 -2 → 百位)
|
|
144
|
+
*/
|
|
145
|
+
declare function round(value: unknown, digits?: unknown): number;
|
|
146
|
+
/** ROUNDUP / CEIL(n, d):进一法(远离零方向) */
|
|
147
|
+
declare function roundUp(value: unknown, digits?: unknown): number;
|
|
148
|
+
/** ROUNDDOWN / FLOOR(n, d):去尾法(朝零方向) */
|
|
149
|
+
declare function roundDown(value: unknown, digits?: unknown): number;
|
|
150
|
+
/** ROUNDBANK(n, d):四舍六入五成双(GB/T 8170 数值修约规则) */
|
|
151
|
+
declare function roundHalfEven(value: unknown, digits?: unknown): number;
|
|
152
|
+
|
|
134
153
|
/**
|
|
135
154
|
* 将模板中元素的 formatter 表达式求值为实际值。
|
|
136
155
|
* 返回新的模板对象(深拷贝),不修改原始模板。
|
|
@@ -213,8 +232,11 @@ declare function elementPositionStyle(left: number, top: number, width: number,
|
|
|
213
232
|
|
|
214
233
|
/**
|
|
215
234
|
* 表格设计底部(mm)= 设计 top + 设计高度。
|
|
216
|
-
*
|
|
217
|
-
*
|
|
235
|
+
* 设计高度取 max(options.height, tableRows 行高之和):
|
|
236
|
+
* - options.height 是设计器实测回写的渲染高度(用户在画布上所见并据此对齐下方元素的底部),
|
|
237
|
+
* 为相对布局偏移的忠实基准;
|
|
238
|
+
* - tableRows 行高之和是 min-height 语义下表格实际渲染的物理下界,
|
|
239
|
+
* 当 options.height 缺失或被低估时兜底,避免跟随元素偏移算成负值反向叠压表格。
|
|
218
240
|
*/
|
|
219
241
|
declare function tableDesignBottom(el: TemplateElement): number;
|
|
220
242
|
/**
|
|
@@ -551,4 +573,4 @@ declare class TemplateEngine {
|
|
|
551
573
|
render(template: string, context: Record<string, any>): string;
|
|
552
574
|
}
|
|
553
575
|
|
|
554
|
-
export { type ASTNode, type BatchCopyInput, CodeRenderOptions, CodeRenderer, CodeSpec, type CollectingCodeRenderer, DriverFactory, type ElectronPrintToPdfOptions, type EngineOptions, ExecutorBundle, type ExprFunction, FitFontSize, type GenerateOptions, HeightSource, MICROMETERS_PER_INCH, MICROMETERS_PER_MM, MIN_CONTINUOUS_HEIGHT_MM, MM_PER_INCH, MM_PER_PX, MarginsMm, MeasuredElement, type MultiPageCopyInput, type MultiPageDocument, MultiPageTemplateData, PX_PER_MM, PageLayout, PaperMm, type PaperOverride, PdfTargetSpec, type PlaywrightPdfOptions, PreparedDocument, PrintFailure, type PrintFailureCode, PrintFontDeclaration, PrintJob, PrintRuntime, TemplateData as PrintTemplateData, TemplateElement as PrintTemplateElement, RawMeasurement, type RenderFinalPagesOptions, RenderPdfResult, type ResolvePaperInput, type ResolvedWatermark, ScreenshotTargetSpec, type SystemVariableContext, type TemplateAST, TemplateEngine, type TileInput, TileLayout, ViewportPx, WATERMARK_DEFAULTS, WATERMARK_DENSITY_PRESETS, WatermarkOptions, type WatermarkPaper, type WatermarkTile, applyTextFitSizes, avg, bindData, buildBasePageCss, buildPageCss, buildPageGeometryCss, buildPageRuleCss, buildPdfTargetSpec, buildScreenshotTargetSpec, codeSpecKey, compileTemplate, composeBatchHtml, composeContinuousHeight, composeMultiPageDocument, composeTiledHtml, count, createCollectingCodeRenderer, createDomHostRuntime, createMapCodeRenderer, elementPositionStyle, escapeHeightMm, evaluate, evaluateTemplate, formatDate, formatMoney, formatTimestamp, generateHtml, getByPath, ifFn, injectSystemVariables, isMultiPageTemplate, isWatermarkVisible, max, mergeCodeMaps, mergeFontDeclarations, micrometersToMillimeters, millimetersToInches, millimetersToMicrometers, min, mm, mmToPx, normalizeMeasurements, normalizeTemplate, paginate, paperViewportPx, parse, parseTemplate, prepareDocument, pxToMm, renderPdf, renderScreenshot, renderTemplate, renderWatermarkLayerHtml, renderWatermarkTileSvg, resolvePaperMm, resolveSystemVariables, resolveWatermarkLayout, resolveWatermarkText, safeEval, setPageIndex, setTotalPages, sum, systemVars, tableDesignBottom, toElectronPrintToPdfOptions, toPlaywrightPdfOptions, toPrintFailure, toUpperCaseAmount, tokenize, withTimeout };
|
|
576
|
+
export { type ASTNode, type BatchCopyInput, CodeRenderOptions, CodeRenderer, CodeSpec, type CollectingCodeRenderer, DriverFactory, type ElectronPrintToPdfOptions, type EngineOptions, ExecutorBundle, type ExprFunction, FitFontSize, type GenerateOptions, HeightSource, MICROMETERS_PER_INCH, MICROMETERS_PER_MM, MIN_CONTINUOUS_HEIGHT_MM, MM_PER_INCH, MM_PER_PX, MarginsMm, MeasuredElement, type MultiPageCopyInput, type MultiPageDocument, MultiPageTemplateData, PX_PER_MM, PageLayout, PaperMm, type PaperOverride, PdfTargetSpec, type PlaywrightPdfOptions, PreparedDocument, PrintFailure, type PrintFailureCode, PrintFontDeclaration, PrintJob, PrintRuntime, TemplateData as PrintTemplateData, TemplateElement as PrintTemplateElement, RawMeasurement, type RenderFinalPagesOptions, RenderPdfResult, type ResolvePaperInput, type ResolvedWatermark, ScreenshotTargetSpec, type SystemVariableContext, type TemplateAST, TemplateEngine, type TileInput, TileLayout, ViewportPx, WATERMARK_DEFAULTS, WATERMARK_DENSITY_PRESETS, WatermarkOptions, type WatermarkPaper, type WatermarkTile, addNumbers, applyTextFitSizes, avg, bindData, buildBasePageCss, buildPageCss, buildPageGeometryCss, buildPageRuleCss, buildPdfTargetSpec, buildScreenshotTargetSpec, codeSpecKey, compileTemplate, composeBatchHtml, composeContinuousHeight, composeMultiPageDocument, composeTiledHtml, count, createCollectingCodeRenderer, createDomHostRuntime, createMapCodeRenderer, divideNumbers, elementPositionStyle, escapeHeightMm, evaluate, evaluateTemplate, formatDate, formatMoney, formatTimestamp, generateHtml, getByPath, ifFn, injectSystemVariables, isMultiPageTemplate, isWatermarkVisible, max, mergeCodeMaps, mergeFontDeclarations, micrometersToMillimeters, millimetersToInches, millimetersToMicrometers, min, mm, mmToPx, multiplyNumbers, normalizeMeasurements, normalizeTemplate, paginate, paperViewportPx, parse, parseTemplate, prepareDocument, pxToMm, renderPdf, renderScreenshot, renderTemplate, renderWatermarkLayerHtml, renderWatermarkTileSvg, resolvePaperMm, resolveSystemVariables, resolveWatermarkLayout, resolveWatermarkText, round, roundDown, roundHalfEven, roundUp, safeEval, setPageIndex, setTotalPages, subtractNumbers, sum, systemVars, tableDesignBottom, toElectronPrintToPdfOptions, toPlaywrightPdfOptions, toPrintFailure, toUpperCaseAmount, tokenize, withTimeout };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TemplateData, C as CodeRenderer, P as PageLayout, I as MeasuredElement, J as TemplateElement, W as WatermarkOptions, K as PaperMm, L as ViewportPx, N as HeightSource, O as MarginsMm, Q as PdfTargetSpec, X as ScreenshotTargetSpec, R as RawMeasurement, a as CodeSpec, Y as CodeRenderOptions, D as DriverFactory, Z as ExecutorBundle, _ as TileLayout, $ as PrintJob, a0 as PreparedDocument, a1 as RenderPdfResult, M as MultiPageTemplateData, a2 as PrintFontDeclaration } from './driver-
|
|
2
|
-
export { a3 as ContinuousPaperSize, a4 as EXECUTOR_TARGETS, a5 as ExecutorMethod, a6 as ExecutorTargetKind, a7 as FALLBACK_FONT_STACK, a8 as MAX_BATCH_COPIES, a9 as NormalizedPrintData, aa as PAPER_DIMENSIONS, ab as PageDriver, ac as PageSection, ad as PaperSize, ae as PrintDataInput, af as PrintFontFile, ag as RenderCell, ah as RenderRequest, ai as RenderRow, aj as SheetPaperSize, ak as TILE_DEFAULTS, G as TextFit, al as TilingError, am as TilingIssue, an as TilingIssueCode, ao as TilingOptions, ap as TilingResolveOptions, aq as TilingTemplateInput, ar as buildFontFaceCss, as as computeMaxColumns, at as computeTileLayout, au as escapeInlineStyleValue, av as getPaperDimensions, aw as isContinuousPaper, ax as isContinuousPaperSize, ay as normalizePrintData, az as normalizeTilingOptions, aA as resolveSheetMm, aB as roundMm, aC as tilePosition, aD as toFontFamilyStack, aE as validateTiling } from './driver-
|
|
3
|
-
import { F as FitFontSize, P as PrintRuntime } from './ports-
|
|
4
|
-
export { C as CellFitRowKind, h as DEFAULT_READINESS_MS, D as DEFAULT_SHRINK_MIN_FONT_SIZE_PT, i as DEFAULT_TIMEOUT_MS, M as MIN_SHRINK_FONT_SIZE_PT, j as MeasureResult, k as PrintSession, S as SessionBudget, c as cellFitCapMm, a as cellFitKey, f as floorFontSize, p as parseCellFitKey, r as resolveCellTextFit, d as resolveElementTextFit, e as resolveShrinkMinFontSize, g as roundFontSize } from './ports-
|
|
1
|
+
import { T as TemplateData, C as CodeRenderer, P as PageLayout, I as MeasuredElement, J as TemplateElement, W as WatermarkOptions, K as PaperMm, L as ViewportPx, N as HeightSource, O as MarginsMm, Q as PdfTargetSpec, X as ScreenshotTargetSpec, R as RawMeasurement, a as CodeSpec, Y as CodeRenderOptions, D as DriverFactory, Z as ExecutorBundle, _ as TileLayout, $ as PrintJob, a0 as PreparedDocument, a1 as RenderPdfResult, M as MultiPageTemplateData, a2 as PrintFontDeclaration } from './driver-Dn_YAzO5.js';
|
|
2
|
+
export { a3 as ContinuousPaperSize, a4 as EXECUTOR_TARGETS, a5 as ExecutorMethod, a6 as ExecutorTargetKind, a7 as FALLBACK_FONT_STACK, a8 as MAX_BATCH_COPIES, a9 as NormalizedPrintData, aa as PAPER_DIMENSIONS, ab as PageDriver, ac as PageSection, ad as PaperSize, ae as PrintDataInput, af as PrintFontFile, ag as RenderCell, ah as RenderRequest, ai as RenderRow, aj as SheetPaperSize, ak as TILE_DEFAULTS, G as TextFit, al as TilingError, am as TilingIssue, an as TilingIssueCode, ao as TilingOptions, ap as TilingResolveOptions, aq as TilingTemplateInput, ar as buildFontFaceCss, as as computeMaxColumns, at as computeTileLayout, au as escapeInlineStyleValue, av as getPaperDimensions, aw as isContinuousPaper, ax as isContinuousPaperSize, ay as normalizePrintData, az as normalizeTilingOptions, aA as resolveSheetMm, aB as roundMm, aC as tilePosition, aD as toFontFamilyStack, aE as validateTiling } from './driver-Dn_YAzO5.js';
|
|
3
|
+
import { F as FitFontSize, P as PrintRuntime } from './ports-BvwlA_km.js';
|
|
4
|
+
export { C as CellFitRowKind, h as DEFAULT_READINESS_MS, D as DEFAULT_SHRINK_MIN_FONT_SIZE_PT, i as DEFAULT_TIMEOUT_MS, M as MIN_SHRINK_FONT_SIZE_PT, j as MeasureResult, k as PrintSession, S as SessionBudget, c as cellFitCapMm, a as cellFitKey, f as floorFontSize, p as parseCellFitKey, r as resolveCellTextFit, d as resolveElementTextFit, e as resolveShrinkMinFontSize, g as roundFontSize } from './ports-BvwlA_km.js';
|
|
5
5
|
|
|
6
6
|
type TokenType = 'num' | 'str' | 'bool' | 'ident' | 'punc';
|
|
7
7
|
interface Token {
|
|
@@ -131,6 +131,25 @@ declare const systemVars: {
|
|
|
131
131
|
printTime: () => number;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
+
/** ADD(a, b, …):相加,无法解析为数字的参数按 0 处理 */
|
|
135
|
+
declare function addNumbers(...values: unknown[]): number;
|
|
136
|
+
/** SUB(a, b, …):首项依次减去后续各项 */
|
|
137
|
+
declare function subtractNumbers(...values: unknown[]): number;
|
|
138
|
+
/** MUL(a, b, …):相乘 */
|
|
139
|
+
declare function multiplyNumbers(...values: unknown[]): number;
|
|
140
|
+
/** DIV(a, b):相除,除数为 0 返回 0(不产生 Infinity / NaN) */
|
|
141
|
+
declare function divideNumbers(a: unknown, b: unknown): number;
|
|
142
|
+
/**
|
|
143
|
+
* ROUND(n, d):四舍五入到 d 位小数(d 缺省 2;负数修约到整十/整百,如 -2 → 百位)
|
|
144
|
+
*/
|
|
145
|
+
declare function round(value: unknown, digits?: unknown): number;
|
|
146
|
+
/** ROUNDUP / CEIL(n, d):进一法(远离零方向) */
|
|
147
|
+
declare function roundUp(value: unknown, digits?: unknown): number;
|
|
148
|
+
/** ROUNDDOWN / FLOOR(n, d):去尾法(朝零方向) */
|
|
149
|
+
declare function roundDown(value: unknown, digits?: unknown): number;
|
|
150
|
+
/** ROUNDBANK(n, d):四舍六入五成双(GB/T 8170 数值修约规则) */
|
|
151
|
+
declare function roundHalfEven(value: unknown, digits?: unknown): number;
|
|
152
|
+
|
|
134
153
|
/**
|
|
135
154
|
* 将模板中元素的 formatter 表达式求值为实际值。
|
|
136
155
|
* 返回新的模板对象(深拷贝),不修改原始模板。
|
|
@@ -213,8 +232,11 @@ declare function elementPositionStyle(left: number, top: number, width: number,
|
|
|
213
232
|
|
|
214
233
|
/**
|
|
215
234
|
* 表格设计底部(mm)= 设计 top + 设计高度。
|
|
216
|
-
*
|
|
217
|
-
*
|
|
235
|
+
* 设计高度取 max(options.height, tableRows 行高之和):
|
|
236
|
+
* - options.height 是设计器实测回写的渲染高度(用户在画布上所见并据此对齐下方元素的底部),
|
|
237
|
+
* 为相对布局偏移的忠实基准;
|
|
238
|
+
* - tableRows 行高之和是 min-height 语义下表格实际渲染的物理下界,
|
|
239
|
+
* 当 options.height 缺失或被低估时兜底,避免跟随元素偏移算成负值反向叠压表格。
|
|
218
240
|
*/
|
|
219
241
|
declare function tableDesignBottom(el: TemplateElement): number;
|
|
220
242
|
/**
|
|
@@ -551,4 +573,4 @@ declare class TemplateEngine {
|
|
|
551
573
|
render(template: string, context: Record<string, any>): string;
|
|
552
574
|
}
|
|
553
575
|
|
|
554
|
-
export { type ASTNode, type BatchCopyInput, CodeRenderOptions, CodeRenderer, CodeSpec, type CollectingCodeRenderer, DriverFactory, type ElectronPrintToPdfOptions, type EngineOptions, ExecutorBundle, type ExprFunction, FitFontSize, type GenerateOptions, HeightSource, MICROMETERS_PER_INCH, MICROMETERS_PER_MM, MIN_CONTINUOUS_HEIGHT_MM, MM_PER_INCH, MM_PER_PX, MarginsMm, MeasuredElement, type MultiPageCopyInput, type MultiPageDocument, MultiPageTemplateData, PX_PER_MM, PageLayout, PaperMm, type PaperOverride, PdfTargetSpec, type PlaywrightPdfOptions, PreparedDocument, PrintFailure, type PrintFailureCode, PrintFontDeclaration, PrintJob, PrintRuntime, TemplateData as PrintTemplateData, TemplateElement as PrintTemplateElement, RawMeasurement, type RenderFinalPagesOptions, RenderPdfResult, type ResolvePaperInput, type ResolvedWatermark, ScreenshotTargetSpec, type SystemVariableContext, type TemplateAST, TemplateEngine, type TileInput, TileLayout, ViewportPx, WATERMARK_DEFAULTS, WATERMARK_DENSITY_PRESETS, WatermarkOptions, type WatermarkPaper, type WatermarkTile, applyTextFitSizes, avg, bindData, buildBasePageCss, buildPageCss, buildPageGeometryCss, buildPageRuleCss, buildPdfTargetSpec, buildScreenshotTargetSpec, codeSpecKey, compileTemplate, composeBatchHtml, composeContinuousHeight, composeMultiPageDocument, composeTiledHtml, count, createCollectingCodeRenderer, createDomHostRuntime, createMapCodeRenderer, elementPositionStyle, escapeHeightMm, evaluate, evaluateTemplate, formatDate, formatMoney, formatTimestamp, generateHtml, getByPath, ifFn, injectSystemVariables, isMultiPageTemplate, isWatermarkVisible, max, mergeCodeMaps, mergeFontDeclarations, micrometersToMillimeters, millimetersToInches, millimetersToMicrometers, min, mm, mmToPx, normalizeMeasurements, normalizeTemplate, paginate, paperViewportPx, parse, parseTemplate, prepareDocument, pxToMm, renderPdf, renderScreenshot, renderTemplate, renderWatermarkLayerHtml, renderWatermarkTileSvg, resolvePaperMm, resolveSystemVariables, resolveWatermarkLayout, resolveWatermarkText, safeEval, setPageIndex, setTotalPages, sum, systemVars, tableDesignBottom, toElectronPrintToPdfOptions, toPlaywrightPdfOptions, toPrintFailure, toUpperCaseAmount, tokenize, withTimeout };
|
|
576
|
+
export { type ASTNode, type BatchCopyInput, CodeRenderOptions, CodeRenderer, CodeSpec, type CollectingCodeRenderer, DriverFactory, type ElectronPrintToPdfOptions, type EngineOptions, ExecutorBundle, type ExprFunction, FitFontSize, type GenerateOptions, HeightSource, MICROMETERS_PER_INCH, MICROMETERS_PER_MM, MIN_CONTINUOUS_HEIGHT_MM, MM_PER_INCH, MM_PER_PX, MarginsMm, MeasuredElement, type MultiPageCopyInput, type MultiPageDocument, MultiPageTemplateData, PX_PER_MM, PageLayout, PaperMm, type PaperOverride, PdfTargetSpec, type PlaywrightPdfOptions, PreparedDocument, PrintFailure, type PrintFailureCode, PrintFontDeclaration, PrintJob, PrintRuntime, TemplateData as PrintTemplateData, TemplateElement as PrintTemplateElement, RawMeasurement, type RenderFinalPagesOptions, RenderPdfResult, type ResolvePaperInput, type ResolvedWatermark, ScreenshotTargetSpec, type SystemVariableContext, type TemplateAST, TemplateEngine, type TileInput, TileLayout, ViewportPx, WATERMARK_DEFAULTS, WATERMARK_DENSITY_PRESETS, WatermarkOptions, type WatermarkPaper, type WatermarkTile, addNumbers, applyTextFitSizes, avg, bindData, buildBasePageCss, buildPageCss, buildPageGeometryCss, buildPageRuleCss, buildPdfTargetSpec, buildScreenshotTargetSpec, codeSpecKey, compileTemplate, composeBatchHtml, composeContinuousHeight, composeMultiPageDocument, composeTiledHtml, count, createCollectingCodeRenderer, createDomHostRuntime, createMapCodeRenderer, divideNumbers, elementPositionStyle, escapeHeightMm, evaluate, evaluateTemplate, formatDate, formatMoney, formatTimestamp, generateHtml, getByPath, ifFn, injectSystemVariables, isMultiPageTemplate, isWatermarkVisible, max, mergeCodeMaps, mergeFontDeclarations, micrometersToMillimeters, millimetersToInches, millimetersToMicrometers, min, mm, mmToPx, multiplyNumbers, normalizeMeasurements, normalizeTemplate, paginate, paperViewportPx, parse, parseTemplate, prepareDocument, pxToMm, renderPdf, renderScreenshot, renderTemplate, renderWatermarkLayerHtml, renderWatermarkTileSvg, resolvePaperMm, resolveSystemVariables, resolveWatermarkLayout, resolveWatermarkText, round, roundDown, roundHalfEven, roundUp, safeEval, setPageIndex, setTotalPages, subtractNumbers, sum, systemVars, tableDesignBottom, toElectronPrintToPdfOptions, toPlaywrightPdfOptions, toPrintFailure, toUpperCaseAmount, tokenize, withTimeout };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TemplateEngine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-B2XJSF4V.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_READINESS_MS,
|
|
6
6
|
DEFAULT_SHRINK_MIN_FONT_SIZE_PT,
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
TilingError,
|
|
22
22
|
WATERMARK_DEFAULTS,
|
|
23
23
|
WATERMARK_DENSITY_PRESETS,
|
|
24
|
+
addNumbers,
|
|
24
25
|
applyTextFitSizes,
|
|
25
26
|
avg,
|
|
26
27
|
bindData,
|
|
@@ -45,6 +46,7 @@ import {
|
|
|
45
46
|
createCollectingCodeRenderer,
|
|
46
47
|
createDomHostRuntime,
|
|
47
48
|
createMapCodeRenderer,
|
|
49
|
+
divideNumbers,
|
|
48
50
|
elementPositionStyle,
|
|
49
51
|
escapeHeightMm,
|
|
50
52
|
escapeInlineStyleValue,
|
|
@@ -72,6 +74,7 @@ import {
|
|
|
72
74
|
min,
|
|
73
75
|
mm,
|
|
74
76
|
mmToPx2 as mmToPx,
|
|
77
|
+
multiplyNumbers,
|
|
75
78
|
normalizeMeasurements,
|
|
76
79
|
normalizePrintData,
|
|
77
80
|
normalizeTemplate,
|
|
@@ -96,11 +99,16 @@ import {
|
|
|
96
99
|
resolveSystemVariables,
|
|
97
100
|
resolveWatermarkLayout,
|
|
98
101
|
resolveWatermarkText,
|
|
102
|
+
round,
|
|
103
|
+
roundDown,
|
|
99
104
|
roundFontSize,
|
|
105
|
+
roundHalfEven,
|
|
100
106
|
roundMm,
|
|
107
|
+
roundUp,
|
|
101
108
|
safeEval,
|
|
102
109
|
setPageIndex,
|
|
103
110
|
setTotalPages,
|
|
111
|
+
subtractNumbers,
|
|
104
112
|
sum,
|
|
105
113
|
systemVars,
|
|
106
114
|
tableDesignBottom,
|
|
@@ -113,7 +121,7 @@ import {
|
|
|
113
121
|
tokenize,
|
|
114
122
|
validateTiling,
|
|
115
123
|
withTimeout
|
|
116
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-BBSFBAWT.js";
|
|
117
125
|
export {
|
|
118
126
|
DEFAULT_READINESS_MS,
|
|
119
127
|
DEFAULT_SHRINK_MIN_FONT_SIZE_PT,
|
|
@@ -135,6 +143,7 @@ export {
|
|
|
135
143
|
TilingError,
|
|
136
144
|
WATERMARK_DEFAULTS,
|
|
137
145
|
WATERMARK_DENSITY_PRESETS,
|
|
146
|
+
addNumbers,
|
|
138
147
|
applyTextFitSizes,
|
|
139
148
|
avg,
|
|
140
149
|
bindData,
|
|
@@ -159,6 +168,7 @@ export {
|
|
|
159
168
|
createCollectingCodeRenderer,
|
|
160
169
|
createDomHostRuntime,
|
|
161
170
|
createMapCodeRenderer,
|
|
171
|
+
divideNumbers,
|
|
162
172
|
elementPositionStyle,
|
|
163
173
|
escapeHeightMm,
|
|
164
174
|
escapeInlineStyleValue,
|
|
@@ -186,6 +196,7 @@ export {
|
|
|
186
196
|
min,
|
|
187
197
|
mm,
|
|
188
198
|
mmToPx,
|
|
199
|
+
multiplyNumbers,
|
|
189
200
|
normalizeMeasurements,
|
|
190
201
|
normalizePrintData,
|
|
191
202
|
normalizeTemplate,
|
|
@@ -210,11 +221,16 @@ export {
|
|
|
210
221
|
resolveSystemVariables,
|
|
211
222
|
resolveWatermarkLayout,
|
|
212
223
|
resolveWatermarkText,
|
|
224
|
+
round,
|
|
225
|
+
roundDown,
|
|
213
226
|
roundFontSize,
|
|
227
|
+
roundHalfEven,
|
|
214
228
|
roundMm,
|
|
229
|
+
roundUp,
|
|
215
230
|
safeEval,
|
|
216
231
|
setPageIndex,
|
|
217
232
|
setTotalPages,
|
|
233
|
+
subtractNumbers,
|
|
218
234
|
sum,
|
|
219
235
|
systemVars,
|
|
220
236
|
tableDesignBottom,
|
package/dist/node/index.d.cts
CHANGED
package/dist/node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as TextFit, a as CodeSpec, L as ViewportPx, R as RawMeasurement, Q as PdfTargetSpec, X as ScreenshotTargetSpec } from './driver-
|
|
1
|
+
import { G as TextFit, a as CodeSpec, L as ViewportPx, R as RawMeasurement, Q as PdfTargetSpec, X as ScreenshotTargetSpec } from './driver-Dn_YAzO5.js';
|
|
2
2
|
|
|
3
3
|
/** 自动缩小的默认下限字号(pt) */
|
|
4
4
|
declare const DEFAULT_SHRINK_MIN_FONT_SIZE_PT = 6;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as TextFit, a as CodeSpec, L as ViewportPx, R as RawMeasurement, Q as PdfTargetSpec, X as ScreenshotTargetSpec } from './driver-
|
|
1
|
+
import { G as TextFit, a as CodeSpec, L as ViewportPx, R as RawMeasurement, Q as PdfTargetSpec, X as ScreenshotTargetSpec } from './driver-Dn_YAzO5.cjs';
|
|
2
2
|
|
|
3
3
|
/** 自动缩小的默认下限字号(pt) */
|
|
4
4
|
declare const DEFAULT_SHRINK_MIN_FONT_SIZE_PT = 6;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worm-vue3-print/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "打印模板表达式引擎、同构渲染管线与框架无关的设计器内核(HTML 生成/分页/数据绑定/设计器模型与工具),无 Vue/React 依赖",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
"types": "./dist/node/index.d.ts",
|
|
28
28
|
"import": "./dist/node/index.js",
|
|
29
29
|
"require": "./dist/node/index.cjs"
|
|
30
|
+
},
|
|
31
|
+
"./client": {
|
|
32
|
+
"types": "./dist/client/index.d.ts",
|
|
33
|
+
"import": "./dist/client/index.js",
|
|
34
|
+
"require": "./dist/client/index.cjs"
|
|
30
35
|
}
|
|
31
36
|
},
|
|
32
37
|
"files": [
|