@agile-team/mach-report 2.15.0 → 2.16.0

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 (155) hide show
  1. package/README.md +14 -9
  2. package/dist/{ExcelBindingWizard-Bs43BGNp.cjs → ExcelBindingWizard-CP6h2x1f.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-BKH1nGNS.js → ExcelBindingWizard-HhB3hAJE.js} +3 -3
  4. package/dist/{ParamEditor-Da4akw6V.cjs → ParamEditor-CUQLgoxa.cjs} +1 -1
  5. package/dist/{ParamEditor-DoAhzJsm.js → ParamEditor-OKesP_nO.js} +1 -1
  6. package/dist/{ReportBatchPanel-wP9m9Pj1.cjs → ReportBatchPanel-cZCAMAwH.cjs} +1 -1
  7. package/dist/{ReportBatchPanel-BMf6boMA.js → ReportBatchPanel-ruxcbfY6.js} +3 -3
  8. package/dist/ReportPreview-BcDKCLiK.js +4834 -0
  9. package/dist/ReportPreview-Bk9nLfO9.cjs +6 -0
  10. package/dist/{ReportTemplateLibrary-Sxr3eD0J.cjs → ReportTemplateLibrary-BDlNT8JN.cjs} +1 -1
  11. package/dist/{ReportTemplateLibrary-C9wutIiT.js → ReportTemplateLibrary-DcwrH-63.js} +1 -1
  12. package/dist/{RuleEditor-XhGHK8DE.cjs → RuleEditor-BX5S8RSF.cjs} +1 -1
  13. package/dist/{RuleEditor-C_Clasvd.js → RuleEditor-CGl9XY2s.js} +2 -2
  14. package/dist/{TemplateOutlinePanel-JTSR53vJ.cjs → TemplateOutlinePanel-CGrT5DFN.cjs} +1 -1
  15. package/dist/{TemplateOutlinePanel-D6Bkny59.js → TemplateOutlinePanel-SXCjaPKR.js} +1 -1
  16. package/dist/{TemplateReusePanel-Kx35S0Ql.cjs → TemplateReusePanel-6Z3wRFz8.cjs} +1 -1
  17. package/dist/{TemplateReusePanel-rVuK1kTz.js → TemplateReusePanel-lHLOS9Wn.js} +2 -2
  18. package/dist/{TemplateReviewPanel-B0ar9_zf.js → TemplateReviewPanel-CJ9PLc48.js} +1 -1
  19. package/dist/{TemplateReviewPanel-Dn6X9UmY.cjs → TemplateReviewPanel-Dpk7sLcF.cjs} +1 -1
  20. package/dist/analytics.d.cts +2 -0
  21. package/dist/analytics.d.ts +2 -0
  22. package/dist/artifact-integrity.json +99 -91
  23. package/dist/{assets-DEaz4qsp.js → assets-CqIbfbTr.js} +24 -22
  24. package/dist/assets-e4YSke8n.cjs +1 -0
  25. package/dist/auto-YR7a4BtF.js +240 -0
  26. package/dist/auto-uVBjX1j5.cjs +1 -0
  27. package/dist/{batch-BfZHN1do.js → batch-WzDIXJAt.js} +1 -1
  28. package/dist/{batch-CLpELXBl.cjs → batch-z6Aw5GEY.cjs} +1 -1
  29. package/dist/capabilities-DDwXr_cA.js +103 -0
  30. package/dist/capabilities-DNLyZdNw.cjs +1 -0
  31. package/dist/codes.d.cts +2 -0
  32. package/dist/codes.d.ts +2 -0
  33. package/dist/component-tree-Ca6YYfHq.js +61 -0
  34. package/dist/component-tree-DkGLEfZC.cjs +1 -0
  35. package/dist/config-Dg_o8e7m.cjs +1 -0
  36. package/dist/{config-BVsJXSqS.js → config-XQ4qrQ7Q.js} +66 -64
  37. package/dist/designer-BfQSahxq.js +5163 -0
  38. package/dist/designer-CPPdeM5_.cjs +2 -0
  39. package/dist/designer.cjs +1 -1
  40. package/dist/designer.d.cts +53 -0
  41. package/dist/designer.d.ts +53 -0
  42. package/dist/designer.js +1 -1
  43. package/dist/diagnostic-notification-B9K9We3h.cjs +1 -0
  44. package/dist/diagnostic-notification-qGAYZdkB.js +7 -0
  45. package/dist/drill-CsdjgkRM.cjs +1 -0
  46. package/dist/{drill-ByJviLXS.js → drill-DIGsZfyB.js} +11 -11
  47. package/dist/encoding-BOGq4qYL.js +21 -0
  48. package/dist/encoding-BYF9ZTl9.cjs +1 -0
  49. package/dist/{font-loader-Q3bQjmrI.js → font-loader-CzI1GuBc.js} +1 -1
  50. package/dist/{font-loader-B_UkxpzC.cjs → font-loader-EKLzOJxf.cjs} +1 -1
  51. package/dist/index.cjs +7 -8
  52. package/dist/index.d.cts +2 -0
  53. package/dist/index.d.ts +2 -0
  54. package/dist/index.js +865 -834
  55. package/dist/json-snapshot-D6ioHth9.js +1702 -0
  56. package/dist/json-snapshot-DknkjvxP.cjs +2 -0
  57. package/dist/{pdf-CvvrjPQg.cjs → pdf-ByVCb1i6.cjs} +48 -50
  58. package/dist/{pdf-BwNyeGpt.js → pdf-DJ5S6ukC.js} +2737 -2749
  59. package/dist/pdf.cjs +1 -1
  60. package/dist/pdf.d.cts +2 -0
  61. package/dist/pdf.d.ts +2 -0
  62. package/dist/pdf.js +2 -2
  63. package/dist/{plugin-Ca_XZG3l.js → plugin-C2j5_mhx.js} +1 -1
  64. package/dist/{plugin-DHO7X8z2.cjs → plugin-Dr39GBRG.cjs} +1 -1
  65. package/dist/prepared-DdrjLC7L.cjs +1 -0
  66. package/dist/prepared-DqtpvRTn.js +87 -0
  67. package/dist/progress-BXzlVbIp.js +29 -0
  68. package/dist/progress-DJBd9Rb9.cjs +1 -0
  69. package/dist/{progress-D-OTpEav.js → progress-Hc2vxoCs.js} +2 -2
  70. package/dist/protocol-BzwMP4Vw.cjs +1 -0
  71. package/dist/protocol-kt4Iy6-3.js +90 -0
  72. package/dist/{record-bindings-Do_b3h4V.js → record-bindings-CZWBJ1fU.js} +9 -10
  73. package/dist/record-bindings-DUX1VMlR.cjs +1 -0
  74. package/dist/{region-binding-workflow-BMhK_TjP.js → region-binding-workflow-CWNvIjkV.js} +1 -1
  75. package/dist/{region-binding-workflow-DIYJdCUr.cjs → region-binding-workflow-CqSMxQ4p.cjs} +1 -1
  76. package/dist/report-encoding-worker.cjs +1 -0
  77. package/dist/report-encoding-worker.d.ts +1 -0
  78. package/dist/report-encoding-worker.js +2 -0
  79. package/dist/rich-text-layout-ALlMoYOG.cjs +3 -0
  80. package/dist/rich-text-layout-Ct5WrY1g.js +102 -0
  81. package/dist/runtime-BjKBI530.js +168 -0
  82. package/dist/runtime-CBFEPKEs.cjs +1 -0
  83. package/dist/sbom.cdx.json +2 -2
  84. package/dist/server/node.d.cts +86 -1
  85. package/dist/server/node.d.ts +86 -1
  86. package/dist/server-node.cjs +5 -1
  87. package/dist/server-node.js +4558 -473
  88. package/dist/server.cjs +1 -1
  89. package/dist/server.d.cts +8 -1
  90. package/dist/server.d.ts +8 -1
  91. package/dist/server.js +634 -792
  92. package/dist/sha256-BshdOkCC.cjs +1 -0
  93. package/dist/sha256-DTG-Gq8i.js +157 -0
  94. package/dist/style-67OqfNed.js +73 -0
  95. package/dist/style-C22Pbv3T.cjs +1 -0
  96. package/dist/style.css +1 -1
  97. package/dist/{template-catalog-j2B1MJlL.js → template-catalog-BtR2JmCL.js} +9 -9
  98. package/dist/{template-catalog-FJE_c9Qe.cjs → template-catalog-C2NLdrwB.cjs} +1 -1
  99. package/dist/{template-fragments-DcKeiylI.cjs → template-fragments-BVsbxs4a.cjs} +1 -1
  100. package/dist/{template-fragments-BGbQLGlV.js → template-fragments-By0aZC1D.js} +2 -2
  101. package/dist/template-registry-C62vpv4a.cjs +1 -0
  102. package/dist/{template-registry-BtaKPELV.js → template-registry-Cw3vRTX2.js} +389 -321
  103. package/dist/{textwrap-DE1kgcJB.js → textwrap-BEIg2w8y.js} +1 -1
  104. package/dist/textwrap-BI-yJ6Wt.cjs +4 -0
  105. package/dist/vue/async.d.cts +66 -0
  106. package/dist/vue/async.d.ts +66 -0
  107. package/dist/vue/index.d.cts +89 -1
  108. package/dist/vue/index.d.ts +89 -1
  109. package/dist/vue-async.cjs +1 -1
  110. package/dist/vue-async.js +3 -3
  111. package/dist/vue.cjs +1 -1
  112. package/dist/vue.js +7 -7
  113. package/dist/{workbook-session-BvToI-Fd.js → workbook-session-BeSO8PFB.js} +153 -140
  114. package/dist/{workbook-session-Bjv1YCRK.cjs → workbook-session-Cbts-22R.cjs} +12 -12
  115. package/dist/worker.cjs +1 -1
  116. package/dist/worker.d.cts +84 -1
  117. package/dist/worker.d.ts +84 -1
  118. package/dist/worker.js +12 -157
  119. package/dist/xlsx-node.cjs +33 -33
  120. package/dist/xlsx-node.js +1282 -1289
  121. package/dist/xlsx.cjs +4 -3
  122. package/dist/xlsx.d.cts +2 -0
  123. package/dist/xlsx.d.ts +2 -0
  124. package/dist/xlsx.js +297 -279
  125. package/package.json +6 -3
  126. package/dist/ReportPreview-ChV19HBp.js +0 -4619
  127. package/dist/ReportPreview-DbLvvOUT.cjs +0 -6
  128. package/dist/assets-B9ImAi6_.cjs +0 -1
  129. package/dist/batch-BaP6pWDE.cjs +0 -1
  130. package/dist/batch-CGyt-b2W.js +0 -273
  131. package/dist/capabilities-CAh2Nrue.cjs +0 -1
  132. package/dist/capabilities-DskCHs3V.js +0 -69
  133. package/dist/config-D10us76d.cjs +0 -1
  134. package/dist/data-explanation-B8MZRYVS.js +0 -16
  135. package/dist/data-explanation-DE55G30w.cjs +0 -1
  136. package/dist/defaults-DXhiM1ZD.js +0 -10
  137. package/dist/defaults-xhmcLLrf.cjs +0 -1
  138. package/dist/designer-2bDlcNXQ.js +0 -5136
  139. package/dist/designer-BT7XCdbW.cjs +0 -2
  140. package/dist/drill-DYTxuL3A.cjs +0 -1
  141. package/dist/grid-strokes-Cr7DwUux.cjs +0 -1
  142. package/dist/grid-strokes-DyyG1q_o.js +0 -53
  143. package/dist/json-snapshot-DFb2eWkf.js +0 -1416
  144. package/dist/json-snapshot-WWSGlaHG.cjs +0 -2
  145. package/dist/prepared-CFy9B75C.cjs +0 -1
  146. package/dist/prepared-ajM-H-9B.js +0 -69
  147. package/dist/record-bindings-By_UKZ2g.cjs +0 -1
  148. package/dist/render-plan-7xpGrCEl.cjs +0 -1
  149. package/dist/render-plan-Ck6koX9L.js +0 -13
  150. package/dist/sha256-ArEYjaTI.cjs +0 -1
  151. package/dist/sha256-DPEuJ3nh.js +0 -155
  152. package/dist/style-CQ1PK8ZB.js +0 -67
  153. package/dist/style-UgIJSA1F.cjs +0 -1
  154. package/dist/template-registry-Co1zPq5e.cjs +0 -1
  155. package/dist/textwrap-CWHyzkBH.cjs +0 -4
@@ -1,4 +1,4 @@
1
- import { D as M } from "./defaults-DXhiM1ZD.js";
1
+ import { D as M } from "./style-67OqfNed.js";
2
2
  const d = /[\u3000-\u9fff\uff00-\uffef]/, s = new Uint8Array(128);
3
3
  {
4
4
  for (const t of "iljtf.,:;'`|!()[]") s[t.charCodeAt(0)] = 1;
@@ -0,0 +1,4 @@
1
+ "use strict";const w=require("./style-C22Pbv3T.cjs"),M=/[\u3000-\u9fff\uff00-\uffef]/,s=new Uint8Array(128);{for(const t of"iljtf.,:;'`|!()[]")s[t.charCodeAt(0)]=1;for(const t of"mwMW@")s[t.charCodeAt(0)]=2;for(let t=48;t<=57;t++)s[t]=3;for(let t=65;t<=90;t++)s[t]=4;s[32]=5}const g=[.54,.26,.95,.59,.67,.3];function d(t){const e=t.charCodeAt(0);return e<128?g[s[e]]:M.test(t)?1:/[A-Z]/.test(t)?.67:.54}const o={measureMm(t,e){const{fontSizePt:i,bold:c=!1,letterSpacingPt:u=0}=e,r=25.4/72;let n=0;for(const h of t)n+=d(h);return c&&(n*=1.04),(n*i+u*Math.max(0,Array.from(t).length-1))*r}};function p(){return o}function A(t,e){return o.measureMm(t,e)}function x(t){let e;return{measureMm(i,c){if(e===void 0&&(e=t()),!e)return o.measureMm(i,c);const u=c.fontSizePt*96/72;e.font=`${c.italic?"italic ":""}${c.bold?"bold ":""}${u}px ${c.fontFamily??w.DEFAULT_FONT_FAMILY}`,"letterSpacing"in e&&(e.letterSpacing="0px");const r=(c.letterSpacingPt??0)*Math.max(0,Array.from(i).length-1);return e.measureText(i).width*25.4/96+r*25.4/72}}}function T(t,e,i){const c=[];let u="";const r=()=>{u&&(c.push({text:u,widthMm:i.measureMm(u,e),cjk:!1}),u="")};for(const n of t){if(n===`
2
+ `){r(),c.push({text:`
3
+ `,widthMm:0,cjk:!1,br:!0});continue}if(n===" "){r(),c.push({text:n,widthMm:i.measureMm(n,e),cjk:!1,space:!0});continue}if(M.test(n)){r(),c.push({text:n,widthMm:i.measureMm(n,e),cjk:!0});continue}u+=n}return r(),c}function S(t,e,i,c=o){if(!t)return[""];t=t.replace(/\r\n?/g,`
4
+ `);const u=[];let r="",n=0;const h=(i.letterSpacingPt??0)*25.4/72,a=()=>{u.push(r),r="",n=0};for(const f of T(t,i,c)){if(f.br){a();continue}const m=r.length>0?h:0;if(n+m+f.widthMm<=e){r+=f.text,n+=m+f.widthMm;continue}if(f.space){a();continue}if(f.cjk){r.length>0&&a(),r=f.text,n=f.widthMm;continue}if(r.length>0&&a(),f.widthMm<=e){r=f.text,n=f.widthMm;continue}for(const l of f.text)c.measureMm(r+l,i)>e&&r.length>0&&a(),r+=l,n=c.measureMm(r,i)}return a(),u}exports.charWidthEm=d;exports.createCanvasMeasurer=x;exports.createHeuristicMeasurer=p;exports.heuristicMeasurer=o;exports.measureTextMm=A;exports.wrapText=S;
@@ -36,6 +36,14 @@ declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMedia
36
36
  assetFailure?: "throw" | "placeholder";
37
37
  signal?: AbortSignal;
38
38
  }
39
+ declare interface BrowserReportWorker {
40
+ postMessage(value: unknown, transfer?: Transferable[]): void;
41
+ terminate(): void;
42
+ addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
43
+ addEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
44
+ removeEventListener(type: "message", listener: (event: MessageEvent) => void): void;
45
+ removeEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
46
+ }
39
47
  /** Serializable symbol settings. Encoders remain in the optional /codes entry. */
40
48
  declare interface CodeOptions {
41
49
  /** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
@@ -363,6 +371,8 @@ declare interface FormulaAdapter {
363
371
  }): unknown;
364
372
  }
365
373
  declare interface GridCell {
374
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
375
+ richParagraphs?: RichParagraph[];
366
376
  text?: string;
367
377
  rawText?: string;
368
378
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -386,6 +396,8 @@ declare interface GridCell {
386
396
  style?: ComponentStyle;
387
397
  }
388
398
  declare interface GridCell_2 {
399
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
400
+ richParagraphs?: RichParagraph_2[];
389
401
  text?: string;
390
402
  rawText?: string;
391
403
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -409,6 +421,8 @@ declare interface GridCell_2 {
409
421
  style?: ComponentStyle_2;
410
422
  }
411
423
  declare interface GridCell_3 {
424
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
425
+ richParagraphs?: RichParagraph_3[];
412
426
  text?: string;
413
427
  rawText?: string;
414
428
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -705,6 +719,8 @@ declare interface MachReportConfig {
705
719
  }
706
720
  /** defaults 层可配置项(全部可选,均有内置缺省) */
707
721
  declare interface MachReportDefaults {
722
+ /** Small encodes stay local; optional Worker isolation uses the same prepared plan for large output. */
723
+ exportExecution?: ReportExportExecutionOptions;
708
724
  drill?: ReportDrillOptions;
709
725
  loadParamOptions?: ReportParamOptionsLoader;
710
726
  printOptions?: ReportPrintOptions;
@@ -1118,6 +1134,8 @@ declare interface PdfExporter {
1118
1134
  }): Promise<Uint8Array>;
1119
1135
  /** 可选轻量字体检查;旧版自定义导出函数无需实现。取消时拒绝 AbortError。 */
1120
1136
  checkFont?: (signal?: AbortSignal) => Promise<PdfFontCheckResult>;
1137
+ /** Optional resource preparation for isolated encoding; custom exporters without it keep their own pipeline. */
1138
+ prepare?: (signal?: AbortSignal) => Promise<ReportPdfFontOptions>;
1121
1139
  }
1122
1140
  declare interface PdfFontCheckResult {
1123
1141
  status: PdfFontStatus;
@@ -1606,8 +1624,36 @@ declare interface ReportEmptyState {
1606
1624
  title?: string;
1607
1625
  description?: string;
1608
1626
  }
1627
+ declare interface ReportExportDecision {
1628
+ mode: "local" | "worker";
1629
+ reason: ReportExportDecisionReason;
1630
+ /** Lower bounds: traversal stops as soon as isolation is warranted. No font or image hashing. */
1631
+ estimate: {
1632
+ pages: number;
1633
+ cells: number;
1634
+ bytes: number;
1635
+ };
1636
+ hardCancellation: boolean;
1637
+ }
1638
+ declare type ReportExportDecisionReason = "small-task" | "threshold" | "scan-limit" | "explicit-local" | "explicit-worker" | "worker-unavailable" | "worker-start-failed" | "nonserializable-options";
1639
+ declare interface ReportExportExecutionOptions {
1640
+ mode?: "auto" | "worker" | "local";
1641
+ /** A fresh bundler-managed module Worker for every call; never a shared worker. */
1642
+ workerFactory?: () => BrowserReportWorker;
1643
+ thresholds?: ReportExportThresholds;
1644
+ /** Auto only. Startup unavailability may use local; encoding failures never retry. */
1645
+ fallback?: "local" | "error";
1646
+ timeoutMs?: number;
1647
+ budget?: ReportRuntimeBudget;
1648
+ onDecision?: (decision: ReportExportDecision) => void;
1649
+ }
1609
1650
  /** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
1610
1651
  declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
1652
+ declare interface ReportExportThresholds {
1653
+ cells?: number;
1654
+ pages?: number;
1655
+ bytes?: number;
1656
+ }
1611
1657
  declare type ReportExpression = {
1612
1658
  field: string;
1613
1659
  } | {
@@ -1787,6 +1833,17 @@ declare interface ReportParamOptionsMessages {
1787
1833
  paramOptionsDependencies?: string;
1788
1834
  paramOptionsClear?: string;
1789
1835
  }
1836
+ /** Licensed local font bytes; never downloaded implicitly by the runtime. */
1837
+ declare interface ReportPdfFontOptions {
1838
+ customFontBytes?: Uint8Array | ArrayBuffer;
1839
+ customFontName?: string;
1840
+ customFontFaces?: {
1841
+ regular: Uint8Array | ArrayBuffer;
1842
+ bold?: Uint8Array | ArrayBuffer;
1843
+ italic?: Uint8Array | ArrayBuffer;
1844
+ boldItalic?: Uint8Array | ArrayBuffer;
1845
+ };
1846
+ }
1790
1847
  declare interface ReportPreferencesAdapter {
1791
1848
  load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
1792
1849
  save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
@@ -1878,6 +1935,15 @@ declare interface ReportQueryResult {
1878
1935
  diagnostics?: ReportDiagnostic[];
1879
1936
  }
1880
1937
  declare type ReportRegistry = Record<string, ReportDefinition>;
1938
+ declare interface ReportRuntimeBudget {
1939
+ maxRows?: number;
1940
+ maxPages?: number;
1941
+ maxCells?: number;
1942
+ maxOutputBytes?: number;
1943
+ /** Bound the plain JSON snapshot accepted by exportPrepared (default 64 MB). */
1944
+ maxPreparedBytes?: number;
1945
+ maxDurationMs?: number;
1946
+ }
1881
1947
  declare interface ReportSaveInput extends ReportLoadContext {
1882
1948
  requestId: string;
1883
1949
  expectedRevision?: string;
@@ -36,6 +36,14 @@ declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMedia
36
36
  assetFailure?: "throw" | "placeholder";
37
37
  signal?: AbortSignal;
38
38
  }
39
+ declare interface BrowserReportWorker {
40
+ postMessage(value: unknown, transfer?: Transferable[]): void;
41
+ terminate(): void;
42
+ addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
43
+ addEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
44
+ removeEventListener(type: "message", listener: (event: MessageEvent) => void): void;
45
+ removeEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
46
+ }
39
47
  /** Serializable symbol settings. Encoders remain in the optional /codes entry. */
40
48
  declare interface CodeOptions {
41
49
  /** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
@@ -363,6 +371,8 @@ declare interface FormulaAdapter {
363
371
  }): unknown;
364
372
  }
365
373
  declare interface GridCell {
374
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
375
+ richParagraphs?: RichParagraph[];
366
376
  text?: string;
367
377
  rawText?: string;
368
378
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -386,6 +396,8 @@ declare interface GridCell {
386
396
  style?: ComponentStyle;
387
397
  }
388
398
  declare interface GridCell_2 {
399
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
400
+ richParagraphs?: RichParagraph_2[];
389
401
  text?: string;
390
402
  rawText?: string;
391
403
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -409,6 +421,8 @@ declare interface GridCell_2 {
409
421
  style?: ComponentStyle_2;
410
422
  }
411
423
  declare interface GridCell_3 {
424
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
425
+ richParagraphs?: RichParagraph_3[];
412
426
  text?: string;
413
427
  rawText?: string;
414
428
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -705,6 +719,8 @@ declare interface MachReportConfig {
705
719
  }
706
720
  /** defaults 层可配置项(全部可选,均有内置缺省) */
707
721
  declare interface MachReportDefaults {
722
+ /** Small encodes stay local; optional Worker isolation uses the same prepared plan for large output. */
723
+ exportExecution?: ReportExportExecutionOptions;
708
724
  drill?: ReportDrillOptions;
709
725
  loadParamOptions?: ReportParamOptionsLoader;
710
726
  printOptions?: ReportPrintOptions;
@@ -1118,6 +1134,8 @@ declare interface PdfExporter {
1118
1134
  }): Promise<Uint8Array>;
1119
1135
  /** 可选轻量字体检查;旧版自定义导出函数无需实现。取消时拒绝 AbortError。 */
1120
1136
  checkFont?: (signal?: AbortSignal) => Promise<PdfFontCheckResult>;
1137
+ /** Optional resource preparation for isolated encoding; custom exporters without it keep their own pipeline. */
1138
+ prepare?: (signal?: AbortSignal) => Promise<ReportPdfFontOptions>;
1121
1139
  }
1122
1140
  declare interface PdfFontCheckResult {
1123
1141
  status: PdfFontStatus;
@@ -1606,8 +1624,36 @@ declare interface ReportEmptyState {
1606
1624
  title?: string;
1607
1625
  description?: string;
1608
1626
  }
1627
+ declare interface ReportExportDecision {
1628
+ mode: "local" | "worker";
1629
+ reason: ReportExportDecisionReason;
1630
+ /** Lower bounds: traversal stops as soon as isolation is warranted. No font or image hashing. */
1631
+ estimate: {
1632
+ pages: number;
1633
+ cells: number;
1634
+ bytes: number;
1635
+ };
1636
+ hardCancellation: boolean;
1637
+ }
1638
+ declare type ReportExportDecisionReason = "small-task" | "threshold" | "scan-limit" | "explicit-local" | "explicit-worker" | "worker-unavailable" | "worker-start-failed" | "nonserializable-options";
1639
+ declare interface ReportExportExecutionOptions {
1640
+ mode?: "auto" | "worker" | "local";
1641
+ /** A fresh bundler-managed module Worker for every call; never a shared worker. */
1642
+ workerFactory?: () => BrowserReportWorker;
1643
+ thresholds?: ReportExportThresholds;
1644
+ /** Auto only. Startup unavailability may use local; encoding failures never retry. */
1645
+ fallback?: "local" | "error";
1646
+ timeoutMs?: number;
1647
+ budget?: ReportRuntimeBudget;
1648
+ onDecision?: (decision: ReportExportDecision) => void;
1649
+ }
1609
1650
  /** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
1610
1651
  declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
1652
+ declare interface ReportExportThresholds {
1653
+ cells?: number;
1654
+ pages?: number;
1655
+ bytes?: number;
1656
+ }
1611
1657
  declare type ReportExpression = {
1612
1658
  field: string;
1613
1659
  } | {
@@ -1787,6 +1833,17 @@ declare interface ReportParamOptionsMessages {
1787
1833
  paramOptionsDependencies?: string;
1788
1834
  paramOptionsClear?: string;
1789
1835
  }
1836
+ /** Licensed local font bytes; never downloaded implicitly by the runtime. */
1837
+ declare interface ReportPdfFontOptions {
1838
+ customFontBytes?: Uint8Array | ArrayBuffer;
1839
+ customFontName?: string;
1840
+ customFontFaces?: {
1841
+ regular: Uint8Array | ArrayBuffer;
1842
+ bold?: Uint8Array | ArrayBuffer;
1843
+ italic?: Uint8Array | ArrayBuffer;
1844
+ boldItalic?: Uint8Array | ArrayBuffer;
1845
+ };
1846
+ }
1790
1847
  declare interface ReportPreferencesAdapter {
1791
1848
  load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
1792
1849
  save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
@@ -1878,6 +1935,15 @@ declare interface ReportQueryResult {
1878
1935
  diagnostics?: ReportDiagnostic[];
1879
1936
  }
1880
1937
  declare type ReportRegistry = Record<string, ReportDefinition>;
1938
+ declare interface ReportRuntimeBudget {
1939
+ maxRows?: number;
1940
+ maxPages?: number;
1941
+ maxCells?: number;
1942
+ maxOutputBytes?: number;
1943
+ /** Bound the plain JSON snapshot accepted by exportPrepared (default 64 MB). */
1944
+ maxPreparedBytes?: number;
1945
+ maxDurationMs?: number;
1946
+ }
1881
1947
  declare interface ReportSaveInput extends ReportLoadContext {
1882
1948
  requestId: string;
1883
1949
  expectedRevision?: string;
@@ -74,6 +74,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
74
74
  type: PropType<ReportOutputOptions>;
75
75
  default: undefined;
76
76
  };
77
+ exportExecution: {
78
+ type: PropType<ReportExportExecutionOptions>;
79
+ default: undefined;
80
+ };
77
81
  assets: {
78
82
  type: PropType<AssetRenderOptions>;
79
83
  default: undefined;
@@ -244,6 +248,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
244
248
  type: PropType<ReportOutputOptions>;
245
249
  default: undefined;
246
250
  };
251
+ exportExecution: {
252
+ type: PropType<ReportExportExecutionOptions>;
253
+ default: undefined;
254
+ };
247
255
  assets: {
248
256
  type: PropType<AssetRenderOptions>;
249
257
  default: undefined;
@@ -325,6 +333,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
325
333
  showPdfWindow: boolean;
326
334
  showSettings: boolean;
327
335
  showParams: boolean;
336
+ exportExecution: ReportExportExecutionOptions;
328
337
  drill: ReportDrillOptions;
329
338
  loadParamOptions: ReportParamOptionsLoader;
330
339
  printOptions: ReportPrintOptions;
@@ -496,6 +505,14 @@ declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMedia
496
505
  assetFailure?: "throw" | "placeholder";
497
506
  signal?: AbortSignal;
498
507
  }
508
+ declare interface BrowserReportWorker {
509
+ postMessage(value: unknown, transfer?: Transferable[]): void;
510
+ terminate(): void;
511
+ addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
512
+ addEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
513
+ removeEventListener(type: "message", listener: (event: MessageEvent) => void): void;
514
+ removeEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
515
+ }
499
516
  /** 供 HTML/Word 导出的完整文档;打印路径逐页渲染,避免预先生成所有页。 */
500
517
  export declare function buildPrintDocument(p: RenderPlan, options?: ReportPrintOptions): PrintHtmlResult;
501
518
  export declare function buildWordHtml(p: RenderPlan): {
@@ -907,6 +924,8 @@ declare interface FormulaAdapter {
907
924
  }): unknown;
908
925
  }
909
926
  declare interface GridCell {
927
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
928
+ richParagraphs?: RichParagraph[];
910
929
  text?: string;
911
930
  rawText?: string;
912
931
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -930,6 +949,8 @@ declare interface GridCell {
930
949
  style?: ComponentStyle;
931
950
  }
932
951
  declare interface GridCell_2 {
952
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
953
+ richParagraphs?: RichParagraph_2[];
933
954
  text?: string;
934
955
  rawText?: string;
935
956
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -953,6 +974,8 @@ declare interface GridCell_2 {
953
974
  style?: ComponentStyle_2;
954
975
  }
955
976
  declare interface GridCell_3 {
977
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
978
+ richParagraphs?: RichParagraph_3[];
956
979
  text?: string;
957
980
  rawText?: string;
958
981
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -1422,6 +1445,8 @@ export declare interface MachReportController {
1422
1445
  }
1423
1446
  /** defaults 层可配置项(全部可选,均有内置缺省) */
1424
1447
  export declare interface MachReportDefaults {
1448
+ /** Small encodes stay local; optional Worker isolation uses the same prepared plan for large output. */
1449
+ exportExecution?: ReportExportExecutionOptions;
1425
1450
  drill?: ReportDrillOptions;
1426
1451
  loadParamOptions?: ReportParamOptionsLoader;
1427
1452
  printOptions?: ReportPrintOptions;
@@ -1909,6 +1934,8 @@ export declare interface PdfExporter {
1909
1934
  }): Promise<Uint8Array>;
1910
1935
  /** 可选轻量字体检查;旧版自定义导出函数无需实现。取消时拒绝 AbortError。 */
1911
1936
  checkFont?: (signal?: AbortSignal) => Promise<PdfFontCheckResult>;
1937
+ /** Optional resource preparation for isolated encoding; custom exporters without it keep their own pipeline. */
1938
+ prepare?: (signal?: AbortSignal) => Promise<ReportPdfFontOptions>;
1912
1939
  }
1913
1940
  export declare interface PdfFontCheckResult {
1914
1941
  status: PdfFontStatus;
@@ -2110,6 +2137,16 @@ declare interface PlanTableFragment_3 {
2110
2137
  }
2111
2138
  /** Bounded concurrency, one stage timeout, and cancellation even for a hanging decoder. */
2112
2139
  export declare function preparePrintResources(doc: Document, options?: ReportPrintOptions, signal?: AbortSignal, base?: string): Promise<void>;
2140
+ declare interface PreviewEncoding {
2141
+ pdf(plan: RenderPlan, exporter: PdfExporter, warning: (message: string) => void, task?: PreviewEncodingTask): Promise<Uint8Array>;
2142
+ xlsx(plan: RenderPlan, options: XlsxRenderOptions, task: PreviewEncodingTask): Promise<{
2143
+ buffer: Uint8Array;
2144
+ warnings: string[];
2145
+ }>;
2146
+ }
2147
+ declare type PreviewEncodingTask = OutputTaskOptions_2 & {
2148
+ onDiagnostic?: (entry: OutputDiagnostic) => void;
2149
+ };
2113
2150
  export declare function printCalibration(options?: ReportPrintOptions): {
2114
2151
  x: number;
2115
2152
  y: number;
@@ -2462,8 +2499,36 @@ export declare interface ReportEmptyState {
2462
2499
  title?: string;
2463
2500
  description?: string;
2464
2501
  }
2502
+ export declare interface ReportExportDecision {
2503
+ mode: "local" | "worker";
2504
+ reason: ReportExportDecisionReason;
2505
+ /** Lower bounds: traversal stops as soon as isolation is warranted. No font or image hashing. */
2506
+ estimate: {
2507
+ pages: number;
2508
+ cells: number;
2509
+ bytes: number;
2510
+ };
2511
+ hardCancellation: boolean;
2512
+ }
2513
+ declare type ReportExportDecisionReason = "small-task" | "threshold" | "scan-limit" | "explicit-local" | "explicit-worker" | "worker-unavailable" | "worker-start-failed" | "nonserializable-options";
2514
+ export declare interface ReportExportExecutionOptions {
2515
+ mode?: "auto" | "worker" | "local";
2516
+ /** A fresh bundler-managed module Worker for every call; never a shared worker. */
2517
+ workerFactory?: () => BrowserReportWorker;
2518
+ thresholds?: ReportExportThresholds;
2519
+ /** Auto only. Startup unavailability may use local; encoding failures never retry. */
2520
+ fallback?: "local" | "error";
2521
+ timeoutMs?: number;
2522
+ budget?: ReportRuntimeBudget;
2523
+ onDecision?: (decision: ReportExportDecision) => void;
2524
+ }
2465
2525
  /** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
2466
2526
  export declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
2527
+ export declare interface ReportExportThresholds {
2528
+ cells?: number;
2529
+ pages?: number;
2530
+ bytes?: number;
2531
+ }
2467
2532
  declare type ReportExpression = {
2468
2533
  field: string;
2469
2534
  } | {
@@ -2708,11 +2773,22 @@ export declare const ReportParamPanel: DefineComponent<__VLS_Props_3, {
2708
2773
  "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
2709
2774
  }>, {
2710
2775
  disabled: boolean;
2711
- loadOptions: ReportParamOptionsLoader;
2712
2776
  issues: readonly ReportParamIssue[];
2777
+ loadOptions: ReportParamOptionsLoader;
2713
2778
  showActions: boolean;
2714
2779
  showTitle: boolean;
2715
2780
  }>;
2781
+ /** Licensed local font bytes; never downloaded implicitly by the runtime. */
2782
+ declare interface ReportPdfFontOptions {
2783
+ customFontBytes?: Uint8Array | ArrayBuffer;
2784
+ customFontName?: string;
2785
+ customFontFaces?: {
2786
+ regular: Uint8Array | ArrayBuffer;
2787
+ bold?: Uint8Array | ArrayBuffer;
2788
+ italic?: Uint8Array | ArrayBuffer;
2789
+ boldItalic?: Uint8Array | ArrayBuffer;
2790
+ };
2791
+ }
2716
2792
  export declare interface ReportPreferencesAdapter {
2717
2793
  load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
2718
2794
  save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
@@ -2811,6 +2887,15 @@ declare interface ReportQueryResult {
2811
2887
  diagnostics?: ReportDiagnostic[];
2812
2888
  }
2813
2889
  declare type ReportRegistry = Record<string, ReportDefinition>;
2890
+ declare interface ReportRuntimeBudget {
2891
+ maxRows?: number;
2892
+ maxPages?: number;
2893
+ maxCells?: number;
2894
+ maxOutputBytes?: number;
2895
+ /** Bound the plain JSON snapshot accepted by exportPrepared (default 64 MB). */
2896
+ maxPreparedBytes?: number;
2897
+ maxDurationMs?: number;
2898
+ }
2814
2899
  declare interface ReportSaveInput extends ReportLoadContext {
2815
2900
  requestId: string;
2816
2901
  expectedRevision?: string;
@@ -2928,6 +3013,7 @@ declare type ReportValueState_2 = "missing-source" | "not-applicable" | "not-cal
2928
3013
  export declare function resolveCalculationMessages(messages: Partial<ReportCalculationMessages>): ReportCalculationMessages;
2929
3014
  export declare function resolveConfig(config: MachReportConfig | null | undefined, presetName?: string): ResolvedConfig;
2930
3015
  export declare type ResolvedConfig = Required<Pick<MachReportDefaults, "showExport" | "showPrint" | "showPdfWindow" | "showSettings" | "showParams" | "gapPx">> & {
3016
+ exportExecution?: ReportExportExecutionOptions;
2931
3017
  drill?: ReportDrillOptions;
2932
3018
  loadParamOptions?: ReportParamOptionsLoader;
2933
3019
  pdfFontUrl: string;
@@ -3187,6 +3273,8 @@ export declare function usePrintExport(plan: Ref<RenderPlan | null>, hooks: {
3187
3273
  /** Flush the active editor and await source-backed calculation/persistence before capturing the output plan. */
3188
3274
  beforeOutput?: () => boolean | Promise<boolean>;
3189
3275
  getPdfExporter: () => PdfExporter;
3276
+ /** Optional prepared-plan encoders; legacy callers keep their injected exporter unchanged. */
3277
+ encoding?: PreviewEncoding;
3190
3278
  onError: (message: string, code?: string) => void;
3191
3279
  onWarning?: (message: string) => void;
3192
3280
  onBusy?: (format: string | null) => void;
@@ -74,6 +74,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
74
74
  type: PropType<ReportOutputOptions>;
75
75
  default: undefined;
76
76
  };
77
+ exportExecution: {
78
+ type: PropType<ReportExportExecutionOptions>;
79
+ default: undefined;
80
+ };
77
81
  assets: {
78
82
  type: PropType<AssetRenderOptions>;
79
83
  default: undefined;
@@ -244,6 +248,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
244
248
  type: PropType<ReportOutputOptions>;
245
249
  default: undefined;
246
250
  };
251
+ exportExecution: {
252
+ type: PropType<ReportExportExecutionOptions>;
253
+ default: undefined;
254
+ };
247
255
  assets: {
248
256
  type: PropType<AssetRenderOptions>;
249
257
  default: undefined;
@@ -325,6 +333,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
325
333
  showPdfWindow: boolean;
326
334
  showSettings: boolean;
327
335
  showParams: boolean;
336
+ exportExecution: ReportExportExecutionOptions;
328
337
  drill: ReportDrillOptions;
329
338
  loadParamOptions: ReportParamOptionsLoader;
330
339
  printOptions: ReportPrintOptions;
@@ -496,6 +505,14 @@ declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMedia
496
505
  assetFailure?: "throw" | "placeholder";
497
506
  signal?: AbortSignal;
498
507
  }
508
+ declare interface BrowserReportWorker {
509
+ postMessage(value: unknown, transfer?: Transferable[]): void;
510
+ terminate(): void;
511
+ addEventListener(type: "message", listener: (event: MessageEvent) => void): void;
512
+ addEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
513
+ removeEventListener(type: "message", listener: (event: MessageEvent) => void): void;
514
+ removeEventListener(type: "error" | "messageerror", listener: (event: Event) => void): void;
515
+ }
499
516
  /** 供 HTML/Word 导出的完整文档;打印路径逐页渲染,避免预先生成所有页。 */
500
517
  export declare function buildPrintDocument(p: RenderPlan, options?: ReportPrintOptions): PrintHtmlResult;
501
518
  export declare function buildWordHtml(p: RenderPlan): {
@@ -907,6 +924,8 @@ declare interface FormulaAdapter {
907
924
  }): unknown;
908
925
  }
909
926
  declare interface GridCell {
927
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
928
+ richParagraphs?: RichParagraph[];
910
929
  text?: string;
911
930
  rawText?: string;
912
931
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -930,6 +949,8 @@ declare interface GridCell {
930
949
  style?: ComponentStyle;
931
950
  }
932
951
  declare interface GridCell_2 {
952
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
953
+ richParagraphs?: RichParagraph_2[];
933
954
  text?: string;
934
955
  rawText?: string;
935
956
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -953,6 +974,8 @@ declare interface GridCell_2 {
953
974
  style?: ComponentStyle_2;
954
975
  }
955
976
  declare interface GridCell_3 {
977
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
978
+ richParagraphs?: RichParagraph_3[];
956
979
  text?: string;
957
980
  rawText?: string;
958
981
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -1422,6 +1445,8 @@ export declare interface MachReportController {
1422
1445
  }
1423
1446
  /** defaults 层可配置项(全部可选,均有内置缺省) */
1424
1447
  export declare interface MachReportDefaults {
1448
+ /** Small encodes stay local; optional Worker isolation uses the same prepared plan for large output. */
1449
+ exportExecution?: ReportExportExecutionOptions;
1425
1450
  drill?: ReportDrillOptions;
1426
1451
  loadParamOptions?: ReportParamOptionsLoader;
1427
1452
  printOptions?: ReportPrintOptions;
@@ -1909,6 +1934,8 @@ export declare interface PdfExporter {
1909
1934
  }): Promise<Uint8Array>;
1910
1935
  /** 可选轻量字体检查;旧版自定义导出函数无需实现。取消时拒绝 AbortError。 */
1911
1936
  checkFont?: (signal?: AbortSignal) => Promise<PdfFontCheckResult>;
1937
+ /** Optional resource preparation for isolated encoding; custom exporters without it keep their own pipeline. */
1938
+ prepare?: (signal?: AbortSignal) => Promise<ReportPdfFontOptions>;
1912
1939
  }
1913
1940
  export declare interface PdfFontCheckResult {
1914
1941
  status: PdfFontStatus;
@@ -2110,6 +2137,16 @@ declare interface PlanTableFragment_3 {
2110
2137
  }
2111
2138
  /** Bounded concurrency, one stage timeout, and cancellation even for a hanging decoder. */
2112
2139
  export declare function preparePrintResources(doc: Document, options?: ReportPrintOptions, signal?: AbortSignal, base?: string): Promise<void>;
2140
+ declare interface PreviewEncoding {
2141
+ pdf(plan: RenderPlan, exporter: PdfExporter, warning: (message: string) => void, task?: PreviewEncodingTask): Promise<Uint8Array>;
2142
+ xlsx(plan: RenderPlan, options: XlsxRenderOptions, task: PreviewEncodingTask): Promise<{
2143
+ buffer: Uint8Array;
2144
+ warnings: string[];
2145
+ }>;
2146
+ }
2147
+ declare type PreviewEncodingTask = OutputTaskOptions_2 & {
2148
+ onDiagnostic?: (entry: OutputDiagnostic) => void;
2149
+ };
2113
2150
  export declare function printCalibration(options?: ReportPrintOptions): {
2114
2151
  x: number;
2115
2152
  y: number;
@@ -2462,8 +2499,36 @@ export declare interface ReportEmptyState {
2462
2499
  title?: string;
2463
2500
  description?: string;
2464
2501
  }
2502
+ export declare interface ReportExportDecision {
2503
+ mode: "local" | "worker";
2504
+ reason: ReportExportDecisionReason;
2505
+ /** Lower bounds: traversal stops as soon as isolation is warranted. No font or image hashing. */
2506
+ estimate: {
2507
+ pages: number;
2508
+ cells: number;
2509
+ bytes: number;
2510
+ };
2511
+ hardCancellation: boolean;
2512
+ }
2513
+ declare type ReportExportDecisionReason = "small-task" | "threshold" | "scan-limit" | "explicit-local" | "explicit-worker" | "worker-unavailable" | "worker-start-failed" | "nonserializable-options";
2514
+ export declare interface ReportExportExecutionOptions {
2515
+ mode?: "auto" | "worker" | "local";
2516
+ /** A fresh bundler-managed module Worker for every call; never a shared worker. */
2517
+ workerFactory?: () => BrowserReportWorker;
2518
+ thresholds?: ReportExportThresholds;
2519
+ /** Auto only. Startup unavailability may use local; encoding failures never retry. */
2520
+ fallback?: "local" | "error";
2521
+ timeoutMs?: number;
2522
+ budget?: ReportRuntimeBudget;
2523
+ onDecision?: (decision: ReportExportDecision) => void;
2524
+ }
2465
2525
  /** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
2466
2526
  export declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
2527
+ export declare interface ReportExportThresholds {
2528
+ cells?: number;
2529
+ pages?: number;
2530
+ bytes?: number;
2531
+ }
2467
2532
  declare type ReportExpression = {
2468
2533
  field: string;
2469
2534
  } | {
@@ -2708,11 +2773,22 @@ export declare const ReportParamPanel: DefineComponent<__VLS_Props_3, {
2708
2773
  "onUpdate:modelValue"?: ((value: Record<string, string>) => any) | undefined;
2709
2774
  }>, {
2710
2775
  disabled: boolean;
2711
- loadOptions: ReportParamOptionsLoader;
2712
2776
  issues: readonly ReportParamIssue[];
2777
+ loadOptions: ReportParamOptionsLoader;
2713
2778
  showActions: boolean;
2714
2779
  showTitle: boolean;
2715
2780
  }>;
2781
+ /** Licensed local font bytes; never downloaded implicitly by the runtime. */
2782
+ declare interface ReportPdfFontOptions {
2783
+ customFontBytes?: Uint8Array | ArrayBuffer;
2784
+ customFontName?: string;
2785
+ customFontFaces?: {
2786
+ regular: Uint8Array | ArrayBuffer;
2787
+ bold?: Uint8Array | ArrayBuffer;
2788
+ italic?: Uint8Array | ArrayBuffer;
2789
+ boldItalic?: Uint8Array | ArrayBuffer;
2790
+ };
2791
+ }
2716
2792
  export declare interface ReportPreferencesAdapter {
2717
2793
  load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
2718
2794
  save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
@@ -2811,6 +2887,15 @@ declare interface ReportQueryResult {
2811
2887
  diagnostics?: ReportDiagnostic[];
2812
2888
  }
2813
2889
  declare type ReportRegistry = Record<string, ReportDefinition>;
2890
+ declare interface ReportRuntimeBudget {
2891
+ maxRows?: number;
2892
+ maxPages?: number;
2893
+ maxCells?: number;
2894
+ maxOutputBytes?: number;
2895
+ /** Bound the plain JSON snapshot accepted by exportPrepared (default 64 MB). */
2896
+ maxPreparedBytes?: number;
2897
+ maxDurationMs?: number;
2898
+ }
2814
2899
  declare interface ReportSaveInput extends ReportLoadContext {
2815
2900
  requestId: string;
2816
2901
  expectedRevision?: string;
@@ -2928,6 +3013,7 @@ declare type ReportValueState_2 = "missing-source" | "not-applicable" | "not-cal
2928
3013
  export declare function resolveCalculationMessages(messages: Partial<ReportCalculationMessages>): ReportCalculationMessages;
2929
3014
  export declare function resolveConfig(config: MachReportConfig | null | undefined, presetName?: string): ResolvedConfig;
2930
3015
  export declare type ResolvedConfig = Required<Pick<MachReportDefaults, "showExport" | "showPrint" | "showPdfWindow" | "showSettings" | "showParams" | "gapPx">> & {
3016
+ exportExecution?: ReportExportExecutionOptions;
2931
3017
  drill?: ReportDrillOptions;
2932
3018
  loadParamOptions?: ReportParamOptionsLoader;
2933
3019
  pdfFontUrl: string;
@@ -3187,6 +3273,8 @@ export declare function usePrintExport(plan: Ref<RenderPlan | null>, hooks: {
3187
3273
  /** Flush the active editor and await source-backed calculation/persistence before capturing the output plan. */
3188
3274
  beforeOutput?: () => boolean | Promise<boolean>;
3189
3275
  getPdfExporter: () => PdfExporter;
3276
+ /** Optional prepared-plan encoders; legacy callers keep their injected exporter unchanged. */
3277
+ encoding?: PreviewEncoding;
3190
3278
  onError: (message: string, code?: string) => void;
3191
3279
  onWarning?: (message: string) => void;
3192
3280
  onBusy?: (format: string | null) => void;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-DHO7X8z2.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-DbLvvOUT.cjs")).then(e=>e.ReportPreview$1)}const t={install(e,o={}){r.machReportPlugin.install(e,o)}};exports.MachReportPreview=r.MachReportPreview;exports.default=t;exports.machReportAsyncPlugin=t;exports.preloadMachReport=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-Dr39GBRG.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-Bk9nLfO9.cjs")).then(e=>e.ReportPreview$1)}const t={install(e,o={}){r.machReportPlugin.install(e,o)}};exports.MachReportPreview=r.MachReportPreview;exports.default=t;exports.machReportAsyncPlugin=t;exports.preloadMachReport=i;