@agile-team/mach-report 2.5.0 → 2.6.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 (84) hide show
  1. package/README.md +91 -14
  2. package/dist/ReportPreview-Dk-28QAi.js +2946 -0
  3. package/dist/ReportPreview-FSvcBLjH.cjs +6 -0
  4. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  5. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  6. package/dist/analytics.cjs +1 -0
  7. package/dist/analytics.d.cts +276 -0
  8. package/dist/analytics.d.ts +276 -0
  9. package/dist/analytics.js +223 -0
  10. package/dist/assets-66UBlhES.cjs +1 -0
  11. package/dist/assets-NVA_sftu.js +163 -0
  12. package/dist/capabilities-CNjIirfo.js +36 -0
  13. package/dist/capabilities-D4xeVYSR.cjs +1 -0
  14. package/dist/designer.cjs +1 -0
  15. package/dist/designer.d.cts +753 -0
  16. package/dist/designer.d.ts +753 -0
  17. package/dist/designer.js +372 -0
  18. package/dist/grid-geometry-BNptEcMm.js +65 -0
  19. package/dist/grid-geometry-CZ_cYB6O.cjs +1 -0
  20. package/dist/index.cjs +8 -5
  21. package/dist/index.d.cts +413 -8
  22. package/dist/index.d.ts +413 -8
  23. package/dist/index.js +1016 -1501
  24. package/dist/param-validation-BWNjLcN0.js +116 -0
  25. package/dist/param-validation-CiTxFeZ8.cjs +1 -0
  26. package/dist/pdf.cjs +48 -48
  27. package/dist/pdf.d.cts +111 -1
  28. package/dist/pdf.d.ts +111 -1
  29. package/dist/pdf.js +3931 -3868
  30. package/dist/{plugin-DMPLDpBY.cjs → plugin-BqBkn_kI.cjs} +1 -1
  31. package/dist/{plugin-DDLcFWlk.js → plugin-Ds10VnQO.js} +2 -2
  32. package/dist/render-plan-CckPEQyf.cjs +1 -0
  33. package/dist/{render-plan-CXBWRog4.js → render-plan-uzZYYSy1.js} +11 -10
  34. package/dist/report-params-B_VCihAh.js +12 -0
  35. package/dist/report-params-CjWrjPl6.cjs +1 -0
  36. package/dist/report-source-B9bENO0F.js +750 -0
  37. package/dist/report-source-BbNkkBDy.cjs +1 -0
  38. package/dist/server/node.d.cts +297 -0
  39. package/dist/server/node.d.ts +297 -0
  40. package/dist/server-node.cjs +1 -0
  41. package/dist/server-node.js +270 -0
  42. package/dist/server.cjs +1 -0
  43. package/dist/server.d.cts +643 -0
  44. package/dist/server.d.ts +643 -0
  45. package/dist/server.js +237 -0
  46. package/dist/style-CpwiOPyB.cjs +1 -0
  47. package/dist/style-Dv5o_x6b.js +67 -0
  48. package/dist/style.css +1 -1
  49. package/dist/template-registry-DWExx0gU.cjs +1 -0
  50. package/dist/template-registry-NpOakidD.js +354 -0
  51. package/dist/textwrap-CnGsEum6.cjs +4 -0
  52. package/dist/textwrap-DOl04hCQ.js +110 -0
  53. package/dist/validate-DfHPD8wX.cjs +1 -0
  54. package/dist/validate-S6CgIm5d.js +148 -0
  55. package/dist/vue/async.d.cts +602 -57
  56. package/dist/vue/async.d.ts +602 -57
  57. package/dist/vue/index.d.cts +1074 -111
  58. package/dist/vue/index.d.ts +1074 -111
  59. package/dist/vue-async.cjs +1 -1
  60. package/dist/vue-async.js +3 -3
  61. package/dist/vue.cjs +1 -1
  62. package/dist/vue.js +167 -82
  63. package/dist/worker.cjs +1 -0
  64. package/dist/worker.d.cts +302 -0
  65. package/dist/worker.d.ts +302 -0
  66. package/dist/worker.js +133 -0
  67. package/dist/xlsx/node.d.cts +47 -0
  68. package/dist/xlsx/node.d.ts +47 -0
  69. package/dist/xlsx-node.cjs +221 -0
  70. package/dist/xlsx-node.js +36409 -0
  71. package/dist/xlsx.cjs +20 -20
  72. package/dist/xlsx.d.cts +78 -1
  73. package/dist/xlsx.d.ts +78 -1
  74. package/dist/xlsx.js +5974 -5831
  75. package/package.json +62 -2
  76. package/dist/ReportPreview-CBKLI--k.js +0 -2188
  77. package/dist/ReportPreview-ClM8h0pM.cjs +0 -6
  78. package/dist/grid-geometry-BNIvw52m.cjs +0 -1
  79. package/dist/grid-geometry-C8hGoe9o.js +0 -130
  80. package/dist/render-plan-CCTL4F9v.cjs +0 -1
  81. package/dist/report-params-B3Fia6JO.js +0 -10
  82. package/dist/report-params-D1gZ1DME.cjs +0 -1
  83. package/dist/textwrap-nH0UYU6D.js +0 -108
  84. package/dist/textwrap-oD-t4b4B.cjs +0 -4
@@ -56,6 +56,18 @@ toolbar: {
56
56
  type: PropType<MachReportToolbarOptions>;
57
57
  default: undefined;
58
58
  };
59
+ interaction: {
60
+ type: PropType<ReportInteractionOptions>;
61
+ default: undefined;
62
+ };
63
+ preferences: {
64
+ type: PropType<ReportPreferencesOptions>;
65
+ default: undefined;
66
+ };
67
+ assets: {
68
+ type: PropType<AssetRenderOptions>;
69
+ default: undefined;
70
+ };
59
71
  /** 保留表头的零行业务结果;不改变计划和导出内容。 */
60
72
  emptyState: {
61
73
  type: PropType<boolean | ReportEmptyState>;
@@ -104,24 +116,46 @@ type: PropType<PlanFetcher | null>;
104
116
  default: null;
105
117
  };
106
118
  }>, {
107
- reload: typeof reload;
108
- print: typeof print_2;
109
- exportAs: typeof exportAs;
110
- openPdfWindow: typeof openPdfWindow;
111
- gotoPage: typeof gotoPage;
112
- setParams: typeof setParams;
113
- checkPdfFont: typeof checkPdfFont;
114
- importExcel: typeof importExcel;
115
- getPlan: typeof getPlan;
116
- getChanges: () => ReportCellEdit_2[];
117
119
  state: ComputedRef<MachReportState>;
120
+ checkPdfFont?(): Promise<PdfFontCheckResult>;
121
+ reload(): Promise<void>;
122
+ print(): Promise<void>;
123
+ exportAs(format: string): Promise<void> | void;
124
+ openPdfWindow(): void;
125
+ gotoPage(page: number): void;
126
+ setParams(values: Record<string, string>, opts?: {
127
+ reload
128
+ /**
129
+ * ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
130
+ *
131
+ * 职责编排(实现在 composables,本文件保持薄壳):
132
+ * - usePageWindow:视口虚拟化(自然坐标系 + gap)
133
+ * - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
134
+ * - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
135
+ * - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
136
+ * - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
137
+ */
138
+ ?: boolean;
139
+ }): Promise<void> | void;
140
+ importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions): Promise<ExcelImportResult | null>;
141
+ getPlan?(): RenderPlan | null;
142
+ getChanges?(): ReportCellEdit_2[];
143
+ getDifferences?(): ReportCellEdit_2[];
144
+ undo?(): Promise<boolean>;
145
+ redo?(): Promise<boolean>;
146
+ restoreChanges?(): Promise<boolean>;
147
+ getSelection?(): ReportCellSelection | null;
148
+ focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
149
+ focusField?(target: ReportFieldTarget): Promise<boolean>;
150
+ copySelection?(): string;
151
+ pasteSelection?(text: string): Promise<boolean>;
118
152
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
153
+ warning: (message: string) => any;
119
154
  error: (message: string, detail?: {
120
155
  code: string;
121
156
  cause?: unknown;
122
157
  } | undefined) => any;
123
158
  loaded: (pageCount: number) => any;
124
- warning: (message: string) => any;
125
159
  "cell-edit": (edit: ReportCellEdit_2) => any;
126
160
  "template-import": (result: ExcelImportResult) => any;
127
161
  "preferences-change": (preferences: Readonly<ReportPreviewPreferences>) => any;
@@ -163,6 +197,18 @@ toolbar: {
163
197
  type: PropType<MachReportToolbarOptions>;
164
198
  default: undefined;
165
199
  };
200
+ interaction: {
201
+ type: PropType<ReportInteractionOptions>;
202
+ default: undefined;
203
+ };
204
+ preferences: {
205
+ type: PropType<ReportPreferencesOptions>;
206
+ default: undefined;
207
+ };
208
+ assets: {
209
+ type: PropType<AssetRenderOptions>;
210
+ default: undefined;
211
+ };
166
212
  /** 保留表头的零行业务结果;不改变计划和导出内容。 */
167
213
  emptyState: {
168
214
  type: PropType<boolean | ReportEmptyState>;
@@ -211,12 +257,12 @@ type: PropType<PlanFetcher | null>;
211
257
  default: null;
212
258
  };
213
259
  }>> & Readonly<{
260
+ onWarning?: ((message: string) => any) | undefined;
214
261
  onError?: ((message: string, detail?: {
215
262
  code: string;
216
263
  cause?: unknown;
217
264
  } | undefined) => any) | undefined;
218
265
  onLoaded?: ((pageCount: number) => any) | undefined;
219
- onWarning?: ((message: string) => any) | undefined;
220
266
  "onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
221
267
  "onTemplate-import"?: ((result: ExcelImportResult) => any) | undefined;
222
268
  "onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
@@ -233,6 +279,9 @@ showPdfWindow: boolean;
233
279
  showSettings: boolean;
234
280
  showParams: boolean;
235
281
  toolbar: MachReportToolbarOptions;
282
+ interaction: ReportInteractionOptions;
283
+ preferences: ReportPreferencesOptions;
284
+ assets: AssetRenderOptions;
236
285
  messages: Partial<MachReportMessages>;
237
286
  excelImport: boolean | ExcelImportOptions;
238
287
  autoLoad: boolean;
@@ -241,6 +290,167 @@ preset: string;
241
290
  paramDefs: ReportParamDef[] | undefined;
242
291
  fetcher: PlanFetcher | null;
243
292
  }, {}, {}, {}, string, ComponentProvideOptions, true, {
293
+ paramPanelRef: CreateComponentPublicInstanceWithMixins<Readonly<{
294
+ defs: ReportParamDef[];
295
+ modelValue: Record<string, string>;
296
+ messages: MachReportMessages;
297
+ attempted: boolean;
298
+ issues?: readonly ReportParamIssue[];
299
+ }> & Readonly<{
300
+ onReset?: (() => any) | undefined;
301
+ onQuery?: (() => any) | undefined;
302
+ "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
303
+ }>, {
304
+ focusInvalid: () => void;
305
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
306
+ reset: () => any;
307
+ query: () => any;
308
+ "update:modelValue": (value: Record<string, string>) => any;
309
+ }, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
310
+ root: HTMLDivElement;
311
+ }, HTMLDivElement, ComponentProvideOptions, {
312
+ P: {};
313
+ B: {};
314
+ D: {};
315
+ C: {};
316
+ M: {};
317
+ Defaults: {};
318
+ }, Readonly<{
319
+ defs: ReportParamDef[];
320
+ modelValue: Record<string, string>;
321
+ messages: MachReportMessages;
322
+ attempted: boolean;
323
+ issues?: readonly ReportParamIssue[];
324
+ }> & Readonly<{
325
+ onReset?: (() => any) | undefined;
326
+ onQuery?: (() => any) | undefined;
327
+ "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
328
+ }>, {
329
+ focusInvalid: () => void;
330
+ }, {}, {}, {}, {}> | null;
331
+ toolbarRef: CreateComponentPublicInstanceWithMixins<Readonly<{
332
+ pageCount: number;
333
+ currentPage: number;
334
+ zoomMode: "fit" | "raw";
335
+ zoom: number;
336
+ showExport: boolean;
337
+ showPrint: boolean;
338
+ showPdfWindow: boolean;
339
+ messages: MachReportMessages;
340
+ search: {
341
+ visible: boolean;
342
+ query: string;
343
+ matchIndex: number;
344
+ matchCount: number;
345
+ searching
346
+ /**
347
+ * ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
348
+ *
349
+ * 职责编排(实现在 composables,本文件保持薄壳):
350
+ * - usePageWindow:视口虚拟化(自然坐标系 + gap)
351
+ * - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
352
+ * - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
353
+ * - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
354
+ * - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
355
+ */
356
+ ?: boolean;
357
+ };
358
+ thumbsVisible: boolean;
359
+ showImport?: boolean;
360
+ showSearch?: boolean;
361
+ showThumbnails?: boolean;
362
+ showZoom?: boolean;
363
+ exportFormats?: readonly ReportExportFormat[];
364
+ showSettings?: boolean;
365
+ settingsOpen?: boolean;
366
+ busy?: boolean;
367
+ }> & Readonly<{
368
+ onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
369
+ onPrint?: (() => any) | undefined;
370
+ onZoom?: ((mode: number | "fit") => any) | undefined;
371
+ onGoto?: ((page: number) => any) | undefined;
372
+ "onPdf-window"?: (() => any) | undefined;
373
+ "onSearch-input"?: ((query: string) => any) | undefined;
374
+ "onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
375
+ "onSearch-toggle"?: (() => any) | undefined;
376
+ "onThumbs-toggle"?: (() => any) | undefined;
377
+ "onImport-excel"?: (() => any) | undefined;
378
+ "onSettings-toggle"?: (() => any) | undefined;
379
+ }>, {
380
+ focusSearch: () => void;
381
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
382
+ export: (format: "pdf" | "xlsx" | "html" | "png" | "word") => any;
383
+ print: () => any;
384
+ zoom: (mode: number | "fit") => any;
385
+ goto: (page: number) => any;
386
+ "pdf-window": () => any;
387
+ "search-input": (query: string) => any;
388
+ "search-nav": (dir: 1 | -1) => any;
389
+ "search-toggle": () => any;
390
+ "thumbs-toggle": () => any;
391
+ "import-excel": () => any;
392
+ "settings-toggle": () => any;
393
+ }, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
394
+ searchInputRef: HTMLInputElement;
395
+ searchToggleRef: HTMLButtonElement;
396
+ }, HTMLDivElement, ComponentProvideOptions, {
397
+ P: {};
398
+ B: {};
399
+ D: {};
400
+ C: {};
401
+ M: {};
402
+ Defaults: {};
403
+ }, Readonly<{
404
+ pageCount: number;
405
+ currentPage: number;
406
+ zoomMode: "fit" | "raw";
407
+ zoom: number;
408
+ showExport: boolean;
409
+ showPrint: boolean;
410
+ showPdfWindow: boolean;
411
+ messages: MachReportMessages;
412
+ search: {
413
+ visible: boolean;
414
+ query: string;
415
+ matchIndex: number;
416
+ matchCount: number;
417
+ searching
418
+ /**
419
+ * ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
420
+ *
421
+ * 职责编排(实现在 composables,本文件保持薄壳):
422
+ * - usePageWindow:视口虚拟化(自然坐标系 + gap)
423
+ * - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
424
+ * - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
425
+ * - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
426
+ * - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
427
+ */
428
+ ?: boolean;
429
+ };
430
+ thumbsVisible: boolean;
431
+ showImport?: boolean;
432
+ showSearch?: boolean;
433
+ showThumbnails?: boolean;
434
+ showZoom?: boolean;
435
+ exportFormats?: readonly ReportExportFormat[];
436
+ showSettings?: boolean;
437
+ settingsOpen?: boolean;
438
+ busy?: boolean;
439
+ }> & Readonly<{
440
+ onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
441
+ onPrint?: (() => any) | undefined;
442
+ onZoom?: ((mode: number | "fit") => any) | undefined;
443
+ onGoto?: ((page: number) => any) | undefined;
444
+ "onPdf-window"?: (() => any) | undefined;
445
+ "onSearch-input"?: ((query: string) => any) | undefined;
446
+ "onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
447
+ "onSearch-toggle"?: (() => any) | undefined;
448
+ "onThumbs-toggle"?: (() => any) | undefined;
449
+ "onImport-excel"?: (() => any) | undefined;
450
+ "onSettings-toggle"?: (() => any) | undefined;
451
+ }>, {
452
+ focusSearch: () => void;
453
+ }, {}, {}, {}, {}> | null;
244
454
  importInputRef: HTMLInputElement;
245
455
  viewportRef: HTMLDivElement;
246
456
  containerRef: HTMLDivElement;
@@ -280,6 +490,7 @@ declare type __VLS_Props_2 = {
280
490
  messages: MachReportMessages;
281
491
  /** 触发过查询后才开始必填提示(避免首屏一片红) */
282
492
  attempted: boolean;
493
+ issues?: readonly ReportParamIssue[];
283
494
  };
284
495
 
285
496
  declare function __VLS_template(): {
@@ -289,6 +500,167 @@ declare function __VLS_template(): {
289
500
  default?(_: {}): any;
290
501
  };
291
502
  refs: {
503
+ paramPanelRef: CreateComponentPublicInstanceWithMixins<Readonly<{
504
+ defs: ReportParamDef[];
505
+ modelValue: Record<string, string>;
506
+ messages: MachReportMessages;
507
+ attempted: boolean;
508
+ issues?: readonly ReportParamIssue[];
509
+ }> & Readonly<{
510
+ onReset?: (() => any) | undefined;
511
+ onQuery?: (() => any) | undefined;
512
+ "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
513
+ }>, {
514
+ focusInvalid: () => void;
515
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
516
+ reset: () => any;
517
+ query: () => any;
518
+ "update:modelValue": (value: Record<string, string>) => any;
519
+ }, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
520
+ root: HTMLDivElement;
521
+ }, HTMLDivElement, ComponentProvideOptions, {
522
+ P: {};
523
+ B: {};
524
+ D: {};
525
+ C: {};
526
+ M: {};
527
+ Defaults: {};
528
+ }, Readonly<{
529
+ defs: ReportParamDef[];
530
+ modelValue: Record<string, string>;
531
+ messages: MachReportMessages;
532
+ attempted: boolean;
533
+ issues?: readonly ReportParamIssue[];
534
+ }> & Readonly<{
535
+ onReset?: (() => any) | undefined;
536
+ onQuery?: (() => any) | undefined;
537
+ "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
538
+ }>, {
539
+ focusInvalid: () => void;
540
+ }, {}, {}, {}, {}> | null;
541
+ toolbarRef: CreateComponentPublicInstanceWithMixins<Readonly<{
542
+ pageCount: number;
543
+ currentPage: number;
544
+ zoomMode: "fit" | "raw";
545
+ zoom: number;
546
+ showExport: boolean;
547
+ showPrint: boolean;
548
+ showPdfWindow: boolean;
549
+ messages: MachReportMessages;
550
+ search: {
551
+ visible: boolean;
552
+ query: string;
553
+ matchIndex: number;
554
+ matchCount: number;
555
+ searching
556
+ /**
557
+ * ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
558
+ *
559
+ * 职责编排(实现在 composables,本文件保持薄壳):
560
+ * - usePageWindow:视口虚拟化(自然坐标系 + gap)
561
+ * - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
562
+ * - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
563
+ * - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
564
+ * - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
565
+ */
566
+ ?: boolean;
567
+ };
568
+ thumbsVisible: boolean;
569
+ showImport?: boolean;
570
+ showSearch?: boolean;
571
+ showThumbnails?: boolean;
572
+ showZoom?: boolean;
573
+ exportFormats?: readonly ReportExportFormat[];
574
+ showSettings?: boolean;
575
+ settingsOpen?: boolean;
576
+ busy?: boolean;
577
+ }> & Readonly<{
578
+ onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
579
+ onPrint?: (() => any) | undefined;
580
+ onZoom?: ((mode: number | "fit") => any) | undefined;
581
+ onGoto?: ((page: number) => any) | undefined;
582
+ "onPdf-window"?: (() => any) | undefined;
583
+ "onSearch-input"?: ((query: string) => any) | undefined;
584
+ "onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
585
+ "onSearch-toggle"?: (() => any) | undefined;
586
+ "onThumbs-toggle"?: (() => any) | undefined;
587
+ "onImport-excel"?: (() => any) | undefined;
588
+ "onSettings-toggle"?: (() => any) | undefined;
589
+ }>, {
590
+ focusSearch: () => void;
591
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
592
+ export: (format: "pdf" | "xlsx" | "html" | "png" | "word") => any;
593
+ print: () => any;
594
+ zoom: (mode: number | "fit") => any;
595
+ goto: (page: number) => any;
596
+ "pdf-window": () => any;
597
+ "search-input": (query: string) => any;
598
+ "search-nav": (dir: 1 | -1) => any;
599
+ "search-toggle": () => any;
600
+ "thumbs-toggle": () => any;
601
+ "import-excel": () => any;
602
+ "settings-toggle": () => any;
603
+ }, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
604
+ searchInputRef: HTMLInputElement;
605
+ searchToggleRef: HTMLButtonElement;
606
+ }, HTMLDivElement, ComponentProvideOptions, {
607
+ P: {};
608
+ B: {};
609
+ D: {};
610
+ C: {};
611
+ M: {};
612
+ Defaults: {};
613
+ }, Readonly<{
614
+ pageCount: number;
615
+ currentPage: number;
616
+ zoomMode: "fit" | "raw";
617
+ zoom: number;
618
+ showExport: boolean;
619
+ showPrint: boolean;
620
+ showPdfWindow: boolean;
621
+ messages: MachReportMessages;
622
+ search: {
623
+ visible: boolean;
624
+ query: string;
625
+ matchIndex: number;
626
+ matchCount: number;
627
+ searching
628
+ /**
629
+ * ReportPreview:接收报表 ID 和 PlanFetcher,预览与导出 RenderPlan。
630
+ *
631
+ * 职责编排(实现在 composables,本文件保持薄壳):
632
+ * - usePageWindow:视口虚拟化(自然坐标系 + gap)
633
+ * - useZoom:transform: scale 缩放(零重排;Ctrl+滚轮/键盘 ±/持久化记忆)
634
+ * - usePrintExport:打印/导出/PDF 窗口(流式打印 + named pages)
635
+ * - useReportSearch/useThumbs/useDebugPanel:搜索(防抖+高亮)/缩略图/调试面板
636
+ * - 配置优先级:props > provideMachReportConfig 叠加 > preset > 插件 config.defaults > 内置缺省
637
+ */
638
+ ?: boolean;
639
+ };
640
+ thumbsVisible: boolean;
641
+ showImport?: boolean;
642
+ showSearch?: boolean;
643
+ showThumbnails?: boolean;
644
+ showZoom?: boolean;
645
+ exportFormats?: readonly ReportExportFormat[];
646
+ showSettings?: boolean;
647
+ settingsOpen?: boolean;
648
+ busy?: boolean;
649
+ }> & Readonly<{
650
+ onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
651
+ onPrint?: (() => any) | undefined;
652
+ onZoom?: ((mode: number | "fit") => any) | undefined;
653
+ onGoto?: ((page: number) => any) | undefined;
654
+ "onPdf-window"?: (() => any) | undefined;
655
+ "onSearch-input"?: ((query: string) => any) | undefined;
656
+ "onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
657
+ "onSearch-toggle"?: (() => any) | undefined;
658
+ "onThumbs-toggle"?: (() => any) | undefined;
659
+ "onImport-excel"?: (() => any) | undefined;
660
+ "onSettings-toggle"?: (() => any) | undefined;
661
+ }>, {
662
+ focusSearch: () => void;
663
+ }, {}, {}, {}, {}> | null;
292
664
  importInputRef: HTMLInputElement;
293
665
  viewportRef: HTMLDivElement;
294
666
  containerRef: HTMLDivElement;
@@ -305,6 +677,25 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
305
677
  };
306
678
  };
307
679
 
680
+ declare interface AssetRenderBudget {
681
+ /** Maximum newly rendered assets, default 1000. Existing imageData is kept unchanged. */
682
+ maxAssets?: number;
683
+ /** Maximum image payload bytes per new asset, default 32 MiB. */
684
+ maxImageBytes?: number;
685
+ /** Maximum total image payload bytes for new assets, default 128 MiB. */
686
+ maxTotalImageBytes?: number;
687
+ /** Wall-clock budget, including adapters that ignore AbortSignal. Default 30 seconds. */
688
+ maxDurationMs?: number;
689
+ }
690
+
691
+ declare interface AssetRenderOptions extends OutputDiagnosticOptions {
692
+ assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
693
+ assetBudget?: AssetRenderBudget;
694
+ /** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
695
+ assetFailure?: "throw" | "placeholder";
696
+ signal?: AbortSignal;
697
+ }
698
+
308
699
  /** 供 HTML/Word 导出的完整文档;打印路径逐页渲染,避免预先生成所有页。 */
309
700
  export declare function buildPrintDocument(p: RenderPlan): PrintHtmlResult;
310
701
 
@@ -318,9 +709,6 @@ export declare function buildWordHtml(p: RenderPlan): {
318
709
  filename: string;
319
710
  };
320
711
 
321
- /** 检查失败只影响 PDF 诊断,不阻塞预览或其它输出。 */
322
- declare function checkPdfFont(): Promise<PdfFontCheckResult>;
323
-
324
712
  /**
325
713
  * 列值格式化(声明式、JSON 可序列化)。
326
714
  * 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
@@ -384,9 +772,17 @@ declare type ColumnFormat_3 = {
384
772
  pattern?: string;
385
773
  };
386
774
 
387
- declare type ComponentKind = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
775
+ declare interface ComponentImageContext {
776
+ readonly component: Readonly<PlanComponent>;
777
+ readonly pageIndex: number;
778
+ readonly componentIndex: number;
779
+ readonly componentPath: readonly number[];
780
+ readonly signal: AbortSignal;
781
+ }
388
782
 
389
- declare type ComponentKind_2 =
783
+ declare type ComponentImageRenderer = (context: ComponentImageContext) => string | Promise<string>;
784
+
785
+ declare type ComponentKind =
390
786
  | "text"
391
787
  | "image"
392
788
  | "barcode"
@@ -396,6 +792,8 @@ declare type ComponentKind_2 =
396
792
  | "rect"
397
793
  | "ellipse";
398
794
 
795
+ declare type ComponentKind_2 = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
796
+
399
797
  declare type ComponentKind_3 = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
400
798
 
401
799
  declare interface ComponentStyle {
@@ -492,8 +890,20 @@ export declare function createFetchRequest(options?: FetchRequestOptions): HostR
492
890
  */
493
891
  export declare function createLocalFetcher(entries: Record<string, LocalTemplateEntry> | ReportRegistry): PlanFetcher;
494
892
 
893
+ /** Explicit persistence bridge. Merely registering ReportProvider never enables editing or saving. */
894
+ export declare function createProviderEditing(provider: ReportProvider, options: ProviderEditingOptions): ReportEditingOptions;
895
+
896
+ /** Optional browser convenience adapter. Access errors are handled by the preview. */
897
+ export declare function createReportStoragePreferences(storage: Pick<Storage, "getItem" | "setItem" | "removeItem">): ReportPreferencesAdapter;
898
+
899
+ declare type Current<T> = T | (() => T);
900
+
901
+ declare interface DatasetContract { fields: readonly ReportFieldContract[]; rowKey?: string }
902
+
495
903
  declare type DatasetRows = Record<string, Record<string, unknown>[]>;
496
904
 
905
+ declare interface DatasetValidationOptions { path?: string; maxRows?: number; maxCells?: number; maxIssues?: number }
906
+
497
907
  export declare const DEFAULT_MESSAGES: MachReportMessages;
498
908
 
499
909
  export declare const DEFAULT_THEME: MachReportTheme;
@@ -607,8 +1017,6 @@ declare interface ExcelImportResult_2 {
607
1017
  sheets: ExcelImportedSheet_2[];
608
1018
  }
609
1019
 
610
- declare function exportAs(format: string): Promise<void>;
611
-
612
1020
  export declare interface FetchRequestOptions {
613
1021
  /** 网关前缀(默认空 = 同源) */
614
1022
  baseUrl?: string;
@@ -619,9 +1027,7 @@ export declare interface FetchRequestOptions {
619
1027
  timeoutMs?: number;
620
1028
  }
621
1029
 
622
- declare function getPlan(): RenderPlan | null;
623
-
624
- declare function gotoPage(n: number): void;
1030
+ declare function focusInvalid(): void;
625
1031
 
626
1032
  declare interface GridCell {
627
1033
  text?: string;
@@ -634,6 +1040,7 @@ declare interface GridCell {
634
1040
  valueType?: "text" | "number" | "boolean";
635
1041
  /** 单元格级编辑控制;预览仍需显式开启 editing。 */
636
1042
  editable?: boolean;
1043
+ source?: ReportCellSource;
637
1044
  /** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
638
1045
  formula?: string;
639
1046
  children?: PlanComponent[];
@@ -653,6 +1060,7 @@ declare interface GridCell_2 {
653
1060
  valueType?: "text" | "number" | "boolean";
654
1061
  /** 单元格级编辑控制;预览仍需显式开启 editing。 */
655
1062
  editable?: boolean;
1063
+ source?: ReportCellSource_2;
656
1064
  /** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
657
1065
  formula?: string;
658
1066
  children?: PlanComponent_2[];
@@ -672,6 +1080,7 @@ declare interface GridCell_3 {
672
1080
  valueType?: "text" | "number" | "boolean";
673
1081
  /** 单元格级编辑控制;预览仍需显式开启 editing。 */
674
1082
  editable?: boolean;
1083
+ source?: ReportCellSource_3;
675
1084
  /** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
676
1085
  formula?: string;
677
1086
  children?: PlanComponent_3[];
@@ -689,16 +1098,15 @@ export declare type HostRequest = (config: {
689
1098
  signal?: AbortSignal;
690
1099
  }) => Promise<unknown>;
691
1100
 
692
- /** Import is an explicit local replacement; business mapping/storage remains in the host. */
693
- declare function importExcel(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions): Promise<ExcelImportResult | null>;
1101
+ declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
694
1102
 
695
1103
  export declare function joinReportIds(reportId: ReportIdInput): string;
696
1104
 
697
1105
  /** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
698
- declare type ListAlignment = NonNullable<ComponentStyle["align"]> | "auto";
1106
+ declare type ListAlignment = NonNullable<ComponentStyle_2["align"]> | "auto";
699
1107
 
700
1108
  /** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
701
- declare type ListAlignment_2 = NonNullable<ComponentStyle_2["align"]> | "auto";
1109
+ declare type ListAlignment_2 = NonNullable<ComponentStyle["align"]> | "auto";
702
1110
 
703
1111
  /** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
704
1112
  declare type ListAlignment_3 = NonNullable<ComponentStyle_3["align"]> | "auto";
@@ -707,13 +1115,13 @@ declare interface ListColumn {
707
1115
  header: string;
708
1116
  field: string;
709
1117
  widthMm: number;
710
- style?: ComponentStyle;
1118
+ style?: ComponentStyle_2;
711
1119
  /** 内容对齐,优先于 style.align;数值字符串不会自动判为数字。 */
712
1120
  align?: ListAlignment;
713
1121
  /** 独立的表头对齐,不改变内容对齐。 */
714
- headerAlign?: ComponentStyle["align"];
1122
+ headerAlign?: ComponentStyle_2["align"];
715
1123
  /** 独立的表头样式,优先于列表级表头样式。 */
716
- headerStyle?: ComponentStyle;
1124
+ headerStyle?: ComponentStyle_2;
717
1125
  /** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
718
1126
  format?: ColumnFormat;
719
1127
  /** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
@@ -721,20 +1129,22 @@ declare interface ListColumn {
721
1129
  /** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
722
1130
  editable?: boolean;
723
1131
  /** 空值列或特殊数据类型可显式声明编辑输入类型。 */
724
- valueType?: GridCell["valueType"];
1132
+ valueType?: GridCell_2["valueType"];
1133
+ /** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
1134
+ semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
725
1135
  }
726
1136
 
727
1137
  declare interface ListColumn_2 {
728
1138
  header: string;
729
1139
  field: string;
730
1140
  widthMm: number;
731
- style?: ComponentStyle_2;
1141
+ style?: ComponentStyle;
732
1142
  /** 内容对齐,优先于 style.align;数值字符串不会自动判为数字。 */
733
1143
  align?: ListAlignment_2;
734
1144
  /** 独立的表头对齐,不改变内容对齐。 */
735
- headerAlign?: ComponentStyle_2["align"];
1145
+ headerAlign?: ComponentStyle["align"];
736
1146
  /** 独立的表头样式,优先于列表级表头样式。 */
737
- headerStyle?: ComponentStyle_2;
1147
+ headerStyle?: ComponentStyle;
738
1148
  /** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
739
1149
  format?: ColumnFormat_2;
740
1150
  /** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
@@ -742,7 +1152,9 @@ declare interface ListColumn_2 {
742
1152
  /** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
743
1153
  editable?: boolean;
744
1154
  /** 空值列或特殊数据类型可显式声明编辑输入类型。 */
745
- valueType?: GridCell_2["valueType"];
1155
+ valueType?: GridCell["valueType"];
1156
+ /** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
1157
+ semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
746
1158
  }
747
1159
 
748
1160
  declare interface ListColumn_3 {
@@ -764,6 +1176,8 @@ declare interface ListColumn_3 {
764
1176
  editable?: boolean;
765
1177
  /** 空值列或特殊数据类型可显式声明编辑输入类型。 */
766
1178
  valueType?: GridCell_3["valueType"];
1179
+ /** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
1180
+ semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
767
1181
  }
768
1182
 
769
1183
  declare interface ListComponent {
@@ -777,6 +1191,10 @@ declare interface ListComponent {
777
1191
  topMm: number;
778
1192
  widthMm: number;
779
1193
  dataset: string;
1194
+ /** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
1195
+ rowKey?: string;
1196
+ revisionField?: string;
1197
+ sourceTokenField?: string;
780
1198
  columns: ListColumn[];
781
1199
  fontSizePt?: number;
782
1200
  headerBold?: boolean;
@@ -787,8 +1205,10 @@ declare interface ListComponent {
787
1205
  /** 内容默认对齐,列配置可覆盖;低层模板缺省仍为 left。 */
788
1206
  align?: ListAlignment;
789
1207
  /** 表头默认对齐,列配置可覆盖。 */
790
- headerAlign?: ComponentStyle["align"];
791
- headerStyle?: ComponentStyle;
1208
+ headerAlign?: ComponentStyle_2["align"];
1209
+ headerStyle?: ComponentStyle_2;
1210
+ /** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
1211
+ headerGrid?: PlanGrid_2;
792
1212
  border?: boolean;
793
1213
  /** 分组小计(组头/组尾小计/组头防孤行) */
794
1214
  groupBy?: ListGroupBy;
@@ -807,6 +1227,10 @@ declare interface ListComponent_2 {
807
1227
  topMm: number;
808
1228
  widthMm: number;
809
1229
  dataset: string;
1230
+ /** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
1231
+ rowKey?: string;
1232
+ revisionField?: string;
1233
+ sourceTokenField?: string;
810
1234
  columns: ListColumn_2[];
811
1235
  fontSizePt?: number;
812
1236
  headerBold?: boolean;
@@ -817,8 +1241,10 @@ declare interface ListComponent_2 {
817
1241
  /** 内容默认对齐,列配置可覆盖;低层模板缺省仍为 left。 */
818
1242
  align?: ListAlignment_2;
819
1243
  /** 表头默认对齐,列配置可覆盖。 */
820
- headerAlign?: ComponentStyle_2["align"];
821
- headerStyle?: ComponentStyle_2;
1244
+ headerAlign?: ComponentStyle["align"];
1245
+ headerStyle?: ComponentStyle;
1246
+ /** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
1247
+ headerGrid?: PlanGrid;
822
1248
  border?: boolean;
823
1249
  /** 分组小计(组头/组尾小计/组头防孤行) */
824
1250
  groupBy?: ListGroupBy_2;
@@ -837,6 +1263,10 @@ declare interface ListComponent_3 {
837
1263
  topMm: number;
838
1264
  widthMm: number;
839
1265
  dataset: string;
1266
+ /** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
1267
+ rowKey?: string;
1268
+ revisionField?: string;
1269
+ sourceTokenField?: string;
840
1270
  columns: ListColumn_3[];
841
1271
  fontSizePt?: number;
842
1272
  headerBold?: boolean;
@@ -849,6 +1279,8 @@ declare interface ListComponent_3 {
849
1279
  /** 表头默认对齐,列配置可覆盖。 */
850
1280
  headerAlign?: ComponentStyle_3["align"];
851
1281
  headerStyle?: ComponentStyle_3;
1282
+ /** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
1283
+ headerGrid?: PlanGrid_3;
852
1284
  border?: boolean;
853
1285
  /** 分组小计(组头/组尾小计/组头防孤行) */
854
1286
  groupBy?: ListGroupBy_3;
@@ -858,7 +1290,7 @@ declare interface ListComponent_3 {
858
1290
 
859
1291
  declare type ListGrandTotal = boolean | {
860
1292
  label?: string;
861
- style?: ComponentStyle;
1293
+ style?: ComponentStyle_2;
862
1294
  /** 合计列(缺省沿用 groupBy.subtotal) */
863
1295
  fields?: string[];
864
1296
  };
@@ -867,7 +1299,7 @@ declare type ListGrandTotal_2 =
867
1299
  | boolean
868
1300
  | {
869
1301
  label?: string;
870
- style?: ComponentStyle_2;
1302
+ style?: ComponentStyle;
871
1303
  /** 合计列(缺省沿用 groupBy.subtotal) */
872
1304
  fields?: string[];
873
1305
  };
@@ -885,10 +1317,10 @@ declare interface ListGroupBy {
885
1317
  field: string;
886
1318
  /** 组头文案模板,{value} 占位(默认 "{value}") */
887
1319
  headerTemplate?: string;
888
- headerStyle?: ComponentStyle;
1320
+ headerStyle?: ComponentStyle_2;
889
1321
  /** 需要小计的列字段(组尾输出合计行;数值列求和,其余输出首值/留空) */
890
1322
  subtotal?: string[];
891
- subtotalStyle?: ComponentStyle;
1323
+ subtotalStyle?: ComponentStyle_2;
892
1324
  subtotalLabel?: string;
893
1325
  /** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
894
1326
  keepWithNext?: boolean;
@@ -900,10 +1332,10 @@ declare interface ListGroupBy_2 {
900
1332
  field: string;
901
1333
  /** 组头文案模板,{value} 占位(默认 "{value}") */
902
1334
  headerTemplate?: string;
903
- headerStyle?: ComponentStyle_2;
1335
+ headerStyle?: ComponentStyle;
904
1336
  /** 需要小计的列字段(组尾输出合计行;数值列求和,其余输出首值/留空) */
905
1337
  subtotal?: string[];
906
- subtotalStyle?: ComponentStyle_2;
1338
+ subtotalStyle?: ComponentStyle;
907
1339
  subtotalLabel?: string;
908
1340
  /** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
909
1341
  keepWithNext?: boolean;
@@ -975,6 +1407,15 @@ export declare interface MachReportController {
975
1407
  /** Copies prevent consumers from mutating the preview's current snapshot. */
976
1408
  getPlan?(): RenderPlan | null;
977
1409
  getChanges?(): ReportCellEdit_2[];
1410
+ getDifferences?(): ReportCellEdit_2[];
1411
+ undo?(): Promise<boolean>;
1412
+ redo?(): Promise<boolean>;
1413
+ restoreChanges?(): Promise<boolean>;
1414
+ getSelection?(): ReportCellSelection | null;
1415
+ focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
1416
+ focusField?(target: ReportFieldTarget): Promise<boolean>;
1417
+ copySelection?(): string;
1418
+ pasteSelection?(text: string): Promise<boolean>;
978
1419
  }
979
1420
 
980
1421
  /** defaults 层可配置项(全部可选,均有内置缺省) */
@@ -985,6 +1426,10 @@ export declare interface MachReportDefaults {
985
1426
  /** 设置入口默认显示;可在其中按需启用阅读及输出工具。 */
986
1427
  showSettings?: boolean;
987
1428
  toolbar?: MachReportToolbarOptions;
1429
+ interaction?: ReportInteractionOptions;
1430
+ preferences?: ReportPreferencesOptions;
1431
+ /** Prepare optional image/chart/QR/barcode adapters once for preview and all outputs. */
1432
+ assets?: AssetRenderOptions;
988
1433
  /** 参数面板显隐(有参数定义且未显式关闭时显示;缺省 true) */
989
1434
  showParams?: boolean;
990
1435
  /** 页间距 px */
@@ -1035,6 +1480,15 @@ export declare interface MachReportHandle extends MachReportController {
1035
1480
  importExcel(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions): Promise<ExcelImportResult | null>;
1036
1481
  getPlan(): RenderPlan | null;
1037
1482
  getChanges(): ReportCellEdit_2[];
1483
+ getDifferences(): ReportCellEdit_2[];
1484
+ undo(): Promise<boolean>;
1485
+ redo(): Promise<boolean>;
1486
+ restoreChanges(): Promise<boolean>;
1487
+ getSelection(): ReportCellSelection | null;
1488
+ focusCell(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
1489
+ focusField(target: ReportFieldTarget): Promise<boolean>;
1490
+ copySelection(): string;
1491
+ pasteSelection(text: string): Promise<boolean>;
1038
1492
  }
1039
1493
 
1040
1494
  /** 日志通道(默认 console;可注入 noop 静默或上报 collector) */
@@ -1085,6 +1539,11 @@ export declare interface MachReportMessages {
1085
1539
  reset: string;
1086
1540
  /** 必填缺失提示({label} 占位) */
1087
1541
  paramRequired: string;
1542
+ paramInvalid?: string;
1543
+ paramPrompt?: string;
1544
+ paramPromptDescription?: string;
1545
+ paramSelectPlaceholder?: string;
1546
+ paramTextPlaceholder?: string;
1088
1547
  /** 可选搜索进度文案,旧完整 messages 对象无需新增字段。 */
1089
1548
  searching?: string;
1090
1549
  importExcel?: string;
@@ -1103,12 +1562,43 @@ export declare interface MachReportMessages {
1103
1562
  settingsReset?: string;
1104
1563
  settingsClose?: string;
1105
1564
  search?: string;
1565
+ closeSearch?: string;
1566
+ prevSearchMatch?: string;
1567
+ nextSearchMatch?: string;
1106
1568
  zoom?: string;
1107
1569
  settingsLocal?: string;
1108
1570
  editingLocal?: string;
1109
1571
  editingSaved?: string;
1110
1572
  importLocal?: string;
1111
1573
  emptyDescription?: string;
1574
+ undo?: string;
1575
+ redo?: string;
1576
+ restoreChanges?: string;
1577
+ changes?: string;
1578
+ changesCount?: string;
1579
+ changesEmpty?: string;
1580
+ changesBefore?: string;
1581
+ changesAfter?: string;
1582
+ editAtomicRequired?: string;
1583
+ clipboardLimit?: string;
1584
+ preferencesError?: string;
1585
+ freezeHeaders?: string;
1586
+ frozenColumns?: string;
1587
+ sections?: string;
1588
+ locateField?: string;
1589
+ locateFieldPlaceholder?: string;
1590
+ locateFieldMissing?: string;
1591
+ importSummary?: string;
1592
+ importPreserved?: string;
1593
+ importWarnings?: string;
1594
+ importReadOnly?: string;
1595
+ conflicts?: string;
1596
+ editReadOnly?: string;
1597
+ editMissing?: string;
1598
+ editDuplicate?: string;
1599
+ clipboardInvalid?: string;
1600
+ editSaved?: string;
1601
+ settingsPanes?: string;
1112
1602
  }
1113
1603
 
1114
1604
  /**
@@ -1184,6 +1674,18 @@ export declare const MachReportPreview: {
1184
1674
  type: PropType<MachReportToolbarOptions>;
1185
1675
  default: undefined;
1186
1676
  };
1677
+ interaction: {
1678
+ type: PropType<ReportInteractionOptions>;
1679
+ default: undefined;
1680
+ };
1681
+ preferences: {
1682
+ type: PropType<ReportPreferencesOptions>;
1683
+ default: undefined;
1684
+ };
1685
+ assets: {
1686
+ type: PropType<AssetRenderOptions>;
1687
+ default: undefined;
1688
+ };
1187
1689
  emptyState: {
1188
1690
  type: PropType<boolean | ReportEmptyState>;
1189
1691
  default: boolean;
@@ -1225,36 +1727,45 @@ export declare const MachReportPreview: {
1225
1727
  default: null;
1226
1728
  };
1227
1729
  }>> & Readonly<{
1730
+ onWarning?: ((message: string) => any) | undefined;
1228
1731
  onError?: ((message: string, detail?: {
1229
1732
  code: string;
1230
1733
  cause?: unknown;
1231
1734
  } | undefined) => any) | undefined;
1232
1735
  onLoaded?: ((pageCount: number) => any) | undefined;
1233
- onWarning?: ((message: string) => any) | undefined;
1234
1736
  "onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
1235
1737
  "onTemplate-import"?: ((result: ExcelImportResult_2) => any) | undefined;
1236
1738
  "onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
1237
1739
  }>, {
1238
- reload: () => Promise<void>;
1239
- print: () => Promise<void>;
1240
- exportAs: (format: string) => Promise<void>;
1241
- openPdfWindow: () => void;
1242
- gotoPage: (n: number) => void;
1243
- setParams: (values: Record<string, string>, opts?: {
1244
- reload?: boolean;
1245
- }) => Promise<void>;
1246
- checkPdfFont: () => Promise<PdfFontCheckResult>;
1247
- importExcel: (input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2) => Promise<ExcelImportResult_2 | null>;
1248
- getPlan: () => RenderPlan | null;
1249
- getChanges: () => ReportCellEdit_2[];
1250
1740
  state: ComputedRef<MachReportState>;
1741
+ checkPdfFont?(): Promise<PdfFontCheckResult>;
1742
+ reload(): Promise<void>;
1743
+ print(): Promise<void>;
1744
+ exportAs(format: string): Promise<void> | void;
1745
+ openPdfWindow(): void;
1746
+ gotoPage(page: number): void;
1747
+ setParams(values: Record<string, string>, opts?: {
1748
+ reload?: boolean;
1749
+ }): Promise<void> | void;
1750
+ importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2): Promise<ExcelImportResult_2 | null>;
1751
+ getPlan?(): RenderPlan | null;
1752
+ getChanges?(): ReportCellEdit_2[];
1753
+ getDifferences?(): ReportCellEdit_2[];
1754
+ undo?(): Promise<boolean>;
1755
+ redo?(): Promise<boolean>;
1756
+ restoreChanges?(): Promise<boolean>;
1757
+ getSelection?(): ReportCellSelection | null;
1758
+ focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
1759
+ focusField?(target: ReportFieldTarget): Promise<boolean>;
1760
+ copySelection?(): string;
1761
+ pasteSelection?(text: string): Promise<boolean>;
1251
1762
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1763
+ warning: (message: string) => any;
1252
1764
  error: (message: string, detail?: {
1253
1765
  code: string;
1254
1766
  cause?: unknown;
1255
1767
  } | undefined) => any;
1256
1768
  loaded: (pageCount: number) => any;
1257
- warning: (message: string) => any;
1258
1769
  "cell-edit": (edit: ReportCellEdit_2) => any;
1259
1770
  "template-import": (result: ExcelImportResult_2) => any;
1260
1771
  "preferences-change": (preferences: Readonly<ReportPreviewPreferences>) => any;
@@ -1271,6 +1782,9 @@ export declare const MachReportPreview: {
1271
1782
  showSettings: boolean;
1272
1783
  showParams: boolean;
1273
1784
  toolbar: MachReportToolbarOptions;
1785
+ interaction: ReportInteractionOptions;
1786
+ preferences: ReportPreferencesOptions;
1787
+ assets: AssetRenderOptions;
1274
1788
  messages: Partial<MachReportMessages>;
1275
1789
  excelImport: boolean | ExcelImportOptions_2;
1276
1790
  autoLoad: boolean;
@@ -1279,6 +1793,145 @@ export declare const MachReportPreview: {
1279
1793
  paramDefs: ReportParamDef[] | undefined;
1280
1794
  fetcher: PlanFetcher | null;
1281
1795
  }, true, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
1796
+ paramPanelRef: CreateComponentPublicInstanceWithMixins<Readonly<{
1797
+ defs: ReportParamDef[];
1798
+ modelValue: Record<string, string>;
1799
+ messages: MachReportMessages;
1800
+ attempted: boolean;
1801
+ issues?: readonly ReportParamIssue[];
1802
+ }> & Readonly<{
1803
+ onReset?: (() => any) | undefined;
1804
+ onQuery?: (() => any) | undefined;
1805
+ "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
1806
+ }>, {
1807
+ focusInvalid: () => void;
1808
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1809
+ reset: () => any;
1810
+ query: () => any;
1811
+ "update:modelValue": (value: Record<string, string>) => any;
1812
+ }, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
1813
+ root: HTMLDivElement;
1814
+ }, HTMLDivElement, ComponentProvideOptions, {
1815
+ P: {};
1816
+ B: {};
1817
+ D: {};
1818
+ C: {};
1819
+ M: {};
1820
+ Defaults: {};
1821
+ }, Readonly<{
1822
+ defs: ReportParamDef[];
1823
+ modelValue: Record<string, string>;
1824
+ messages: MachReportMessages;
1825
+ attempted: boolean;
1826
+ issues?: readonly ReportParamIssue[];
1827
+ }> & Readonly<{
1828
+ onReset?: (() => any) | undefined;
1829
+ onQuery?: (() => any) | undefined;
1830
+ "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
1831
+ }>, {
1832
+ focusInvalid: () => void;
1833
+ }, {}, {}, {}, {}> | null;
1834
+ toolbarRef: CreateComponentPublicInstanceWithMixins<Readonly<{
1835
+ pageCount: number;
1836
+ currentPage: number;
1837
+ zoomMode: "fit" | "raw";
1838
+ zoom: number;
1839
+ showExport: boolean;
1840
+ showPrint: boolean;
1841
+ showPdfWindow: boolean;
1842
+ messages: MachReportMessages;
1843
+ search: {
1844
+ visible: boolean;
1845
+ query: string;
1846
+ matchIndex: number;
1847
+ matchCount: number;
1848
+ searching?: boolean;
1849
+ };
1850
+ thumbsVisible: boolean;
1851
+ showImport?: boolean;
1852
+ showSearch?: boolean;
1853
+ showThumbnails?: boolean;
1854
+ showZoom?: boolean;
1855
+ exportFormats?: readonly ReportExportFormat[];
1856
+ showSettings?: boolean;
1857
+ settingsOpen?: boolean;
1858
+ busy?: boolean;
1859
+ }> & Readonly<{
1860
+ onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
1861
+ onPrint?: (() => any) | undefined;
1862
+ onZoom?: ((mode: number | "fit") => any) | undefined;
1863
+ onGoto?: ((page: number) => any) | undefined;
1864
+ "onPdf-window"?: (() => any) | undefined;
1865
+ "onSearch-input"?: ((query: string) => any) | undefined;
1866
+ "onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
1867
+ "onSearch-toggle"?: (() => any) | undefined;
1868
+ "onThumbs-toggle"?: (() => any) | undefined;
1869
+ "onImport-excel"?: (() => any) | undefined;
1870
+ "onSettings-toggle"?: (() => any) | undefined;
1871
+ }>, {
1872
+ focusSearch: () => void;
1873
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1874
+ export: (format: "pdf" | "xlsx" | "html" | "png" | "word") => any;
1875
+ print: () => any;
1876
+ zoom: (mode: number | "fit") => any;
1877
+ goto: (page: number) => any;
1878
+ "pdf-window": () => any;
1879
+ "search-input": (query: string) => any;
1880
+ "search-nav": (dir: 1 | -1) => any;
1881
+ "search-toggle": () => any;
1882
+ "thumbs-toggle": () => any;
1883
+ "import-excel": () => any;
1884
+ "settings-toggle": () => any;
1885
+ }, PublicProps, {}, false, {}, {}, { [K in keyof GlobalComponents]: GlobalComponents[K] }, { [K in keyof GlobalDirectives]: GlobalDirectives[K] }, string, {
1886
+ searchInputRef: HTMLInputElement;
1887
+ searchToggleRef: HTMLButtonElement;
1888
+ }, HTMLDivElement, ComponentProvideOptions, {
1889
+ P: {};
1890
+ B: {};
1891
+ D: {};
1892
+ C: {};
1893
+ M: {};
1894
+ Defaults: {};
1895
+ }, Readonly<{
1896
+ pageCount: number;
1897
+ currentPage: number;
1898
+ zoomMode: "fit" | "raw";
1899
+ zoom: number;
1900
+ showExport: boolean;
1901
+ showPrint: boolean;
1902
+ showPdfWindow: boolean;
1903
+ messages: MachReportMessages;
1904
+ search: {
1905
+ visible: boolean;
1906
+ query: string;
1907
+ matchIndex: number;
1908
+ matchCount: number;
1909
+ searching?: boolean;
1910
+ };
1911
+ thumbsVisible: boolean;
1912
+ showImport?: boolean;
1913
+ showSearch?: boolean;
1914
+ showThumbnails?: boolean;
1915
+ showZoom?: boolean;
1916
+ exportFormats?: readonly ReportExportFormat[];
1917
+ showSettings?: boolean;
1918
+ settingsOpen?: boolean;
1919
+ busy?: boolean;
1920
+ }> & Readonly<{
1921
+ onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
1922
+ onPrint?: (() => any) | undefined;
1923
+ onZoom?: ((mode: number | "fit") => any) | undefined;
1924
+ onGoto?: ((page: number) => any) | undefined;
1925
+ "onPdf-window"?: (() => any) | undefined;
1926
+ "onSearch-input"?: ((query: string) => any) | undefined;
1927
+ "onSearch-nav"?: ((dir: 1 | -1) => any) | undefined;
1928
+ "onSearch-toggle"?: (() => any) | undefined;
1929
+ "onThumbs-toggle"?: (() => any) | undefined;
1930
+ "onImport-excel"?: (() => any) | undefined;
1931
+ "onSettings-toggle"?: (() => any) | undefined;
1932
+ }>, {
1933
+ focusSearch: () => void;
1934
+ }, {}, {}, {}, {}> | null;
1282
1935
  importInputRef: HTMLInputElement;
1283
1936
  viewportRef: HTMLDivElement;
1284
1937
  containerRef: HTMLDivElement;
@@ -1327,6 +1980,18 @@ export declare const MachReportPreview: {
1327
1980
  type: PropType<MachReportToolbarOptions>;
1328
1981
  default: undefined;
1329
1982
  };
1983
+ interaction: {
1984
+ type: PropType<ReportInteractionOptions>;
1985
+ default: undefined;
1986
+ };
1987
+ preferences: {
1988
+ type: PropType<ReportPreferencesOptions>;
1989
+ default: undefined;
1990
+ };
1991
+ assets: {
1992
+ type: PropType<AssetRenderOptions>;
1993
+ default: undefined;
1994
+ };
1330
1995
  emptyState: {
1331
1996
  type: PropType<boolean | ReportEmptyState>;
1332
1997
  default: boolean;
@@ -1368,29 +2033,38 @@ export declare const MachReportPreview: {
1368
2033
  default: null;
1369
2034
  };
1370
2035
  }>> & Readonly<{
2036
+ onWarning?: ((message: string) => any) | undefined;
1371
2037
  onError?: ((message: string, detail?: {
1372
2038
  code: string;
1373
2039
  cause?: unknown;
1374
2040
  } | undefined) => any) | undefined;
1375
2041
  onLoaded?: ((pageCount: number) => any) | undefined;
1376
- onWarning?: ((message: string) => any) | undefined;
1377
2042
  "onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
1378
2043
  "onTemplate-import"?: ((result: ExcelImportResult_2) => any) | undefined;
1379
2044
  "onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
1380
2045
  }>, {
1381
- reload: () => Promise<void>;
1382
- print: () => Promise<void>;
1383
- exportAs: (format: string) => Promise<void>;
1384
- openPdfWindow: () => void;
1385
- gotoPage: (n: number) => void;
1386
- setParams: (values: Record<string, string>, opts?: {
1387
- reload?: boolean;
1388
- }) => Promise<void>;
1389
- checkPdfFont: () => Promise<PdfFontCheckResult>;
1390
- importExcel: (input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2) => Promise<ExcelImportResult_2 | null>;
1391
- getPlan: () => RenderPlan | null;
1392
- getChanges: () => ReportCellEdit_2[];
1393
2046
  state: ComputedRef<MachReportState>;
2047
+ checkPdfFont?(): Promise<PdfFontCheckResult>;
2048
+ reload(): Promise<void>;
2049
+ print(): Promise<void>;
2050
+ exportAs(format: string): Promise<void> | void;
2051
+ openPdfWindow(): void;
2052
+ gotoPage(page: number): void;
2053
+ setParams(values: Record<string, string>, opts?: {
2054
+ reload?: boolean;
2055
+ }): Promise<void> | void;
2056
+ importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2): Promise<ExcelImportResult_2 | null>;
2057
+ getPlan?(): RenderPlan | null;
2058
+ getChanges?(): ReportCellEdit_2[];
2059
+ getDifferences?(): ReportCellEdit_2[];
2060
+ undo?(): Promise<boolean>;
2061
+ redo?(): Promise<boolean>;
2062
+ restoreChanges?(): Promise<boolean>;
2063
+ getSelection?(): ReportCellSelection | null;
2064
+ focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
2065
+ focusField?(target: ReportFieldTarget): Promise<boolean>;
2066
+ copySelection?(): string;
2067
+ pasteSelection?(text: string): Promise<boolean>;
1394
2068
  }, {}, {}, {}, {
1395
2069
  editable: boolean | ReportEditingOptions;
1396
2070
  height: string;
@@ -1404,6 +2078,9 @@ export declare const MachReportPreview: {
1404
2078
  showSettings: boolean;
1405
2079
  showParams: boolean;
1406
2080
  toolbar: MachReportToolbarOptions;
2081
+ interaction: ReportInteractionOptions;
2082
+ preferences: ReportPreferencesOptions;
2083
+ assets: AssetRenderOptions;
1407
2084
  messages: Partial<MachReportMessages>;
1408
2085
  excelImport: boolean | ExcelImportOptions_2;
1409
2086
  autoLoad: boolean;
@@ -1452,6 +2129,18 @@ toolbar: {
1452
2129
  type: PropType<MachReportToolbarOptions>;
1453
2130
  default: undefined;
1454
2131
  };
2132
+ interaction: {
2133
+ type: PropType<ReportInteractionOptions>;
2134
+ default: undefined;
2135
+ };
2136
+ preferences: {
2137
+ type: PropType<ReportPreferencesOptions>;
2138
+ default: undefined;
2139
+ };
2140
+ assets: {
2141
+ type: PropType<AssetRenderOptions>;
2142
+ default: undefined;
2143
+ };
1455
2144
  emptyState: {
1456
2145
  type: PropType<boolean | ReportEmptyState>;
1457
2146
  default: boolean;
@@ -1493,36 +2182,45 @@ type: PropType<PlanFetcher | null>;
1493
2182
  default: null;
1494
2183
  };
1495
2184
  }>> & Readonly<{
2185
+ onWarning?: ((message: string) => any) | undefined;
1496
2186
  onError?: ((message: string, detail?: {
1497
2187
  code: string;
1498
2188
  cause?: unknown;
1499
2189
  } | undefined) => any) | undefined;
1500
2190
  onLoaded?: ((pageCount: number) => any) | undefined;
1501
- onWarning?: ((message: string) => any) | undefined;
1502
2191
  "onCell-edit"?: ((edit: ReportCellEdit_2) => any) | undefined;
1503
2192
  "onTemplate-import"?: ((result: ExcelImportResult_2) => any) | undefined;
1504
2193
  "onPreferences-change"?: ((preferences: Readonly<ReportPreviewPreferences>) => any) | undefined;
1505
2194
  }>, {
1506
- reload: () => Promise<void>;
1507
- print: () => Promise<void>;
1508
- exportAs: (format: string) => Promise<void>;
1509
- openPdfWindow: () => void;
1510
- gotoPage: (n: number) => void;
1511
- setParams: (values: Record<string, string>, opts?: {
1512
- reload?: boolean;
1513
- }) => Promise<void>;
1514
- checkPdfFont: () => Promise<PdfFontCheckResult>;
1515
- importExcel: (input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2) => Promise<ExcelImportResult_2 | null>;
1516
- getPlan: () => RenderPlan | null;
1517
- getChanges: () => ReportCellEdit_2[];
1518
2195
  state: ComputedRef<MachReportState>;
2196
+ checkPdfFont?(): Promise<PdfFontCheckResult>;
2197
+ reload(): Promise<void>;
2198
+ print(): Promise<void>;
2199
+ exportAs(format: string): Promise<void> | void;
2200
+ openPdfWindow(): void;
2201
+ gotoPage(page: number): void;
2202
+ setParams(values: Record<string, string>, opts?: {
2203
+ reload?: boolean;
2204
+ }): Promise<void> | void;
2205
+ importExcel?(input: ArrayBuffer | Uint8Array | Blob, options?: ExcelImportOptions_2): Promise<ExcelImportResult_2 | null>;
2206
+ getPlan?(): RenderPlan | null;
2207
+ getChanges?(): ReportCellEdit_2[];
2208
+ getDifferences?(): ReportCellEdit_2[];
2209
+ undo?(): Promise<boolean>;
2210
+ redo?(): Promise<boolean>;
2211
+ restoreChanges?(): Promise<boolean>;
2212
+ getSelection?(): ReportCellSelection | null;
2213
+ focusCell?(address: ReportCellAddress_2, extend?: boolean): Promise<boolean>;
2214
+ focusField?(target: ReportFieldTarget): Promise<boolean>;
2215
+ copySelection?(): string;
2216
+ pasteSelection?(text: string): Promise<boolean>;
1519
2217
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2218
+ warning: (message: string) => any;
1520
2219
  error: (message: string, detail?: {
1521
2220
  code: string;
1522
2221
  cause?: unknown;
1523
2222
  } | undefined) => any;
1524
2223
  loaded: (pageCount: number) => any;
1525
- warning: (message: string) => any;
1526
2224
  "cell-edit": (edit: ReportCellEdit_2) => any;
1527
2225
  "template-import": (result: ExcelImportResult_2) => any;
1528
2226
  "preferences-change": (preferences: Readonly<ReportPreviewPreferences>) => any;
@@ -1539,6 +2237,9 @@ showPdfWindow: boolean;
1539
2237
  showSettings: boolean;
1540
2238
  showParams: boolean;
1541
2239
  toolbar: MachReportToolbarOptions;
2240
+ interaction: ReportInteractionOptions;
2241
+ preferences: ReportPreferencesOptions;
2242
+ assets: AssetRenderOptions;
1542
2243
  messages: Partial<MachReportMessages>;
1543
2244
  excelImport: boolean | ExcelImportOptions_2;
1544
2245
  autoLoad: boolean;
@@ -1578,6 +2279,10 @@ export declare interface MachReportState {
1578
2279
  readonly saving?: boolean;
1579
2280
  readonly importing?: boolean;
1580
2281
  readonly dirty?: boolean;
2282
+ readonly canUndo?: boolean;
2283
+ readonly canRedo?: boolean;
2284
+ readonly changeCount?: number;
2285
+ readonly selection?: Readonly<ReportCellSelection> | null;
1581
2286
  }
1582
2287
 
1583
2288
  export declare interface MachReportStateError {
@@ -1614,7 +2319,48 @@ export declare interface MachReportToolbarOptions {
1614
2319
 
1615
2320
  export declare function normalizeReportIds(reportId: ReportIdInput): string[];
1616
2321
 
1617
- declare function openPdfWindow(): void;
2322
+ /** Workers preserve stable error codes, not JavaScript class identity. Only known codes cross the UI boundary. */
2323
+ export declare function normalizeReportLoadError(error: unknown): MachReportError;
2324
+
2325
+ declare interface OutputDiagnostic {
2326
+ code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
2327
+ severity: "warning";
2328
+ format: OutputFormat;
2329
+ pageIndex: number;
2330
+ componentIndex: number;
2331
+ /** Nested grid child location as repeating [rowIndex, columnIndex, childIndex] triples. */
2332
+ componentPath?: readonly number[];
2333
+ kind: string;
2334
+ nid?: string;
2335
+ message: string;
2336
+ }
2337
+
2338
+ declare interface OutputDiagnostic_2 {
2339
+ code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
2340
+ severity: "warning";
2341
+ format: OutputFormat_2;
2342
+ pageIndex: number;
2343
+ componentIndex: number;
2344
+ /** Nested grid child location as repeating [rowIndex, columnIndex, childIndex] triples. */
2345
+ componentPath?: readonly number[];
2346
+ kind: string;
2347
+ nid?: string;
2348
+ message: string;
2349
+ }
2350
+
2351
+ declare interface OutputDiagnosticOptions {
2352
+ /** Structured fidelity diagnostics; rendering never silently invents missing content. */
2353
+ onDiagnostic?: (diagnostic: OutputDiagnostic) => void;
2354
+ }
2355
+
2356
+ declare interface OutputDiagnosticOptions_2 {
2357
+ /** Structured fidelity diagnostics; rendering never silently invents missing content. */
2358
+ onDiagnostic?: (diagnostic: OutputDiagnostic_2) => void;
2359
+ }
2360
+
2361
+ declare type OutputFormat = "dom" | "canvas" | "pdf" | "xlsx";
2362
+
2363
+ declare type OutputFormat_2 = "dom" | "canvas" | "pdf" | "xlsx";
1618
2364
 
1619
2365
  declare interface PageWindow {
1620
2366
  start: number;
@@ -1628,6 +2374,8 @@ declare interface PaginateOptions {
1628
2374
  mmPerRow?: number;
1629
2375
  /** 文本测量器(默认启发式;浏览器端可注入 canvas 测量校准) */
1630
2376
  measurer?: TextMeasurer;
2377
+ /** 可选页数上限;在追加超限页前终止,避免先分配全部页面再检查。 */
2378
+ maxPages?: number;
1631
2379
  }
1632
2380
 
1633
2381
  /** PDF 导出器:RenderPlan → PDF 字节;第二参数可上报非致命保真告警。 */
@@ -1660,6 +2408,8 @@ declare interface PlanComponent {
1660
2408
  lines?: string[];
1661
2409
  richParagraphs?: RichParagraph[];
1662
2410
  imageData?: string;
2411
+ /** 明确指定线段方向;省略保持历史水平线行为。 */
2412
+ lineDirection?: "down" | "up";
1663
2413
  grid?: PlanGrid;
1664
2414
  table?: PlanTableFragment;
1665
2415
  style?: ComponentStyle;
@@ -1681,6 +2431,8 @@ declare interface PlanComponent_2 {
1681
2431
  lines?: string[];
1682
2432
  richParagraphs?: RichParagraph_2[];
1683
2433
  imageData?: string;
2434
+ /** 明确指定线段方向;省略保持历史水平线行为。 */
2435
+ lineDirection?: "down" | "up";
1684
2436
  grid?: PlanGrid_2;
1685
2437
  table?: PlanTableFragment_2;
1686
2438
  style?: ComponentStyle_2;
@@ -1702,6 +2454,8 @@ declare interface PlanComponent_3 {
1702
2454
  lines?: string[];
1703
2455
  richParagraphs?: RichParagraph_3[];
1704
2456
  imageData?: string;
2457
+ /** 明确指定线段方向;省略保持历史水平线行为。 */
2458
+ lineDirection?: "down" | "up";
1705
2459
  grid?: PlanGrid_3;
1706
2460
  table?: PlanTableFragment_3;
1707
2461
  style?: ComponentStyle_3;
@@ -1758,7 +2512,7 @@ declare interface PlanPage {
1758
2512
  marginBottomMm?: number;
1759
2513
  marginLeftMm?: number;
1760
2514
  marginRightMm?: number;
1761
- components: PlanComponent_2[];
2515
+ components: PlanComponent[];
1762
2516
  }
1763
2517
 
1764
2518
  /** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
@@ -1772,6 +2526,8 @@ declare interface PlanTableFragment {
1772
2526
  columnKeys: string[];
1773
2527
  layout?: "page" | "wide";
1774
2528
  title?: string;
2529
+ /** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
2530
+ source?: Omit<ReportCellSource, "field" | "rowKey"> & { rowKey?: string | number };
1775
2531
  }
1776
2532
 
1777
2533
  /** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
@@ -1785,6 +2541,10 @@ declare interface PlanTableFragment_2 {
1785
2541
  columnKeys: string[];
1786
2542
  layout?: "page" | "wide";
1787
2543
  title?: string;
2544
+ /** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
2545
+ source?: Omit<ReportCellSource_2, "field" | "rowKey"> & {
2546
+ rowKey?: string | number;
2547
+ };
1788
2548
  }
1789
2549
 
1790
2550
  /** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
@@ -1798,10 +2558,12 @@ declare interface PlanTableFragment_3 {
1798
2558
  columnKeys: string[];
1799
2559
  layout?: "page" | "wide";
1800
2560
  title?: string;
2561
+ /** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
2562
+ source?: Omit<ReportCellSource_3, "field" | "rowKey"> & {
2563
+ rowKey?: string | number;
2564
+ };
1801
2565
  }
1802
2566
 
1803
- declare function print_2(): Promise<void>;
1804
-
1805
2567
  declare interface PrintHtmlResult {
1806
2568
  head: string;
1807
2569
  pageChunks: string[];
@@ -1823,7 +2585,14 @@ export declare function printPlans(plans: RenderPlan[], options?: {
1823
2585
  */
1824
2586
  export declare function provideMachReportConfig(overlay: MachReportConfigInput | MachReportDefaults): void;
1825
2587
 
1826
- declare function reload(): Promise<void>;
2588
+ export declare interface ProviderEditingOptions extends Pick<ReportEditingOptions, "canEdit" | "validate" | "requireSource"> {
2589
+ reportId: Current<string>;
2590
+ params?: Current<Record<string, string>>;
2591
+ /** Getters are useful when query metadata is held by the host. Otherwise stable cell sources are used. */
2592
+ expectedRevision?: Current<string | undefined>;
2593
+ sourceToken?: Current<string | undefined>;
2594
+ onDiagnostic?(diagnostic: ReportDiagnostic): void;
2595
+ }
1827
2596
 
1828
2597
  declare interface RenderPlan {
1829
2598
  schemaVersion: string;
@@ -1852,11 +2621,13 @@ declare interface ReportCellAddress_2 {
1852
2621
 
1853
2622
  declare interface ReportCellContext {
1854
2623
  address: ReportCellAddress;
1855
- cell: Readonly<GridCell>;
1856
- component: Readonly<PlanComponent>;
2624
+ cell: Readonly<GridCell_2>;
2625
+ component: Readonly<PlanComponent_2>;
1857
2626
  value: ReportCellValue;
1858
2627
  valueType: ReportCellValueType;
1859
2628
  table?: ReportCellTableIdentity;
2629
+ /** Stable business identity. Physical row indices must never be used as database keys. */
2630
+ source?: Readonly<ReportCellSource_2>;
1860
2631
  editable: boolean;
1861
2632
  readOnlyReason?: ReportCellReadOnlyReason;
1862
2633
  }
@@ -1864,6 +2635,7 @@ declare interface ReportCellContext {
1864
2635
  declare interface ReportCellEdit {
1865
2636
  address: ReportCellAddress;
1866
2637
  table?: ReportCellTableIdentity;
2638
+ source?: Readonly<ReportCellSource_2>;
1867
2639
  previousValue: ReportCellValue;
1868
2640
  previousText: string;
1869
2641
  value: ReportCellValue;
@@ -1873,6 +2645,7 @@ declare interface ReportCellEdit {
1873
2645
  declare interface ReportCellEdit_2 {
1874
2646
  address: ReportCellAddress_2;
1875
2647
  table?: ReportCellTableIdentity_2;
2648
+ source?: Readonly<ReportCellSource>;
1876
2649
  previousValue: ReportCellValue_2;
1877
2650
  previousText: string;
1878
2651
  value: ReportCellValue_2;
@@ -1881,11 +2654,43 @@ declare interface ReportCellEdit_2 {
1881
2654
 
1882
2655
  declare type ReportCellReadOnlyReason = "cell" | "formula" | "complex" | "structure";
1883
2656
 
2657
+ export declare interface ReportCellSelection {
2658
+ anchor: ReportCellAddress_2;
2659
+ focus: ReportCellAddress_2;
2660
+ }
2661
+
2662
+ /** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
2663
+ declare interface ReportCellSource {
2664
+ datasetId: string;
2665
+ rowKey: string | number;
2666
+ field: string;
2667
+ revision?: string | number;
2668
+ sourceToken?: string;
2669
+ }
2670
+
2671
+ /** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
2672
+ declare interface ReportCellSource_2 {
2673
+ datasetId: string;
2674
+ rowKey: string | number;
2675
+ field: string;
2676
+ revision?: string | number;
2677
+ sourceToken?: string;
2678
+ }
2679
+
2680
+ /** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
2681
+ declare interface ReportCellSource_3 {
2682
+ datasetId: string;
2683
+ rowKey: string | number;
2684
+ field: string;
2685
+ revision?: string | number;
2686
+ sourceToken?: string;
2687
+ }
2688
+
1884
2689
  declare interface ReportCellTableIdentity {
1885
2690
  id: string;
1886
2691
  /** 逻辑表行索引;跨分页的同一行保持不变。 */
1887
2692
  rowIndex: number;
1888
- role: PlanTableFragment["role"];
2693
+ role: PlanTableFragment_2["role"];
1889
2694
  columnKey?: string;
1890
2695
  }
1891
2696
 
@@ -1893,7 +2698,7 @@ declare interface ReportCellTableIdentity_2 {
1893
2698
  id: string;
1894
2699
  /** 逻辑表行索引;跨分页的同一行保持不变。 */
1895
2700
  rowIndex: number;
1896
- role: PlanTableFragment_2["role"];
2701
+ role: PlanTableFragment["role"];
1897
2702
  columnKey?: string;
1898
2703
  }
1899
2704
 
@@ -1901,7 +2706,7 @@ declare type ReportCellValue = string | number | boolean | null;
1901
2706
 
1902
2707
  declare type ReportCellValue_2 = string | number | boolean | null;
1903
2708
 
1904
- declare type ReportCellValueType = NonNullable<GridCell["valueType"]>;
2709
+ declare type ReportCellValueType = NonNullable<GridCell_2["valueType"]>;
1905
2710
 
1906
2711
  declare interface ReportDefinition {
1907
2712
  /** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
@@ -1909,23 +2714,58 @@ declare interface ReportDefinition {
1909
2714
  /** 静态数据;load 存在时优先使用 load 的结果。 */
1910
2715
  datasets?: DatasetRows;
1911
2716
  load?: (context: ReportLoadContext) => DatasetRows | Promise<DatasetRows>;
2717
+ /** 可选统一适配器;load 存在时仍优先 load,兼容已有定义。 */
2718
+ provider?: ReportProvider;
2719
+ /** 可选业务数据契约;声明的数据集缺失或字段不合法时,在分页前给出结构化错误。 */
2720
+ dataSchema?: Record<string, DatasetContract>;
2721
+ dataValidation?: Pick<DatasetValidationOptions, "maxRows" | "maxCells" | "maxIssues">;
1912
2722
  /** 覆盖模板参数定义;动态模板应在此声明查询面板元数据,避免查询前先请求模板。 */
1913
2723
  params?: ReportParamDef[];
1914
2724
  pagination?: PaginateOptions;
1915
2725
  }
1916
2726
 
2727
+ declare interface ReportDiagnostic { code: string; message: string; path?: string; severity: "warning" | "error" | "info" }
2728
+
2729
+ declare interface ReportEditBatch {
2730
+ /** Idempotency identity; the server should bind it to the exact payload. */
2731
+ requestId: string;
2732
+ edits: ReportCellEdit[];
2733
+ }
2734
+
2735
+ declare interface ReportEditConflict {
2736
+ source?: Readonly<ReportCellSource_2>;
2737
+ address?: ReportCellAddress;
2738
+ message: string;
2739
+ currentValue?: ReportCellValue;
2740
+ revision?: string | number;
2741
+ }
2742
+
1917
2743
  /** Opt in with true for local drafts, or provide host validation and persistence. */
1918
2744
  export declare interface ReportEditingOptions {
1919
2745
  canEdit?(context: ReportCellContext): boolean;
1920
2746
  /** Return an error message or throw to reject the edit. */
1921
2747
  validate?(edit: Readonly<ReportCellEdit>, operation: ReportEditOperation): void | string | Promise<void | string>;
1922
2748
  /** Called before applying the change. A rejection leaves the current report untouched. */
1923
- save?(edit: Readonly<ReportCellEdit>, operation: ReportEditOperation): void | Promise<void>;
2749
+ save?(edit: Readonly<ReportCellEdit>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
2750
+ /** Must commit all edits in one server transaction. Required for multi-cell persisted edits. */
2751
+ saveBatch?(batch: Readonly<ReportEditBatch>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
2752
+ /** Restrict persistence to plans that supply stable datasetId/rowKey/field metadata. */
2753
+ requireSource?: boolean;
1924
2754
  }
1925
2755
 
1926
2756
  export declare interface ReportEditOperation {
1927
2757
  /** Reload, another import or unmount aborts the operation. Save adapters should forward this signal. */
1928
2758
  signal: AbortSignal;
2759
+ requestId?: string;
2760
+ action?: "edit" | "undo" | "redo" | "restore";
2761
+ }
2762
+
2763
+ declare interface ReportEditResult {
2764
+ /** A successful result may advance concurrency tokens for the affected dataset. */
2765
+ revision?: string | number;
2766
+ sourceToken?: string;
2767
+ /** Any conflict rejects the entire client batch. A server must also transact atomically. */
2768
+ conflicts?: readonly ReportEditConflict[];
1929
2769
  }
1930
2770
 
1931
2771
  /** 报表含表头但业务行为空时,由接入方明确声明;组件不推测业务数据。 */
@@ -1949,10 +2789,39 @@ declare interface ReportFetchInput {
1949
2789
  signal?: AbortSignal;
1950
2790
  /** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
1951
2791
  onWarning?: (message: string) => void;
2792
+ onQueryResult?: (reportId: string, result: ReportQueryResult) => void;
2793
+ }
2794
+
2795
+ declare interface ReportFieldContract {
2796
+ field: string;
2797
+ label?: string;
2798
+ type: "text" | "number" | "boolean" | "date" | "decimal";
2799
+ required?: boolean;
2800
+ nullable?: boolean;
2801
+ enum?: readonly (string | number | boolean)[];
2802
+ min?: number; max?: number;
2803
+ minLength?: number; maxLength?: number;
2804
+ semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
2805
+ unit?: string;
2806
+ }
2807
+
2808
+ export declare interface ReportFieldTarget {
2809
+ field: string;
2810
+ datasetId?: string;
2811
+ rowKey?: string | number;
1952
2812
  }
1953
2813
 
1954
2814
  export declare type ReportIdInput = string | string[] | null | undefined;
1955
2815
 
2816
+ export declare interface ReportInteractionOptions {
2817
+ /** Screen-only frozen panes; exported geometry is unchanged. */
2818
+ freezeHeaders?: boolean;
2819
+ /** Leading identity columns, from 0 to 20. */
2820
+ frozenColumns?: number;
2821
+ /** Show workbook sheets / report sections when available. Default true. */
2822
+ navigation?: boolean;
2823
+ }
2824
+
1956
2825
  /** 取数与排版共同使用的请求上下文;取消只影响本次调用。 */
1957
2826
  declare interface ReportLoadContext {
1958
2827
  reportId: string;
@@ -1972,6 +2841,11 @@ declare interface ReportParamDef {
1972
2841
  defaultValue?: string;
1973
2842
  required?: boolean;
1974
2843
  placeholder?: string;
2844
+ /** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
2845
+ min?: number | string;
2846
+ max?: number | string;
2847
+ minLength?: number;
2848
+ maxLength?: number;
1975
2849
  }
1976
2850
 
1977
2851
  /** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
@@ -1989,6 +2863,11 @@ declare interface ReportParamDef_2 {
1989
2863
  defaultValue?: string;
1990
2864
  required?: boolean;
1991
2865
  placeholder?: string;
2866
+ /** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
2867
+ min?: number | string;
2868
+ max?: number | string;
2869
+ minLength?: number;
2870
+ maxLength?: number;
1992
2871
  }
1993
2872
 
1994
2873
  /** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
@@ -2006,9 +2885,20 @@ declare interface ReportParamDef_3 {
2006
2885
  defaultValue?: string;
2007
2886
  required?: boolean;
2008
2887
  placeholder?: string;
2888
+ /** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
2889
+ min?: number | string;
2890
+ max?: number | string;
2891
+ minLength?: number;
2892
+ maxLength?: number;
2009
2893
  }
2010
2894
 
2011
- export declare const ReportParamPanel: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2895
+ declare interface ReportParamIssue { code: ReportParamIssueCode; path: string; field: string; message: string }
2896
+
2897
+ declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "minimum" | "maximum" | "minLength" | "maxLength";
2898
+
2899
+ export declare const ReportParamPanel: DefineComponent<__VLS_Props_2, {
2900
+ focusInvalid: typeof focusInvalid;
2901
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2012
2902
  reset: () => any;
2013
2903
  query: () => any;
2014
2904
  "update:modelValue": (value: Record<string, string>) => any;
@@ -2016,16 +2906,69 @@ query: () => any;
2016
2906
  onReset?: (() => any) | undefined;
2017
2907
  onQuery?: (() => any) | undefined;
2018
2908
  "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
2019
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2909
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
2910
+ root: HTMLDivElement;
2911
+ }, HTMLDivElement>;
2912
+
2913
+ export declare interface ReportPreferencesAdapter {
2914
+ load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
2915
+ save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
2916
+ remove?(key: string): void | Promise<void>;
2917
+ }
2918
+
2919
+ export declare interface ReportPreferencesOptions {
2920
+ /** Host-scoped key; do not share one key between unrelated users/tenants. */
2921
+ key: string;
2922
+ adapter: ReportPreferencesAdapter;
2923
+ }
2020
2924
 
2021
2925
  export declare const ReportPreview: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2022
2926
 
2023
2927
  export declare type ReportPreviewPreferences = Record<ReportPreviewTool, boolean>;
2024
2928
 
2025
- export declare type ReportPreviewTool = typeof REPORT_PREVIEW_TOOLS[number];
2929
+ export declare type ReportPreviewTool = "search" | "thumbnails" | "zoom" | ReportExportFormat | "print" | "pdfWindow" | "editing" | "import";
2930
+
2931
+ /** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
2932
+ declare interface ReportProvider {
2933
+ query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
2934
+ save?(input: ReportSaveInput): ReportSaveResult | Promise<ReportSaveResult>;
2935
+ export?(input: ReportProviderExportInput): ReportProviderExportResult | Promise<ReportProviderExportResult>;
2936
+ templates?: ReportTemplateProvider;
2937
+ }
2938
+
2939
+ declare interface ReportProviderExportInput extends ReportLoadContext { format: "pdf" | "xlsx" }
2940
+
2941
+ declare interface ReportProviderExportResult { bytes: Uint8Array; contentType: string; fileName?: string; diagnostics?: ReportDiagnostic[] }
2942
+
2943
+ declare interface ReportQueryResult {
2944
+ datasets: DatasetRows;
2945
+ revision?: string;
2946
+ sourceToken?: string;
2947
+ diagnostics?: ReportDiagnostic[];
2948
+ }
2026
2949
 
2027
2950
  declare type ReportRegistry = Record<string, ReportDefinition>;
2028
2951
 
2952
+ declare interface ReportSaveInput extends ReportLoadContext {
2953
+ requestId: string;
2954
+ expectedRevision?: string;
2955
+ sourceToken?: string;
2956
+ edits: readonly ReportCellEdit_2[];
2957
+ action?: "edit" | "undo" | "redo" | "restore";
2958
+ }
2959
+
2960
+ declare interface ReportSaveResult {
2961
+ revision: string;
2962
+ sourceToken?: string;
2963
+ conflicts?: Array<{ editIndex: number; code: string; message: string }>;
2964
+ diagnostics?: ReportDiagnostic[];
2965
+ }
2966
+
2967
+ export declare interface ReportSection {
2968
+ label: string;
2969
+ pageIndex: number;
2970
+ }
2971
+
2029
2972
  declare interface ReportTemplate {
2030
2973
  schemaVersion?: string;
2031
2974
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
@@ -2047,11 +2990,31 @@ declare interface ReportTemplate_3 {
2047
2990
  pages: TemplatePage_3[];
2048
2991
  }
2049
2992
 
2993
+ /** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
2994
+ declare interface ReportTemplateDocument {
2995
+ schemaVersion: "1.0";
2996
+ id: string;
2997
+ name: string;
2998
+ /** 宿主的发布版本/乐观锁标识,不由引擎自动递增。 */
2999
+ revision?: string;
3000
+ description?: string;
3001
+ template: ReportTemplate_2;
3002
+ }
3003
+
2050
3004
  declare type ReportTemplateLoader = (context: ReportLoadContext) => ReportTemplate_2 | Promise<ReportTemplate_2>;
2051
3005
 
2052
- export declare const ReportToolbar: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3006
+ declare interface ReportTemplateProvider {
3007
+ list(context: { signal?: AbortSignal }): Promise<ReportTemplateSummary[]>;
3008
+ get(id: string, context: { signal?: AbortSignal }): Promise<ReportTemplateDocument | undefined>;
3009
+ }
3010
+
3011
+ declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
3012
+
3013
+ export declare const ReportToolbar: DefineComponent<__VLS_Props, {
3014
+ focusSearch: () => void;
3015
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
3016
+ export: (format: "pdf" | "xlsx" | "html" | "png" | "word") => any;
2053
3017
  print: () => any;
2054
- export: (format: "html" | "png" | "pdf" | "xlsx" | "word") => any;
2055
3018
  zoom: (mode: number | "fit") => any;
2056
3019
  goto: (page: number) => any;
2057
3020
  "pdf-window": () => any;
@@ -2062,8 +3025,8 @@ goto: (page: number) => any;
2062
3025
  "import-excel": () => any;
2063
3026
  "settings-toggle": () => any;
2064
3027
  }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
3028
+ onExport?: ((format: "pdf" | "xlsx" | "html" | "png" | "word") => any) | undefined;
2065
3029
  onPrint?: (() => any) | undefined;
2066
- onExport?: ((format: "html" | "png" | "pdf" | "xlsx" | "word") => any) | undefined;
2067
3030
  onZoom?: ((mode: number | "fit") => any) | undefined;
2068
3031
  onGoto?: ((page: number) => any) | undefined;
2069
3032
  "onPdf-window"?: (() => any) | undefined;
@@ -2075,6 +3038,7 @@ onGoto?: ((page: number) => any) | undefined;
2075
3038
  "onSettings-toggle"?: (() => any) | undefined;
2076
3039
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
2077
3040
  searchInputRef: HTMLInputElement;
3041
+ searchToggleRef: HTMLButtonElement;
2078
3042
  }, HTMLDivElement>;
2079
3043
 
2080
3044
  export declare function resolveConfig(config: MachReportConfig | null | undefined, presetName?: string): ResolvedConfig;
@@ -2089,6 +3053,9 @@ export declare type ResolvedConfig = Required<Pick<MachReportDefaults, "showExpo
2089
3053
  editable: boolean | ReportEditingOptions;
2090
3054
  excelImport: boolean | ExcelImportOptions;
2091
3055
  toolbar: MachReportToolbarOptions;
3056
+ interaction: ReportInteractionOptions;
3057
+ preferences?: ReportPreferencesOptions;
3058
+ assets?: AssetRenderOptions;
2092
3059
  };
2093
3060
 
2094
3061
  declare interface RichParagraph {
@@ -2139,12 +3106,6 @@ declare interface RichSegment_3 {
2139
3106
  style?: ComponentStyle_3;
2140
3107
  }
2141
3108
 
2142
- /** 控制器注入:后代组件 useReportPreview() 免模板 ref 编程式访问(与 expose 同面) */
2143
- /** 编程式设参查询:合并进面板值(面板本地字典经 v-model 同步),可选立即重载 */
2144
- declare function setParams(values: Record<string, string>, opts?: {
2145
- reload?: boolean;
2146
- }): Promise<void>;
2147
-
2148
3109
  export declare const SILENT_LOGGER: MachReportLogger;
2149
3110
 
2150
3111
  /** 条件格式规则求值(声明式,见 ListColumn.rules) */
@@ -2180,9 +3141,9 @@ declare interface StyleRule_3 {
2180
3141
  style: Record<string, unknown>;
2181
3142
  }
2182
3143
 
2183
- declare type TemplateComponent = PlanComponent | ListComponent;
3144
+ declare type TemplateComponent = PlanComponent_2 | ListComponent;
2184
3145
 
2185
- declare type TemplateComponent_2 = PlanComponent_2 | ListComponent_2;
3146
+ declare type TemplateComponent_2 = PlanComponent | ListComponent_2;
2186
3147
 
2187
3148
  declare type TemplateComponent_3 = PlanComponent_3 | ListComponent_3;
2188
3149
 
@@ -2232,7 +3193,9 @@ declare interface TemplatePage_3 {
2232
3193
 
2233
3194
  declare interface TextMeasureOptions {
2234
3195
  fontSizePt: number;
3196
+ fontFamily?: string;
2235
3197
  bold?: boolean;
3198
+ italic?: boolean;
2236
3199
  letterSpacingPt?: number;
2237
3200
  }
2238
3201
 
@@ -2334,7 +3297,7 @@ export declare function useZoom(getFitInputs: () => {
2334
3297
  * 目标是"财务能直接用的对账表"而非复刻版面)
2335
3298
  * - 未支持组件、富文本专有内容与单元格嵌套组件跳过并计入 warnings
2336
3299
  */
2337
- declare interface XlsxRenderOptions {
3300
+ declare interface XlsxRenderOptions extends OutputDiagnosticOptions_2 {
2338
3301
  /** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
2339
3302
  sheetName?: (sheetIndex: number) => string;
2340
3303
  /** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */