@borurio-print/print-designer 1.0.26 → 1.0.28

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.
@@ -14,6 +14,12 @@ export interface TemplatePrintDialogOpenOptions {
14
14
  /** 调用方可指定任务 ID;缺少时由组件生成。 */
15
15
  requestId?: string;
16
16
  }
17
+ /** 模板 PDF 生成完成、提交给本地打印控件前对外提供的最终文件。 */
18
+ export interface TemplatePrintPdfGenerated {
19
+ requestId: string;
20
+ blob: Blob;
21
+ pageCount: number;
22
+ }
17
23
  export interface TemplatePrintDialogProps {
18
24
  templates: readonly TemplatePrintOption[];
19
25
  defaultTemplateId?: string | number;
@@ -35,6 +41,7 @@ export interface TemplatePrintDialogProps {
35
41
  closeOnSuccess?: boolean;
36
42
  theme?: PrintDesignerTheme;
37
43
  onPrintResult?: (result: PrintResult) => void;
44
+ onPdfGenerated?: (result: TemplatePrintPdfGenerated) => void;
38
45
  onLoadingChange?: (loading: boolean) => void;
39
46
  onConnectionChange?: PrintPluginProps['onConnectionChange'];
40
47
  onSettingsChange?: (setting: PrinterSetting) => void;
@@ -8,7 +8,8 @@ export interface TextBoxLayoutResult {
8
8
  truncated: boolean;
9
9
  textAnchor: 'start' | 'middle' | 'end';
10
10
  textXOffsetMm: number;
11
- textYOffsetMm: number;
11
+ /** 第一行文字的 alphabetic baseline,相对文本框顶部的偏移。 */
12
+ textBaselineOffsetMm: number;
12
13
  }
13
14
  export interface TextBoxInitialSize {
14
15
  widthMm: number;