@agile-team/mach-report 2.22.0 → 2.23.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 (171) hide show
  1. package/README.md +8 -6
  2. package/dist/ExcelBindingWizard-BrTmdo7f.cjs +1 -0
  3. package/dist/ExcelBindingWizard-CcDMLO8Q.js +1486 -0
  4. package/dist/ParamEditor-BGjovFUe.js +737 -0
  5. package/dist/ParamEditor-CeNp4_zQ.cjs +1 -0
  6. package/dist/ReportBatchPanel-CHxBtG9R.cjs +1 -0
  7. package/dist/ReportBatchPanel-CJB67WNd.js +351 -0
  8. package/dist/ReportLabelStudio-Tplc1TLJ.js +784 -0
  9. package/dist/ReportLabelStudio-g8PkqJWn.cjs +1 -0
  10. package/dist/ReportParamPanel-C7fZTllk.cjs +1 -0
  11. package/dist/{ReportParamPanel-BHSKVL8k.js → ReportParamPanel-GI43aGa0.js} +146 -127
  12. package/dist/ReportPreview-BoGBGyRr.cjs +6 -0
  13. package/dist/ReportPreview-QLONCyci.js +6257 -0
  14. package/dist/ReportTemplateLibrary-BFQIX0sg.cjs +1 -0
  15. package/dist/ReportTemplateLibrary-KqX4E2sN.js +312 -0
  16. package/dist/RuleEditor-BZUP9yvL.cjs +1 -0
  17. package/dist/RuleEditor-OPX1awrH.js +2342 -0
  18. package/dist/TemplateOutlinePanel-CVYKVLv_.cjs +1 -0
  19. package/dist/TemplateOutlinePanel-DQS-eOs6.js +97 -0
  20. package/dist/TemplateReusePanel-CY6O93Zk.cjs +1 -0
  21. package/dist/TemplateReusePanel-DKXiFTyB.js +389 -0
  22. package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +1 -0
  23. package/dist/TemplateReviewPanel-Dijwm9YE.js +593 -0
  24. package/dist/analytics.cjs +1 -1
  25. package/dist/analytics.js +26 -26
  26. package/dist/artifact-integrity.json +106 -104
  27. package/dist/assets-D2gHc4Mz.cjs +1 -0
  28. package/dist/assets-T_gDeFaz.js +132 -0
  29. package/dist/auto-BB99S802.js +257 -0
  30. package/dist/auto-BrPWo7Xm.cjs +1 -0
  31. package/dist/capabilities-DiBj4Qgl.cjs +1 -0
  32. package/dist/capabilities-pg7j7VLT.js +106 -0
  33. package/dist/charts-Cjw5AYkg.cjs +1 -0
  34. package/dist/{charts-Dlv8j2AG.js → charts-CxJZ0XaY.js} +1 -1
  35. package/dist/computed-DK6BruFz.cjs +1 -0
  36. package/dist/{computed-C8NRZQss.js → computed-f3pOqWLX.js} +381 -301
  37. package/dist/data-bar-CeZuFmYl.cjs +1 -0
  38. package/dist/{data-bar-8baGYEZ9.js → data-bar-IkI6VvMQ.js} +1 -1
  39. package/dist/designer-BZoVWTgl.js +7172 -0
  40. package/dist/designer-zS2uKJmY.cjs +2 -0
  41. package/dist/designer.cjs +1 -1
  42. package/dist/designer.d.cts +105 -45
  43. package/dist/designer.d.ts +105 -45
  44. package/dist/designer.js +4 -4
  45. package/dist/dom-ChE5D-L-.cjs +1 -0
  46. package/dist/dom-JWrchIre.js +452 -0
  47. package/dist/dom-cell-address-DLD1mkTB.cjs +1 -0
  48. package/dist/dom-cell-address-Fn-8nk7D.js +11 -0
  49. package/dist/{encoding-ncQAvyOv.cjs → encoding-7lquyj0w.cjs} +1 -1
  50. package/dist/{encoding-DbnhbwI8.js → encoding-CEd-dq9A.js} +2 -2
  51. package/dist/{font-loader-Di0lQKFf.js → font-loader-CNWXomuV.js} +1 -1
  52. package/dist/{font-loader-BB372_XN.cjs → font-loader-D8pI87fL.cjs} +1 -1
  53. package/dist/grid-strokes-Be24LGuV.cjs +1 -0
  54. package/dist/grid-strokes-EoY66L2f.js +53 -0
  55. package/dist/index.cjs +8 -8
  56. package/dist/index.d.cts +6 -1
  57. package/dist/index.d.ts +6 -1
  58. package/dist/index.js +944 -1259
  59. package/dist/{json-snapshot-DvQbZlD7.js → json-snapshot-BRnzKudk.js} +763 -776
  60. package/dist/json-snapshot-DNiIbpOr.cjs +2 -0
  61. package/dist/matrix-B8QWbsGM.cjs +1 -0
  62. package/dist/matrix-C6e_r_vp.js +302 -0
  63. package/dist/{pdf-DmlnL5eB.js → pdf-CJToa81Z.js} +20 -20
  64. package/dist/{pdf-CARdBcuw.cjs → pdf-DpMkW72B.cjs} +42 -42
  65. package/dist/pdf.cjs +1 -1
  66. package/dist/pdf.js +2 -2
  67. package/dist/{plugin-AcAQ2m9X.cjs → plugin-BWTp-X7b.cjs} +1 -1
  68. package/dist/{plugin-w5Nyt08U.js → plugin-_BkUVc2z.js} +1 -1
  69. package/dist/{prefill-BXBxx5We.js → prefill-CWGdnqQd.js} +21 -21
  70. package/dist/prefill-PaAy6wLk.cjs +1 -0
  71. package/dist/prepared-CJy_qk7d.js +94 -0
  72. package/dist/prepared-D0yCSxSO.cjs +1 -0
  73. package/dist/progress-ByiOxUD3.js +250 -0
  74. package/dist/progress-WomPRP3B.cjs +1 -0
  75. package/dist/{protocol-fjaeKkjf.js → protocol-BG16rz6D.js} +3 -3
  76. package/dist/{protocol-C9ZaylID.cjs → protocol-wzhl1Fim.cjs} +1 -1
  77. package/dist/record-bindings-DatJZv_e.js +200 -0
  78. package/dist/record-bindings-MBxbeBsi.cjs +1 -0
  79. package/dist/{region-binding-workflow-aA8nxmkZ.js → region-binding-workflow-DjrXuR1q.js} +2 -2
  80. package/dist/{region-binding-workflow-BiJQ7NU6.cjs → region-binding-workflow-l7NGfagJ.cjs} +2 -2
  81. package/dist/report-encoding-worker.cjs +1 -1
  82. package/dist/report-encoding-worker.js +1 -1
  83. package/dist/rich-text-layout-Ciwa6D2o.js +52 -0
  84. package/dist/rich-text-layout-DK7A_a5r.cjs +3 -0
  85. package/dist/runtime-DYMOS_gz.cjs +1 -0
  86. package/dist/{runtime-BTtpjF3D.js → runtime-PiCax9zQ.js} +52 -51
  87. package/dist/sbom.cdx.json +1 -1
  88. package/dist/server-node.cjs +5 -5
  89. package/dist/server-node.js +1676 -1619
  90. package/dist/server.cjs +1 -1
  91. package/dist/server.js +24 -24
  92. package/dist/style.css +1 -1
  93. package/dist/{template-catalog-JSxSqk5y.js → template-catalog-CRuZL3pi.js} +17 -17
  94. package/dist/template-catalog-DtrtT1FY.cjs +1 -0
  95. package/dist/{template-fragments-D2JFj7Du.js → template-fragments-CPpGpQoz.js} +12 -12
  96. package/dist/template-fragments-GVjpew_q.cjs +1 -0
  97. package/dist/template-registry-DI59PXVK.cjs +1 -0
  98. package/dist/{template-registry-Do1Uav2Z.js → template-registry-O0hNIOfB.js} +17 -17
  99. package/dist/{template-serialization-CU4n_Miu.js → template-serialization-CWmHq7lX.js} +1 -1
  100. package/dist/{template-serialization-CgqBo6s-.cjs → template-serialization-CqQY4zDg.cjs} +1 -1
  101. package/dist/textwrap-D4ZksyMK.js +111 -0
  102. package/dist/textwrap-DEHqAjKZ.cjs +4 -0
  103. package/dist/vue/async.d.cts +31 -0
  104. package/dist/vue/async.d.ts +31 -0
  105. package/dist/vue/index.d.cts +32 -1
  106. package/dist/vue/index.d.ts +32 -1
  107. package/dist/vue-async.cjs +1 -1
  108. package/dist/vue-async.js +3 -3
  109. package/dist/vue.cjs +1 -1
  110. package/dist/vue.js +52 -47
  111. package/dist/{workbook-session-BvEBRRMz.cjs → workbook-session-C6-SrnCT.cjs} +4 -4
  112. package/dist/{workbook-session-f0wVlzst.js → workbook-session-C9ZmCBwY.js} +15 -16
  113. package/dist/worker.cjs +1 -1
  114. package/dist/worker.js +4 -4
  115. package/dist/xlsx.cjs +4 -4
  116. package/dist/xlsx.js +184 -179
  117. package/package.json +1 -1
  118. package/dist/ExcelBindingWizard-CW79I6Gl.cjs +0 -1
  119. package/dist/ExcelBindingWizard-CZyppD7I.js +0 -1485
  120. package/dist/ParamEditor-CiYCJI0b.cjs +0 -1
  121. package/dist/ParamEditor-DQit-Gdf.js +0 -732
  122. package/dist/ReportBatchPanel-DKTpV7MU.js +0 -350
  123. package/dist/ReportBatchPanel-Db6TAfG5.cjs +0 -1
  124. package/dist/ReportLabelStudio-B0i9ohQj.cjs +0 -1
  125. package/dist/ReportLabelStudio-BYnRqmje.js +0 -780
  126. package/dist/ReportParamPanel-lngONOEz.cjs +0 -1
  127. package/dist/ReportPreview-BDgKssYR.js +0 -5887
  128. package/dist/ReportPreview-Dw-4icG6.cjs +0 -6
  129. package/dist/ReportTemplateLibrary-BZuKn0YK.js +0 -311
  130. package/dist/ReportTemplateLibrary-DEXH07ND.cjs +0 -1
  131. package/dist/RuleEditor-CIQn547x.js +0 -2341
  132. package/dist/RuleEditor-zSUmPjKa.cjs +0 -1
  133. package/dist/TemplateOutlinePanel-B5SfGYVN.cjs +0 -1
  134. package/dist/TemplateOutlinePanel-D0PgOSQE.js +0 -96
  135. package/dist/TemplateReusePanel-BKlAEF8-.js +0 -388
  136. package/dist/TemplateReusePanel-DAy_Hwqz.cjs +0 -1
  137. package/dist/TemplateReviewPanel-CowmHaQQ.cjs +0 -1
  138. package/dist/TemplateReviewPanel-div-EH_m.js +0 -592
  139. package/dist/assets-CxHunY_9.js +0 -232
  140. package/dist/assets-vbjAGgk8.cjs +0 -1
  141. package/dist/auto-DcUHlKob.cjs +0 -1
  142. package/dist/auto-moShblh1.js +0 -240
  143. package/dist/charts-aCtoswXq.cjs +0 -1
  144. package/dist/component-tree-1_QCiQJX.js +0 -67
  145. package/dist/component-tree-BjZIp6w9.cjs +0 -1
  146. package/dist/computed-4TnxzgIh.cjs +0 -1
  147. package/dist/data-bar-YltqGTaC.cjs +0 -1
  148. package/dist/designer-B7jJeAeG.js +0 -6914
  149. package/dist/designer-BWQVpJeN.cjs +0 -2
  150. package/dist/grid-geometry-D3SJgWFv.js +0 -136
  151. package/dist/grid-geometry-D8ReblRV.cjs +0 -1
  152. package/dist/json-snapshot-nyV63AbB.cjs +0 -2
  153. package/dist/matrix-0hywp0-F.cjs +0 -1
  154. package/dist/matrix-Dy-tyY7E.js +0 -381
  155. package/dist/prefill-DUvejVt1.cjs +0 -1
  156. package/dist/prepared-YXy-fVLw.cjs +0 -1
  157. package/dist/prepared-rXCKqdHY.js +0 -88
  158. package/dist/progress-B0ctFpKf.cjs +0 -1
  159. package/dist/progress-Hc2vxoCs.js +0 -52
  160. package/dist/record-bindings-Ct1HkPrc.cjs +0 -1
  161. package/dist/record-bindings-VZGS-Qd8.js +0 -155
  162. package/dist/rich-text-layout-K48VHUoW.cjs +0 -3
  163. package/dist/rich-text-layout-wxBhnAS7.js +0 -102
  164. package/dist/runtime-Dq0LUsyS.cjs +0 -1
  165. package/dist/template-catalog-CLAM4w7H.cjs +0 -1
  166. package/dist/template-fragments-Ca25Jt7e.cjs +0 -1
  167. package/dist/template-outline-CDWXptuj.js +0 -88
  168. package/dist/template-outline-K4jGhATu.cjs +0 -1
  169. package/dist/template-registry-CWnuGqyP.cjs +0 -1
  170. package/dist/textwrap-CkGjRFT3.js +0 -110
  171. package/dist/textwrap-OTOUMr4f.cjs +0 -4
@@ -1,17 +1,18 @@
1
- import { R as y, Q as R, S as W, T as B, J as O, q as X, L as z, U as G, c as H, P as K, b as Y, r as Z } from "./json-snapshot-DvQbZlD7.js";
1
+ import { R as y, N as R, O as W, P as I, H as T, n as X, J as z, Q as G, o as H } from "./json-snapshot-BRnzKudk.js";
2
2
  import { g as M } from "./report-params-D9tBuM9B.js";
3
- import { l as $, r as ee, R as te } from "./param-validation-CnDEd2l-.js";
4
- import { t as P, b as w, D as se, v as ae, c as D, R as F } from "./sha256-BDQ1Qk7A.js";
5
- import { b as re } from "./template-registry-Do1Uav2Z.js";
6
- import { T as oe } from "./template-serialization-CU4n_Miu.js";
7
- import { a as j } from "./assets-CxHunY_9.js";
8
- import { s as S, a as J, d as ne, e as ce, r as ie } from "./prepared-rXCKqdHY.js";
9
- function k(e = []) {
3
+ import { l as $, r as K, R as Y } from "./param-validation-CnDEd2l-.js";
4
+ import { t as P, b as w, D as Z, v as ee, c as D, R as F } from "./sha256-BDQ1Qk7A.js";
5
+ import { b as te } from "./template-registry-O0hNIOfB.js";
6
+ import { T as se } from "./template-serialization-CWmHq7lX.js";
7
+ import { r as j } from "./assets-T_gDeFaz.js";
8
+ import { b as ae, s as S, a as J, e as re, f as oe, r as ne } from "./prepared-CJy_qk7d.js";
9
+ import { f as ce, P as ie, e as de } from "./record-bindings-DatJZv_e.js";
10
+ function O(e = []) {
10
11
  return e.map(({ code: t, message: r, severity: n, pageIndex: s, componentIndex: a }) => ({ code: t, message: r, severity: n, path: a < 0 ? `$.pages.${s}` : `$.pages.${s}.components.${a}` }));
11
12
  }
12
13
  async function _(e, t, r = Date.now()) {
13
14
  const n = e.prepared;
14
- if (e.fidelity === "strict" && n.diagnostics.some((g) => g.code === "asset-render-failed" || g.code === "asset-budget-exceeded")) throw new y("validate", "严格输出拒绝已有资产渲染降级,请修复组件后重新准备报表。");
15
+ if (ae(e, t), e.fidelity === "strict" && n.diagnostics.some((g) => g.code === "asset-render-failed" || g.code === "asset-budget-exceeded")) throw new y("validate", "严格输出拒绝已有资产渲染降级,请修复组件后重新准备报表。");
15
16
  const s = e.format === "pdf" ? await import("@agile-team/mach-report/pdf") : void 0;
16
17
  P(e.signal);
17
18
  const a = e.pdf?.customFontFaces ?? (e.pdf?.customFontBytes ? { regular: e.pdf.customFontBytes } : void 0), l = s && a ? s.createFontBytesMeasurer(a) : void 0, m = R(e), p = await m.run("encode", async () => {
@@ -19,12 +20,12 @@ async function _(e, t, r = Date.now()) {
19
20
  if (e.format === "pdf") {
20
21
  P(e.signal);
21
22
  const c = await s.renderPlanToPdf(n.plan, { ...e.pdf, ...l ? { measurer: l } : {}, fidelity: e.fidelity, signal: e.signal, onProgress: (f, i) => m.progress("encode", f, i) });
22
- g = c.bytes, n.diagnostics.push(...k(c.diagnostics)), n.diagnostics.push(...c.fidelityWarnings.map((f) => ({ code: "pdf-fidelity", message: f, severity: "warning" })), ...c.pageErrors.map((f) => ({ code: "pdf-page", message: f, severity: "error" }))), c.unsupportedTextCount && n.diagnostics.push({ code: "pdf-font", message: `${c.unsupportedTextCount} 段文本包含当前字体不支持的字符`, severity: "warning" });
23
+ g = c.bytes, n.diagnostics.push(...O(c.diagnostics)), n.diagnostics.push(...c.fidelityWarnings.map((f) => ({ code: "pdf-fidelity", message: f, severity: "warning" })), ...c.pageErrors.map((f) => ({ code: "pdf-page", message: f, severity: "error" }))), c.unsupportedTextCount && n.diagnostics.push({ code: "pdf-font", message: `${c.unsupportedTextCount} 段文本包含当前字体不支持的字符`, severity: "warning" });
23
24
  } else {
24
25
  const { renderPlanToXlsx: c } = await import("@agile-team/mach-report/xlsx");
25
26
  P(e.signal);
26
27
  const f = await c(n.plan, { ...e.xlsx, fidelity: e.fidelity, signal: e.signal, onProgress: (i, v) => m.progress("encode", i, v) });
27
- g = new Uint8Array(f.buffer), n.diagnostics.push(...k(f.diagnostics)), n.diagnostics.push(...f.warnings.map((i) => ({ code: "xlsx-fidelity", message: i, severity: "warning" }))), n.diagnostics.push(...(f.notes ?? []).map((i) => ({ code: "xlsx-snapshot", message: i, severity: "info" })));
28
+ g = new Uint8Array(f.buffer), n.diagnostics.push(...O(f.diagnostics)), n.diagnostics.push(...f.warnings.map((i) => ({ code: "xlsx-fidelity", message: i, severity: "warning" }))), n.diagnostics.push(...(f.notes ?? []).map((i) => ({ code: "xlsx-snapshot", message: i, severity: "info" })));
28
29
  }
29
30
  return P(e.signal), g;
30
31
  });
@@ -32,29 +33,29 @@ async function _(e, t, r = Date.now()) {
32
33
  const { plan: o, ...x } = n;
33
34
  return { ...x, bytes: p, format: e.format, contentType: e.format === "pdf" ? "application/pdf" : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", stats: { ...x.stats, durationMs: Date.now() - r, outputBytes: p.byteLength } };
34
35
  }
35
- function q(e) {
36
+ function N(e) {
36
37
  return { ...e, reportIds: [...e.reportIds], ...e.params ? { params: { ...e.params } } : {} };
37
38
  }
38
- function V(e, t) {
39
+ function A(e, t) {
39
40
  if (t.length === 0) throw new y("config", "缺少报表 ID");
40
41
  return t.map((r) => {
41
42
  if (!Object.prototype.hasOwnProperty.call(e, r)) throw new y("config", `未注册报表 ${r}`);
42
43
  return e[r];
43
44
  });
44
45
  }
45
- function I(e) {
46
- return e.grid?.cells.reduce((t, r) => t + r.reduce((n, s) => n + (s ? 1 + (s.children?.reduce((a, l) => a + I(l), 0) ?? 0) : 0), 0), 0) ?? 0;
46
+ function k(e) {
47
+ return e.grid?.cells.reduce((t, r) => t + r.reduce((n, s) => n + (s ? 1 + (s.children?.reduce((a, l) => a + k(l), 0) ?? 0) : 0), 0), 0) ?? 0;
47
48
  }
48
- function de(e, t, r) {
49
- return e.pages.reduce((n, s) => n + s.components.reduce((a, l) => l.kind !== "list" ? a + I(l) : a + Z(l, t, r), 0), 0);
49
+ function pe(e, t, r) {
50
+ return e.pages.reduce((n, s) => n + s.components.reduce((a, l) => l.kind !== "list" ? a + k(l) : a + H(l, t, r), 0), 0);
50
51
  }
51
- function pe(e, t = Object.keys(e)) {
52
- return V(e, t).map((r, n) => {
52
+ function le(e, t = Object.keys(e)) {
53
+ return A(e, t).map((r, n) => {
53
54
  const s = t[n], a = M(e, [s]);
54
55
  return {
55
56
  id: s,
56
57
  params: JSON.parse(JSON.stringify(a)),
57
- paramsSchema: ee(a),
58
+ paramsSchema: K(a),
58
59
  datasetsSchema: Object.fromEntries(Object.entries(r.dataSchema ?? {}).map(([l, m]) => [l, W(typeof r.template == "function" ? void 0 : r.template, l, m)])),
59
60
  capabilities: {
60
61
  save: !!r.provider?.save,
@@ -64,24 +65,24 @@ function pe(e, t = Object.keys(e)) {
64
65
  };
65
66
  });
66
67
  }
67
- function A(e, t) {
68
- V(e, t.reportIds);
68
+ function U(e, t) {
69
+ A(e, t.reportIds);
69
70
  const r = $(M(e, t.reportIds), t.params), n = t.reportIds.flatMap((a) => $(M(e, [a]), t.params).issues), s = new Map(n.map((a) => [JSON.stringify(a), a]));
70
71
  return { ...r, ok: s.size === 0, issues: [...s.values()] };
71
72
  }
72
- function N(e, t) {
73
- const r = re(e.plan);
73
+ function V(e, t) {
74
+ const r = te(e.plan);
74
75
  if (!r.ok) throw new y("validate", `执行器返回无效计划:${r.errors[0]?.path}`);
75
- const n = e.plan.pages.length, s = e.plan.pages.reduce((a, l) => a + l.components.reduce((m, p) => m + I(p), 0), 0);
76
+ const n = e.plan.pages.length, s = e.plan.pages.reduce((a, l) => a + l.components.reduce((m, p) => m + k(p), 0), 0);
76
77
  return w(t, "maxRows", e.stats.rows), w(t, "maxPages", n), w(t, "maxCells", s), { ...e, stats: { ...e.stats, pages: n, cells: s } };
77
78
  }
78
- function U(e, t) {
79
- const r = A(e.reports, t);
80
- if (!r.ok) throw new te(r.issues);
79
+ function q(e, t) {
80
+ const r = U(e.reports, t);
81
+ if (!r.ok) throw new Y(r.issues);
81
82
  }
82
- function ve(e) {
83
- const t = { ...se, ...e.budget };
84
- ae(t);
83
+ function be(e) {
84
+ const t = { ...Z, ...e.budget };
85
+ ee(t);
85
86
  const r = async (s, a) => {
86
87
  const l = Date.now();
87
88
  let m = 0, p = 0;
@@ -97,9 +98,9 @@ function ve(e) {
97
98
  try {
98
99
  m += z(h, u, { maxRows: t.maxRows, signal: s.signal });
99
100
  } catch (b) {
100
- throw b instanceof oe ? new F("budget", b.message, "$.budget.maxRows") : b;
101
+ throw b instanceof se ? new F("budget", b.message, "$.budget.maxRows") : b;
101
102
  }
102
- w(t, "maxRows", m), p += de(h, u, c[d]?.pagination), w(t, "maxCells", p);
103
+ w(t, "maxRows", m), p += pe(h, u, c[d]?.pagination), w(t, "maxCells", p);
103
104
  } })({ ...s, params: s.params ?? {}, onWarning: (d) => o.push({ code: "layout", message: d, severity: "warning" }), onQueryResult: (d, u, h = 0) => {
104
105
  const b = G(h, d);
105
106
  Object.defineProperty(x, d, { value: { revision: u.revision, sourceToken: u.sourceToken }, enumerable: !0, writable: !0 }), g.push({ reportId: d, reportIndex: h, reportScope: b, ...u.revision === void 0 ? {} : { revision: u.revision }, ...u.sourceToken === void 0 ? {} : { sourceToken: u.sourceToken } }), o.push(...(u.diagnostics ?? []).map((C) => ({ ...C, ...C.target ? { target: {
@@ -108,15 +109,15 @@ function ve(e) {
108
109
  ...C.target.tableId ? { tableId: JSON.stringify([h, d, C.target.tableId]) } : {}
109
110
  } } : {} })));
110
111
  } }).catch((d) => {
111
- throw d instanceof y && d.cause instanceof H ? new F("budget", d.cause.message, "$.budget.maxPages") : d instanceof y && d.cause instanceof K ? new F("budget", d.cause.message, "$.budget.maxCells") : d instanceof y && d.cause instanceof Y ? new F("budget", d.cause.message, "$.budget.maxChartComponents") : d;
112
+ throw d instanceof y && d.cause instanceof ce ? new F("budget", d.cause.message, "$.budget.maxPages") : d instanceof y && d.cause instanceof ie ? new F("budget", d.cause.message, "$.budget.maxCells") : d instanceof y && d.cause instanceof de ? new F("budget", d.cause.message, "$.budget.maxChartComponents") : d;
112
113
  });
113
114
  P(s.signal);
114
115
  const v = e.assets ? await R(s).run("assets", () => j(i, { ...e.assets, signal: s.signal })) : { plan: i, diagnostics: [] }, E = v.plan;
115
- o.push(...k(v.diagnostics));
116
- const L = E.pages.reduce((d, u) => d + u.components.reduce((h, b) => h + I(b), 0), 0);
116
+ o.push(...O(v.diagnostics));
117
+ const L = E.pages.reduce((d, u) => d + u.components.reduce((h, b) => h + k(b), 0), 0);
117
118
  w(t, "maxPages", E.pages.length), w(t, "maxCells", L);
118
- const T = ie(s.pdf), Q = e.pagination?.measurer || Object.values(e.reports).some((d) => d.pagination?.measurer);
119
- return { plan: E, diagnostics: o, revisions: x, sources: g, layout: { textMetrics: T ? "font-bytes" : Q ? "provided" : "heuristic", ...T ? { fontFingerprint: T } : {} }, stats: { rows: m, pages: E.pages.length, cells: L, durationMs: Date.now() - l } };
119
+ const B = ne(s.pdf), Q = e.pagination?.measurer || Object.values(e.reports).some((d) => d.pagination?.measurer);
120
+ return { plan: E, diagnostics: o, revisions: x, sources: g, layout: { textMetrics: B ? "font-bytes" : Q ? "provided" : "heuristic", ...B ? { fontFingerprint: B } : {} }, stats: { rows: m, pages: E.pages.length, cells: L, durationMs: Date.now() - l } };
120
121
  }, n = async (s) => {
121
122
  const a = Date.now();
122
123
  if (s.format !== "pdf" && s.format !== "xlsx") throw new y("config", "不支持的报表导出格式");
@@ -126,11 +127,11 @@ function ve(e) {
126
127
  return P(s.signal), _({ ...s, prepared: o }, t, a);
127
128
  };
128
129
  return {
129
- describe: (s) => pe(e.reports, s),
130
- validate: (s) => A(e.reports, s),
130
+ describe: (s) => le(e.reports, s),
131
+ validate: (s) => U(e.reports, s),
131
132
  prepare: (s) => D(s.signal, t.maxDurationMs, async (a) => {
132
- const { signal: l, onEvent: m, ...p } = q(s), o = { ...p, ...p.pdf ? { pdf: S(p.pdf) } : {}, taskId: p.taskId ?? B() }, x = m ? (v) => O(m, v, a) : void 0, g = { ...o, signal: a, onEvent: x };
133
- R(g).runSync("validate", () => U(e, o));
133
+ const { signal: l, onEvent: m, ...p } = N(s), o = { ...p, ...p.pdf ? { pdf: S(p.pdf) } : {}, taskId: p.taskId ?? I() }, x = m ? (v) => T(m, v, a) : void 0, g = { ...o, signal: a, onEvent: x };
134
+ R(g).runSync("validate", () => q(e, o));
134
135
  let c;
135
136
  const f = o.pdf?.customFontFaces ?? (o.pdf?.customFontBytes ? { regular: o.pdf.customFontBytes } : void 0);
136
137
  if (!e.executor && f) {
@@ -138,33 +139,33 @@ function ve(e) {
138
139
  P(a), c = v.createFontBytesMeasurer(f);
139
140
  }
140
141
  const i = e.executor ? await e.executor.prepare(o, a, x) : await r(g, c);
141
- return N(i, t);
142
+ return V(i, t);
142
143
  }),
143
144
  exportPrepared: (s) => D(s.signal, t.maxDurationMs, async (a) => {
144
- const l = Date.now(), { signal: m, onEvent: p, ...o } = s, x = N(ne(s.prepared, t.maxPreparedBytes ?? 64e6, a), t), g = { ...o, xlsx: J(o.xlsx), prepared: x, ...o.pdf ? { pdf: S(o.pdf) } : {}, taskId: o.taskId ?? B() };
145
+ const l = Date.now(), { signal: m, onEvent: p, ...o } = s, x = V(re(s.prepared, t.maxPreparedBytes ?? 64e6, a), t), g = { ...o, xlsx: J(o.xlsx), prepared: x, ...o.pdf ? { pdf: S(o.pdf) } : {}, taskId: o.taskId ?? I() };
145
146
  if (g.format !== "pdf" && g.format !== "xlsx") throw new y("config", "不支持的报表导出格式");
146
- const c = p ? (i) => O(p, i, a) : void 0;
147
+ const c = p ? (i) => T(p, i, a) : void 0;
147
148
  if (e.executor) {
148
149
  if (!e.executor.exportPrepared) throw new y("config", "执行器未实现 exportPrepared;请升级执行器或显式使用本地运行时");
149
150
  const i = await e.executor.exportPrepared(g, a, c);
150
151
  return w(t, "maxRows", i.stats.rows), w(t, "maxPages", i.stats.pages), w(t, "maxCells", i.stats.cells), w(t, "maxOutputBytes", i.bytes.byteLength), { ...i, stats: { ...i.stats, outputBytes: i.bytes.byteLength } };
151
152
  }
152
153
  const f = { ...g, signal: a, onEvent: c };
153
- if (R(f).runSync("validate", () => ce(f)), e.assets) {
154
+ if (R(f).runSync("validate", () => oe(f)), e.assets) {
154
155
  const i = await R(f).run("assets", () => j(x.plan, { ...e.assets, signal: a }));
155
- x.plan = i.plan, x.diagnostics.push(...k(i.diagnostics));
156
+ x.plan = i.plan, x.diagnostics.push(...O(i.diagnostics));
156
157
  }
157
158
  return _(f, t, l);
158
159
  }),
159
160
  export: (s) => D(s.signal, t.maxDurationMs, async (a) => {
160
- const { signal: l, onEvent: m, ...p } = q(s), o = { ...p, xlsx: J(p.xlsx), ...p.pdf ? { pdf: S(p.pdf) } : {}, taskId: p.taskId ?? B() }, x = m ? (f) => O(m, f, a) : void 0, g = { ...o, signal: a, onEvent: x };
161
- if (R(g).runSync("validate", () => U(e, o)), o.format !== "pdf" && o.format !== "xlsx") throw new y("config", "不支持的报表导出格式");
161
+ const { signal: l, onEvent: m, ...p } = N(s), o = { ...p, xlsx: J(p.xlsx), ...p.pdf ? { pdf: S(p.pdf) } : {}, taskId: p.taskId ?? I() }, x = m ? (f) => T(m, f, a) : void 0, g = { ...o, signal: a, onEvent: x };
162
+ if (R(g).runSync("validate", () => q(e, o)), o.format !== "pdf" && o.format !== "xlsx") throw new y("config", "不支持的报表导出格式");
162
163
  const c = e.executor ? await e.executor.export(o, a, x) : await n(g);
163
164
  return w(t, "maxRows", c.stats.rows), w(t, "maxPages", c.stats.pages), w(t, "maxCells", c.stats.cells), w(t, "maxOutputBytes", c.bytes.byteLength), { ...c, stats: { ...c.stats, outputBytes: c.bytes.byteLength } };
164
165
  })
165
166
  };
166
167
  }
167
168
  export {
168
- ve as c,
169
- N as e
169
+ be as c,
170
+ V as e
170
171
  };
@@ -6,7 +6,7 @@
6
6
  "component": {
7
7
  "type": "library",
8
8
  "name": "@agile-team/mach-report",
9
- "version": "2.22.0"
9
+ "version": "2.23.1"
10
10
  },
11
11
  "properties": [
12
12
  {