@agile-team/mach-report 2.16.0 → 2.18.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.
- package/README.md +25 -12
- package/dist/{ExcelBindingWizard-CP6h2x1f.cjs → ExcelBindingWizard-Czn3C2yE.cjs} +1 -1
- package/dist/{ExcelBindingWizard-HhB3hAJE.js → ExcelBindingWizard-DMGZj6I6.js} +3 -3
- package/dist/ParamEditor-KzDQvbHY.js +732 -0
- package/dist/ParamEditor-oDfD8LgE.cjs +1 -0
- package/dist/{ReportBatchPanel-ruxcbfY6.js → ReportBatchPanel-BJK7PvZ4.js} +39 -39
- package/dist/ReportBatchPanel-DnmNRssu.cjs +1 -0
- package/dist/ReportParamPanel-mQkeN70Q.js +1020 -0
- package/dist/ReportParamPanel-sOANVRz-.cjs +1 -0
- package/dist/ReportPreview-BxWWTUL5.js +5583 -0
- package/dist/ReportPreview-Yf99omi3.cjs +6 -0
- package/dist/{ReportTemplateLibrary-DcwrH-63.js → ReportTemplateLibrary-BFjB08Wu.js} +1 -1
- package/dist/{ReportTemplateLibrary-BDlNT8JN.cjs → ReportTemplateLibrary-BO42QnWd.cjs} +1 -1
- package/dist/RuleEditor-CqxT1a-W.js +2337 -0
- package/dist/RuleEditor-D7YWigD9.cjs +1 -0
- package/dist/{TemplateOutlinePanel-CGrT5DFN.cjs → TemplateOutlinePanel-B0XX350V.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-SXCjaPKR.js → TemplateOutlinePanel-zG0DrsIB.js} +2 -2
- package/dist/{TemplateReusePanel-6Z3wRFz8.cjs → TemplateReusePanel-BD0HSKp_.cjs} +1 -1
- package/dist/{TemplateReusePanel-lHLOS9Wn.js → TemplateReusePanel-Czwe5GbC.js} +2 -2
- package/dist/{TemplateReviewPanel-Dpk7sLcF.cjs → TemplateReviewPanel-CA5sdffM.cjs} +1 -1
- package/dist/{TemplateReviewPanel-CJ9PLc48.js → TemplateReviewPanel-NhmQI65C.js} +2 -2
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +163 -42
- package/dist/analytics.d.ts +163 -42
- package/dist/analytics.js +76 -141
- package/dist/artifact-integrity.json +110 -108
- package/dist/assets-2eC3mOcV.js +232 -0
- package/dist/assets-B0Hxn4l6.cjs +1 -0
- package/dist/{auto-uVBjX1j5.cjs → auto-B0EZFIK1.cjs} +1 -1
- package/dist/{auto-YR7a4BtF.js → auto-BlchZ1b8.js} +10 -10
- package/dist/{batch-WzDIXJAt.js → batch-DGCt44XM.js} +1 -1
- package/dist/{batch-z6Aw5GEY.cjs → batch-DYcokH4v.cjs} +1 -1
- package/dist/charts-Dlv8j2AG.js +141 -0
- package/dist/charts-aCtoswXq.cjs +1 -0
- package/dist/codes.cjs +9 -9
- package/dist/codes.d.cts +54 -0
- package/dist/codes.d.ts +54 -0
- package/dist/codes.js +12097 -13668
- package/dist/column-visual-BpgQVWwT.js +238 -0
- package/dist/column-visual-CtYxnBCP.cjs +1 -0
- package/dist/component-tree-6TV7W6Yj.cjs +1 -0
- package/dist/component-tree-CvW4lzpv.js +67 -0
- package/dist/computed-4TnxzgIh.cjs +1 -0
- package/dist/computed-C8NRZQss.js +739 -0
- package/dist/data-bar-Ce38juRZ.cjs +1 -0
- package/dist/data-bar-PtjXhMgN.js +9 -0
- package/dist/dataset-DL83majE.js +161 -0
- package/dist/dataset-IrlXbUvh.cjs +1 -0
- package/dist/designer--TKECSEc.cjs +2 -0
- package/dist/designer-d6hJS41w.js +5683 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +835 -45
- package/dist/designer.d.ts +835 -45
- package/dist/designer.js +23 -20
- package/dist/{encoding-BYF9ZTl9.cjs → encoding-B--eZpp1.cjs} +1 -1
- package/dist/{encoding-BOGq4qYL.js → encoding-mctOLocI.js} +2 -2
- package/dist/{font-loader-EKLzOJxf.cjs → font-loader-DBBJ5KE9.cjs} +1 -1
- package/dist/{font-loader-CzI1GuBc.js → font-loader-DW8tIaNp.js} +1 -1
- package/dist/index-CPh6tqge.js +1575 -0
- package/dist/index-CUNw7dL9.cjs +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +534 -16
- package/dist/index.d.ts +534 -16
- package/dist/index.js +1393 -955
- package/dist/json-snapshot-By4ZVVUt.js +1967 -0
- package/dist/json-snapshot-jiXff4lc.cjs +2 -0
- package/dist/matrix-0hywp0-F.cjs +1 -0
- package/dist/matrix-Dy-tyY7E.js +381 -0
- package/dist/param-validation-C-8sRJLq.cjs +1 -0
- package/dist/param-validation-CnDEd2l-.js +333 -0
- package/dist/{pdf-DJ5S6ukC.js → pdf-CKROKygt.js} +1845 -1845
- package/dist/{pdf-ByVCb1i6.cjs → pdf-DqyxJ96U.cjs} +47 -47
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +66 -0
- package/dist/pdf.d.ts +66 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-C2j5_mhx.js → plugin-ByjF2kiV.js} +5 -5
- package/dist/{plugin-Dr39GBRG.cjs → plugin-DM1M2wlI.cjs} +1 -1
- package/dist/prefill-B8H9qwE4.js +371 -0
- package/dist/prefill-D7EswyTI.cjs +1 -0
- package/dist/{prepared-DqtpvRTn.js → prepared-BE-4jfX5.js} +2 -2
- package/dist/{prepared-DdrjLC7L.cjs → prepared-CGVphji3.cjs} +1 -1
- package/dist/{protocol-BzwMP4Vw.cjs → protocol-ByRVzzQG.cjs} +1 -1
- package/dist/{protocol-kt4Iy6-3.js → protocol-Cr81vFSQ.js} +3 -3
- package/dist/{record-bindings-CZWBJ1fU.js → record-bindings-DEJtmo3p.js} +67 -107
- package/dist/record-bindings-ehjnCDHt.cjs +1 -0
- package/dist/{region-binding-workflow-CWNvIjkV.js → region-binding-workflow-CBg0l_tj.js} +2 -2
- package/dist/{region-binding-workflow-CqSMxQ4p.cjs → region-binding-workflow-D05tOYn3.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{report-params-B1RzkhJj.js → report-params-D9tBuM9B.js} +1 -1
- package/dist/{report-params-WDGrA4oP.cjs → report-params-VTg8MoCp.cjs} +1 -1
- package/dist/runtime-CDA6d263.cjs +1 -0
- package/dist/runtime-CEMvybO7.js +170 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +121 -7
- package/dist/server/node.d.ts +121 -7
- package/dist/server-node.cjs +4 -4
- package/dist/server-node.js +3446 -2115
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +417 -29
- package/dist/server.d.ts +417 -29
- package/dist/server.js +787 -544
- package/dist/sha256-BDQ1Qk7A.js +158 -0
- package/dist/sha256-DgZAKXqI.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/template-bindings-Cg5oBLFT.cjs +1 -0
- package/dist/template-bindings-TKnXM7ll.js +62 -0
- package/dist/{template-catalog-BtR2JmCL.js → template-catalog-CmbWOJqy.js} +16 -16
- package/dist/template-catalog-Utu4GP09.cjs +1 -0
- package/dist/{template-fragments-BVsbxs4a.cjs → template-fragments-C_zSHJAa.cjs} +1 -1
- package/dist/{template-fragments-By0aZC1D.js → template-fragments-DWgo9tlZ.js} +2 -2
- package/dist/{template-outline-BwRV_eRo.cjs → template-outline-DWkzZXVC.cjs} +1 -1
- package/dist/{template-outline-cnWfT_LK.js → template-outline-DiADphlq.js} +1 -1
- package/dist/{template-registry-Cw3vRTX2.js → template-registry-BIhIHOab.js} +319 -314
- package/dist/template-registry-DzWswQI5.cjs +1 -0
- package/dist/vue/async.d.cts +636 -35
- package/dist/vue/async.d.ts +636 -35
- package/dist/vue/index.d.cts +746 -67
- package/dist/vue/index.d.ts +746 -67
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +94 -89
- package/dist/{workbook-session-Cbts-22R.cjs → workbook-session-B94EwVa_.cjs} +1 -1
- package/dist/{workbook-session-BeSO8PFB.js → workbook-session-BoScoOg-.js} +2 -2
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +75 -7
- package/dist/worker.d.ts +75 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +208 -15
- package/dist/xlsx.d.ts +208 -15
- package/dist/xlsx.js +288 -252
- package/package.json +1 -1
- package/dist/ParamEditor-CUQLgoxa.cjs +0 -1
- package/dist/ParamEditor-OKesP_nO.js +0 -594
- package/dist/ReportBatchPanel-cZCAMAwH.cjs +0 -1
- package/dist/ReportPreview-BcDKCLiK.js +0 -4834
- package/dist/ReportPreview-Bk9nLfO9.cjs +0 -6
- package/dist/RuleEditor-BX5S8RSF.cjs +0 -1
- package/dist/RuleEditor-CGl9XY2s.js +0 -2037
- package/dist/assets-CqIbfbTr.js +0 -126
- package/dist/assets-e4YSke8n.cjs +0 -1
- package/dist/capabilities-DDwXr_cA.js +0 -103
- package/dist/capabilities-DNLyZdNw.cjs +0 -1
- package/dist/component-tree-Ca6YYfHq.js +0 -61
- package/dist/component-tree-DkGLEfZC.cjs +0 -1
- package/dist/computed-C-4C2S5h.js +0 -521
- package/dist/computed-CGV2a809.cjs +0 -1
- package/dist/config-Dg_o8e7m.cjs +0 -1
- package/dist/config-XQ4qrQ7Q.js +0 -844
- package/dist/dataset-BkRmwgeJ.cjs +0 -1
- package/dist/dataset-H5pFuQGU.js +0 -121
- package/dist/designer-BfQSahxq.js +0 -5163
- package/dist/designer-CPPdeM5_.cjs +0 -2
- package/dist/diagnostic-notification-B9K9We3h.cjs +0 -1
- package/dist/diagnostic-notification-qGAYZdkB.js +0 -7
- package/dist/drill-CsdjgkRM.cjs +0 -1
- package/dist/drill-DIGsZfyB.js +0 -145
- package/dist/json-snapshot-D6ioHth9.js +0 -1702
- package/dist/json-snapshot-DknkjvxP.cjs +0 -2
- package/dist/matrix-CGRGkn5s.js +0 -112
- package/dist/matrix-gEO7ZM_u.cjs +0 -1
- package/dist/param-validation-C3HlcLLO.cjs +0 -1
- package/dist/param-validation-Do7Eg8Zv.js +0 -181
- package/dist/record-bindings-DUX1VMlR.cjs +0 -1
- package/dist/runtime-BjKBI530.js +0 -168
- package/dist/runtime-CBFEPKEs.cjs +0 -1
- package/dist/sha256-BshdOkCC.cjs +0 -1
- package/dist/sha256-DTG-Gq8i.js +0 -157
- package/dist/template-bindings-C2SpvsMU.js +0 -58
- package/dist/template-bindings-CEtWyiLX.cjs +0 -1
- package/dist/template-catalog-C2NLdrwB.cjs +0 -1
- package/dist/template-registry-C62vpv4a.cjs +0 -1
- package/dist/tree-BX380Rr7.cjs +0 -1
- package/dist/tree-CjVZLRw7.js +0 -172
package/dist/assets-CqIbfbTr.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { b as I } from "./component-tree-Ca6YYfHq.js";
|
|
2
|
-
import { n as b } from "./diagnostic-notification-qGAYZdkB.js";
|
|
3
|
-
import { b as w, w as v } from "./progress-Hc2vxoCs.js";
|
|
4
|
-
import { c as E, I as x } from "./media-Y90dHK9z.js";
|
|
5
|
-
class p extends Error {
|
|
6
|
-
constructor(e, r) {
|
|
7
|
-
super(e.message), this.name = "OutputAssetError", this.diagnostic = e, this.cause = r;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
function h(n) {
|
|
11
|
-
if (n.aborted) throw n.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
12
|
-
}
|
|
13
|
-
function A(n) {
|
|
14
|
-
const e = { maxAssets: 1e3, maxImageBytes: 33554432, maxTotalImageBytes: 134217728, maxDurationMs: 3e4, ...n.assetBudget };
|
|
15
|
-
for (const [r, i] of Object.entries(e))
|
|
16
|
-
if (!Number.isSafeInteger(i) || i <= 0 || i > 2147483647) throw new RangeError(`${r} must be a positive safe integer at most 2147483647.`);
|
|
17
|
-
return e;
|
|
18
|
-
}
|
|
19
|
-
function D(n) {
|
|
20
|
-
const e = /^data:image\/[a-z0-9.+-]+(;base64)?,(.*)$/is.exec(n);
|
|
21
|
-
if (!e) throw new TypeError("Asset renderers must return an image data URL.");
|
|
22
|
-
return e[1] ? Math.ceil(e[2].length * 3 / 4) : new TextEncoder().encode(decodeURIComponent(e[2])).byteLength;
|
|
23
|
-
}
|
|
24
|
-
function l(n, e, r, i, s) {
|
|
25
|
-
const t = { code: r, message: i, severity: "warning", format: n.options.format ?? "dom", pageIndex: e.pageIndex, componentIndex: e.componentIndex, componentPath: e.componentPath, kind: e.component.kind, nid: e.component.nid };
|
|
26
|
-
if (n.diagnostics.push(t), b(t, { ...n.options, signal: n.signal }), n.options.assetFailure !== "placeholder") throw new p(t, s);
|
|
27
|
-
}
|
|
28
|
-
async function O(n, e, r) {
|
|
29
|
-
const i = n.options.assetRenderers?.[e.kind];
|
|
30
|
-
if (e.imageData || !i) return e.imageData;
|
|
31
|
-
if (++n.rendered > n.budget.maxAssets) return l(n, r, "asset-budget-exceeded", "Output exceeded the asset count budget.");
|
|
32
|
-
let s;
|
|
33
|
-
try {
|
|
34
|
-
if (n.active = r, s = await v(i({ ...r, signal: n.signal }), n.signal), h(n.signal), s.length > n.budget.maxImageBytes * 4 + 1024) return l(n, r, "asset-budget-exceeded", "Output exceeded the image payload byte budget.");
|
|
35
|
-
const t = D(s);
|
|
36
|
-
if (t > n.budget.maxImageBytes || n.bytes + t > n.budget.maxTotalImageBytes) return l(n, r, "asset-budget-exceeded", "Output exceeded the encoded image byte budget.");
|
|
37
|
-
/^data:image\/(png|jpe?g);base64,/i.test(s) && n.inspectImage(s), n.bytes += t;
|
|
38
|
-
} catch (t) {
|
|
39
|
-
if (n.signal.aborted || t instanceof p || t instanceof x && t.code === "image-budget-exceeded") throw t;
|
|
40
|
-
return l(n, r, "asset-render-failed", `Asset renderer failed for ${e.kind}; output was not silently omitted.`, t);
|
|
41
|
-
}
|
|
42
|
-
return s;
|
|
43
|
-
}
|
|
44
|
-
function M(n, e) {
|
|
45
|
-
const r = n.active;
|
|
46
|
-
if (!r) {
|
|
47
|
-
e.abort(new Error("Asset rendering exceeded maxDurationMs."));
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const i = { code: "asset-budget-exceeded", message: "Asset rendering exceeded maxDurationMs.", severity: "warning", format: n.options.format ?? "dom", pageIndex: r.pageIndex, componentIndex: r.componentIndex, componentPath: r.componentPath, kind: r.component.kind, nid: r.component.nid };
|
|
51
|
-
n.diagnostics.push(i);
|
|
52
|
-
try {
|
|
53
|
-
b(i, { ...n.options, signal: n.signal });
|
|
54
|
-
} catch (s) {
|
|
55
|
-
e.abort(s);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
e.abort(new p(i));
|
|
59
|
-
}
|
|
60
|
-
async function T(n, e, r, i, s) {
|
|
61
|
-
if (!e?.children?.length) return e;
|
|
62
|
-
const t = [];
|
|
63
|
-
for (const [a, d] of e.children.entries())
|
|
64
|
-
t.push(await y(n, d, { ...r, component: d, componentPath: [...i, a] }, s));
|
|
65
|
-
return t.some((a, d) => a !== e.children[d]) ? { ...e, children: t } : e;
|
|
66
|
-
}
|
|
67
|
-
async function y(n, e, r, i) {
|
|
68
|
-
if (h(n.signal), i.has(e)) throw new TypeError("Cyclic grid children cannot be rendered.");
|
|
69
|
-
let s = n.cache.get(e);
|
|
70
|
-
s || (s = O(n, e, r), n.cache.set(e, s));
|
|
71
|
-
const t = await s;
|
|
72
|
-
h(n.signal);
|
|
73
|
-
let a = e.grid;
|
|
74
|
-
if (a) {
|
|
75
|
-
const d = new Set(i).add(e), c = [];
|
|
76
|
-
for (const [g, o] of a.cells.entries()) {
|
|
77
|
-
const u = [];
|
|
78
|
-
for (const [m, f] of o.entries()) u.push(await T(n, f, r, [...r.componentPath, g, m], d));
|
|
79
|
-
c.push(u);
|
|
80
|
-
}
|
|
81
|
-
c.some((g, o) => g.some((u, m) => u !== a.cells[o][m])) && (a = { ...a, cells: c });
|
|
82
|
-
}
|
|
83
|
-
return t !== e.imageData || a !== e.grid ? { ...e, imageData: t, grid: a } : e;
|
|
84
|
-
}
|
|
85
|
-
function k(n, e, r) {
|
|
86
|
-
const i = /* @__PURE__ */ new Set(), s = (t) => {
|
|
87
|
-
if (w(r), !i.has(t)) {
|
|
88
|
-
if (i.add(t), t.imageData && /^data:image\/(png|jpe?g);base64,/i.test(t.imageData))
|
|
89
|
-
try {
|
|
90
|
-
e(t.imageData);
|
|
91
|
-
} catch (a) {
|
|
92
|
-
if (!(a instanceof x) || a.code === "image-budget-exceeded") throw a;
|
|
93
|
-
}
|
|
94
|
-
for (const a of t.grid?.cells ?? []) for (const d of a) for (const c of d?.children ?? []) s(c);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
for (const t of n.pages) for (const a of t.components) s(a);
|
|
98
|
-
}
|
|
99
|
-
async function L(n, e = {}) {
|
|
100
|
-
w(e.signal), I(n);
|
|
101
|
-
const r = A(e), i = E(e);
|
|
102
|
-
if (k(n, i, e.signal), e.signal?.aborted) throw e.signal.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
103
|
-
const s = new AbortController(), t = () => s.abort(e.signal?.reason);
|
|
104
|
-
if (e.signal?.addEventListener("abort", t, { once: !0 }), !e.assetRenderers || !Object.keys(e.assetRenderers).length)
|
|
105
|
-
return e.signal?.removeEventListener("abort", t), { plan: n, diagnostics: [] };
|
|
106
|
-
const a = { options: e, signal: s.signal, diagnostics: [], rendered: 0, bytes: 0, budget: r, cache: /* @__PURE__ */ new WeakMap(), inspectImage: i }, d = setTimeout(() => M(a, s), r.maxDurationMs);
|
|
107
|
-
try {
|
|
108
|
-
const c = [];
|
|
109
|
-
for (const [g, o] of n.pages.entries()) {
|
|
110
|
-
if (g < (e.start ?? 0) || g > (e.end ?? n.pages.length - 1)) {
|
|
111
|
-
c.push(o);
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
const u = [];
|
|
115
|
-
for (const [m, f] of o.components.entries()) u.push(await y(a, f, { component: f, pageIndex: g, componentIndex: m, componentPath: [] }, /* @__PURE__ */ new Set()));
|
|
116
|
-
c.push(u.some((m, f) => m !== o.components[f]) ? { ...o, components: u } : o);
|
|
117
|
-
}
|
|
118
|
-
return h(a.signal), { plan: c.some((g, o) => g !== n.pages[o]) ? { ...n, pages: c } : n, diagnostics: a.diagnostics };
|
|
119
|
-
} finally {
|
|
120
|
-
clearTimeout(d), e.signal?.removeEventListener("abort", t);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
export {
|
|
124
|
-
p as O,
|
|
125
|
-
L as r
|
|
126
|
-
};
|
package/dist/assets-e4YSke8n.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const I=require("./component-tree-DkGLEfZC.cjs"),y=require("./diagnostic-notification-B9K9We3h.cjs"),b=require("./progress-B0ctFpKf.cjs"),w=require("./media-B7vnpD8k.cjs");class p extends Error{constructor(e,r){super(e.message),this.name="OutputAssetError",this.diagnostic=e,this.cause=r}}function h(t){if(t.aborted)throw t.reason??new DOMException("The operation was aborted.","AbortError")}function v(t){const e={maxAssets:1e3,maxImageBytes:33554432,maxTotalImageBytes:134217728,maxDurationMs:3e4,...t.assetBudget};for(const[r,a]of Object.entries(e))if(!Number.isSafeInteger(a)||a<=0||a>2147483647)throw new RangeError(`${r} must be a positive safe integer at most 2147483647.`);return e}function E(t){const e=/^data:image\/[a-z0-9.+-]+(;base64)?,(.*)$/is.exec(t);if(!e)throw new TypeError("Asset renderers must return an image data URL.");return e[1]?Math.ceil(e[2].length*3/4):new TextEncoder().encode(decodeURIComponent(e[2])).byteLength}function l(t,e,r,a,s){const n={code:r,message:a,severity:"warning",format:t.options.format??"dom",pageIndex:e.pageIndex,componentIndex:e.componentIndex,componentPath:e.componentPath,kind:e.component.kind,nid:e.component.nid};if(t.diagnostics.push(n),y.notifyOutputDiagnostic(n,{...t.options,signal:t.signal}),t.options.assetFailure!=="placeholder")throw new p(n,s)}async function A(t,e,r){const a=t.options.assetRenderers?.[e.kind];if(e.imageData||!a)return e.imageData;if(++t.rendered>t.budget.maxAssets)return l(t,r,"asset-budget-exceeded","Output exceeded the asset count budget.");let s;try{if(t.active=r,s=await b.waitForOutput(a({...r,signal:t.signal}),t.signal),h(t.signal),s.length>t.budget.maxImageBytes*4+1024)return l(t,r,"asset-budget-exceeded","Output exceeded the image payload byte budget.");const n=E(s);if(n>t.budget.maxImageBytes||t.bytes+n>t.budget.maxTotalImageBytes)return l(t,r,"asset-budget-exceeded","Output exceeded the encoded image byte budget.");/^data:image\/(png|jpe?g);base64,/i.test(s)&&t.inspectImage(s),t.bytes+=n}catch(n){if(t.signal.aborted||n instanceof p||n instanceof w.ImageMediaError&&n.code==="image-budget-exceeded")throw n;return l(t,r,"asset-render-failed",`Asset renderer failed for ${e.kind}; output was not silently omitted.`,n)}return s}function D(t,e){const r=t.active;if(!r){e.abort(new Error("Asset rendering exceeded maxDurationMs."));return}const a={code:"asset-budget-exceeded",message:"Asset rendering exceeded maxDurationMs.",severity:"warning",format:t.options.format??"dom",pageIndex:r.pageIndex,componentIndex:r.componentIndex,componentPath:r.componentPath,kind:r.component.kind,nid:r.component.nid};t.diagnostics.push(a);try{y.notifyOutputDiagnostic(a,{...t.options,signal:t.signal})}catch(s){e.abort(s);return}e.abort(new p(a))}async function O(t,e,r,a,s){if(!e?.children?.length)return e;const n=[];for(const[i,d]of e.children.entries())n.push(await x(t,d,{...r,component:d,componentPath:[...a,i]},s));return n.some((i,d)=>i!==e.children[d])?{...e,children:n}:e}async function x(t,e,r,a){if(h(t.signal),a.has(e))throw new TypeError("Cyclic grid children cannot be rendered.");let s=t.cache.get(e);s||(s=A(t,e,r),t.cache.set(e,s));const n=await s;h(t.signal);let i=e.grid;if(i){const d=new Set(a).add(e),c=[];for(const[g,o]of i.cells.entries()){const u=[];for(const[m,f]of o.entries())u.push(await O(t,f,r,[...r.componentPath,g,m],d));c.push(u)}c.some((g,o)=>g.some((u,m)=>u!==i.cells[o][m]))&&(i={...i,cells:c})}return n!==e.imageData||i!==e.grid?{...e,imageData:n,grid:i}:e}function M(t,e,r){const a=new Set,s=n=>{if(b.assertOutputActive(r),!a.has(n)){if(a.add(n),n.imageData&&/^data:image\/(png|jpe?g);base64,/i.test(n.imageData))try{e(n.imageData)}catch(i){if(!(i instanceof w.ImageMediaError)||i.code==="image-budget-exceeded")throw i}for(const i of n.grid?.cells??[])for(const d of i)for(const c of d?.children??[])s(c)}};for(const n of t.pages)for(const i of n.components)s(i)}async function T(t,e={}){b.assertOutputActive(e.signal),I.assertBoundedRenderTree(t);const r=v(e),a=w.createImageMediaInspector(e);if(M(t,a,e.signal),e.signal?.aborted)throw e.signal.reason??new DOMException("The operation was aborted.","AbortError");const s=new AbortController,n=()=>s.abort(e.signal?.reason);if(e.signal?.addEventListener("abort",n,{once:!0}),!e.assetRenderers||!Object.keys(e.assetRenderers).length)return e.signal?.removeEventListener("abort",n),{plan:t,diagnostics:[]};const i={options:e,signal:s.signal,diagnostics:[],rendered:0,bytes:0,budget:r,cache:new WeakMap,inspectImage:a},d=setTimeout(()=>D(i,s),r.maxDurationMs);try{const c=[];for(const[g,o]of t.pages.entries()){if(g<(e.start??0)||g>(e.end??t.pages.length-1)){c.push(o);continue}const u=[];for(const[m,f]of o.components.entries())u.push(await x(i,f,{component:f,pageIndex:g,componentIndex:m,componentPath:[]},new Set));c.push(u.some((m,f)=>m!==o.components[f])?{...o,components:u}:o)}return h(i.signal),{plan:c.some((g,o)=>g!==t.pages[o])?{...t,pages:c}:t,diagnostics:i.diagnostics}}finally{clearTimeout(d),e.signal?.removeEventListener("abort",n)}}exports.OutputAssetError=p;exports.resolvePlanAssets=T;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { r as $ } from "./grid-geometry-BNptEcMm.js";
|
|
2
|
-
import { b, i as M } from "./component-tree-Ca6YYfHq.js";
|
|
3
|
-
import { b as E } from "./progress-Hc2vxoCs.js";
|
|
4
|
-
import { n as k } from "./diagnostic-notification-qGAYZdkB.js";
|
|
5
|
-
class X extends Error {
|
|
6
|
-
constructor(t) {
|
|
7
|
-
super(`Output contains ${t.length} known fidelity issue(s): ${t[0]?.code}`), this.diagnostics = t, this.code = "output-fidelity", this.name = "OutputFidelityError";
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
const D = /* @__PURE__ */ new Set(["text", "rect", "line", "ellipse"]), L = /* @__PURE__ */ new Set(["image", "chart", "barcode", "qrcode"]);
|
|
11
|
-
function O(e, t) {
|
|
12
|
-
if (!e.grid) {
|
|
13
|
-
if (M(e))
|
|
14
|
-
return (t === "pdf" || t === "xlsx") && !/^data:image\/(png|jpe?g);base64,/i.test(e.imageData) ? { code: "unsupported-image-format", message: `${t.toUpperCase()} accepts PNG or JPEG data URLs; convert this image before exporting.` } : void 0;
|
|
15
|
-
if (L.has(e.kind)) return { code: "missing-image", message: `${e.kind} requires imageData or a renderer adapter before output.` };
|
|
16
|
-
if (!D.has(e.kind)) return { code: "unsupported-component", message: `Unsupported component kind: ${e.kind}.` };
|
|
17
|
-
if (t === "xlsx" && e.kind !== "text") return { code: "unsupported-component", message: `XLSX data export omits ${e.kind} geometry.` };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function g(e, t, i, s, n) {
|
|
21
|
-
return { ...n, severity: "warning", format: t, pageIndex: i, componentIndex: s, kind: e.kind, nid: e.nid };
|
|
22
|
-
}
|
|
23
|
-
function f(e, t) {
|
|
24
|
-
if (!e || t === "dom") return;
|
|
25
|
-
const i = [];
|
|
26
|
-
return e.rotateDeg && i.push("rotateDeg"), e.opacity !== void 0 && e.opacity !== 1 && i.push("opacity"), t !== "xlsx" && e.align === "justify" && i.push("justify"), t === "xlsx" && e.letterSpacing && i.push("letterSpacing"), i.length ? `${t} does not preserve these styles: ${i.join(", ")}.` : void 0;
|
|
27
|
-
}
|
|
28
|
-
function S(e) {
|
|
29
|
-
if (!e) return;
|
|
30
|
-
const t = ["backgroundColor", "align", "verticalAlign", "lineHeight", "borderTop", "borderRight", "borderBottom", "borderLeft", "borderColor", "lineColor", "lineWidthPt"].filter((i) => e[i] !== void 0);
|
|
31
|
-
return t.length ? `XLSX rich text does not retain independent run styles: ${t.join(", ")}.` : void 0;
|
|
32
|
-
}
|
|
33
|
-
function C(e) {
|
|
34
|
-
if (e.kind !== "text") return;
|
|
35
|
-
const t = S(e.style);
|
|
36
|
-
if (e.leftMm || e.topMm || t) return { code: "unsupported-style", message: `Nested XLSX text is retained as rich text in component order; absolute child offsets and independent paragraph styles are not retained.${t ? ` ${t}` : ""}` };
|
|
37
|
-
}
|
|
38
|
-
function m(e, t, i, s, n, o) {
|
|
39
|
-
const u = (r) => {
|
|
40
|
-
n.push({ ...g(e, t, i, s, { code: "unsupported-style", message: r }), componentPath: o });
|
|
41
|
-
};
|
|
42
|
-
for (const r of e.richParagraphs ?? []) {
|
|
43
|
-
t === "xlsx" && (r.spaceBeforeMm || r.spaceAfterMm || r.indentMm || r.align || r.lineHeight) && u("XLSX rich text preserves fonts and paragraph newlines; paragraph spacing, indentation and alignment are not retained.");
|
|
44
|
-
const a = f({ align: r.align }, t);
|
|
45
|
-
a && u(a);
|
|
46
|
-
for (const d of r.segments) {
|
|
47
|
-
const l = f(d.style, t) ?? (t === "xlsx" ? S(d.style) : void 0);
|
|
48
|
-
l && u(l);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function v(e, t, i, s, n, o, u) {
|
|
53
|
-
if (u.has(e)) return;
|
|
54
|
-
const r = new Set(u).add(e), a = O(e, t);
|
|
55
|
-
a && o.push({ ...g(e, t, i, s, a), componentPath: n });
|
|
56
|
-
const d = f(e.style, t);
|
|
57
|
-
d && o.push({ ...g(e, t, i, s, { code: "unsupported-style", message: d }), componentPath: n }), m(e, t, i, s, o, n), N(e, t, i, s, n, o, r);
|
|
58
|
-
}
|
|
59
|
-
function j(e, t, i) {
|
|
60
|
-
if (e.grid) return { code: "nested-components-omitted", message: "XLSX cannot place a nested grid inside a single cell; the nested grid is omitted." };
|
|
61
|
-
const s = C(e);
|
|
62
|
-
if (s) return s;
|
|
63
|
-
if (M(e) && (e.leftMm < 0 || e.topMm < 0 || e.leftMm + e.widthMm > t + 1e-3 || e.topMm + e.heightMm > i + 1e-3)) return { code: "unsupported-style", message: "XLSX cannot clip a child image to a cell; it retains the original image dimensions." };
|
|
64
|
-
}
|
|
65
|
-
function G(e) {
|
|
66
|
-
let t;
|
|
67
|
-
return (i, s, n, o) => {
|
|
68
|
-
t ??= new Map($(e.grid, e.widthMm, e.heightMm).cells.map((a) => [`${a.ri}:${a.ci}`, a]));
|
|
69
|
-
const u = t.get(`${s}:${n}`), r = 2 * (e.grid?.paddingMm ?? 0.5);
|
|
70
|
-
return j(i, (u?.widthMm ?? 0) - r - (o?.indentMm ?? 0), (u?.heightMm ?? 0) - r);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function N(e, t, i, s, n, o, u) {
|
|
74
|
-
const r = G(e);
|
|
75
|
-
for (const [a, d] of (e.grid?.cells ?? []).entries()) for (const [l, c] of d.entries()) {
|
|
76
|
-
const h = f(c?.style, t);
|
|
77
|
-
h && o.push({ ...g(e, t, i, s, { code: "unsupported-style", message: h }), componentPath: [...n, a, l] }), c?.richParagraphs?.length && m({ ...e, richParagraphs: c.richParagraphs }, t, i, s, o, [...n, a, l]);
|
|
78
|
-
for (const [w, p] of (c?.children ?? []).entries()) {
|
|
79
|
-
const y = [...n, a, l, w];
|
|
80
|
-
if (t === "xlsx") {
|
|
81
|
-
const x = r(p, a, l, c);
|
|
82
|
-
if (x && o.push({ ...g(p, t, i, s, x), componentPath: y }), p.grid) continue;
|
|
83
|
-
}
|
|
84
|
-
v(p, t, i, s, y, o, u);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
function R(e, t) {
|
|
89
|
-
b(e);
|
|
90
|
-
const i = [];
|
|
91
|
-
return e.pages.forEach((s, n) => s.components.forEach((o, u) => v(o, t, n, u, [], i, /* @__PURE__ */ new Set()))), i;
|
|
92
|
-
}
|
|
93
|
-
function U(e, t, i) {
|
|
94
|
-
E(i.signal);
|
|
95
|
-
const s = R(e, t);
|
|
96
|
-
if (s.forEach((n) => k(n, i)), i.fidelity === "strict" && s.length) throw new X(s);
|
|
97
|
-
return s;
|
|
98
|
-
}
|
|
99
|
-
export {
|
|
100
|
-
X as O,
|
|
101
|
-
R as i,
|
|
102
|
-
U as r
|
|
103
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const b=require("./grid-geometry-CZ_cYB6O.cjs"),h=require("./component-tree-DkGLEfZC.cjs"),m=require("./progress-B0ctFpKf.cjs"),D=require("./diagnostic-notification-B9K9We3h.cjs");class S extends Error{constructor(t){super(`Output contains ${t.length} known fidelity issue(s): ${t[0]?.code}`),this.diagnostics=t,this.code="output-fidelity",this.name="OutputFidelityError"}}const X=new Set(["text","rect","line","ellipse"]),O=new Set(["image","chart","barcode","qrcode"]);function C(e,t){if(!e.grid){if(h.isImageBackedComponent(e))return(t==="pdf"||t==="xlsx")&&!/^data:image\/(png|jpe?g);base64,/i.test(e.imageData)?{code:"unsupported-image-format",message:`${t.toUpperCase()} accepts PNG or JPEG data URLs; convert this image before exporting.`}:void 0;if(O.has(e.kind))return{code:"missing-image",message:`${e.kind} requires imageData or a renderer adapter before output.`};if(!X.has(e.kind))return{code:"unsupported-component",message:`Unsupported component kind: ${e.kind}.`};if(t==="xlsx"&&e.kind!=="text")return{code:"unsupported-component",message:`XLSX data export omits ${e.kind} geometry.`}}}function g(e,t,i,s,n){return{...n,severity:"warning",format:t,pageIndex:i,componentIndex:s,kind:e.kind,nid:e.nid}}function f(e,t){if(!e||t==="dom")return;const i=[];return e.rotateDeg&&i.push("rotateDeg"),e.opacity!==void 0&&e.opacity!==1&&i.push("opacity"),t!=="xlsx"&&e.align==="justify"&&i.push("justify"),t==="xlsx"&&e.letterSpacing&&i.push("letterSpacing"),i.length?`${t} does not preserve these styles: ${i.join(", ")}.`:void 0}function v(e){if(!e)return;const t=["backgroundColor","align","verticalAlign","lineHeight","borderTop","borderRight","borderBottom","borderLeft","borderColor","lineColor","lineWidthPt"].filter(i=>e[i]!==void 0);return t.length?`XLSX rich text does not retain independent run styles: ${t.join(", ")}.`:void 0}function L(e){if(e.kind!=="text")return;const t=v(e.style);if(e.leftMm||e.topMm||t)return{code:"unsupported-style",message:`Nested XLSX text is retained as rich text in component order; absolute child offsets and independent paragraph styles are not retained.${t?` ${t}`:""}`}}function w(e,t,i,s,n,o){const a=r=>{n.push({...g(e,t,i,s,{code:"unsupported-style",message:r}),componentPath:o})};for(const r of e.richParagraphs??[]){t==="xlsx"&&(r.spaceBeforeMm||r.spaceAfterMm||r.indentMm||r.align||r.lineHeight)&&a("XLSX rich text preserves fonts and paragraph newlines; paragraph spacing, indentation and alignment are not retained.");const u=f({align:r.align},t);u&&a(u);for(const d of r.segments){const c=f(d.style,t)??(t==="xlsx"?v(d.style):void 0);c&&a(c)}}}function E(e,t,i,s,n,o,a){if(a.has(e))return;const r=new Set(a).add(e),u=C(e,t);u&&o.push({...g(e,t,i,s,u),componentPath:n});const d=f(e.style,t);d&&o.push({...g(e,t,i,s,{code:"unsupported-style",message:d}),componentPath:n}),w(e,t,i,s,o,n),N(e,t,i,s,n,o,r)}function q(e,t,i){if(e.grid)return{code:"nested-components-omitted",message:"XLSX cannot place a nested grid inside a single cell; the nested grid is omitted."};const s=L(e);if(s)return s;if(h.isImageBackedComponent(e)&&(e.leftMm<0||e.topMm<0||e.leftMm+e.widthMm>t+.001||e.topMm+e.heightMm>i+.001))return{code:"unsupported-style",message:"XLSX cannot clip a child image to a cell; it retains the original image dimensions."}}function G(e){let t;return(i,s,n,o)=>{t??=new Map(b.resolveGridLayout(e.grid,e.widthMm,e.heightMm).cells.map(u=>[`${u.ri}:${u.ci}`,u]));const a=t.get(`${s}:${n}`),r=2*(e.grid?.paddingMm??.5);return q(i,(a?.widthMm??0)-r-(o?.indentMm??0),(a?.heightMm??0)-r)}}function N(e,t,i,s,n,o,a){const r=G(e);for(const[u,d]of(e.grid?.cells??[]).entries())for(const[c,l]of d.entries()){const y=f(l?.style,t);y&&o.push({...g(e,t,i,s,{code:"unsupported-style",message:y}),componentPath:[...n,u,c]}),l?.richParagraphs?.length&&w({...e,richParagraphs:l.richParagraphs},t,i,s,o,[...n,u,c]);for(const[k,p]of(l?.children??[]).entries()){const M=[...n,u,c,k];if(t==="xlsx"){const x=r(p,u,c,l);if(x&&o.push({...g(p,t,i,s,x),componentPath:M}),p.grid)continue}E(p,t,i,s,M,o,a)}}}function $(e,t){h.assertBoundedRenderTree(e);const i=[];return e.pages.forEach((s,n)=>s.components.forEach((o,a)=>E(o,t,n,a,[],i,new Set))),i}function j(e,t,i){m.assertOutputActive(i.signal);const s=$(e,t);if(s.forEach(n=>D.notifyOutputDiagnostic(n,i)),i.fidelity==="strict"&&s.length)throw new S(s);return s}exports.OutputFidelityError=S;exports.inspectOutputCapabilities=$;exports.reportOutputDiagnostics=j;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { S as A } from "./style-67OqfNed.js";
|
|
2
|
-
const l = A;
|
|
3
|
-
function k(e) {
|
|
4
|
-
return (e.kind === "image" || e.kind === "barcode" || e.kind === "qrcode" || e.kind === "chart") && !!e.imageData;
|
|
5
|
-
}
|
|
6
|
-
function E(e) {
|
|
7
|
-
return e.kind === "text" && Array.isArray(e.richParagraphs) && e.richParagraphs.length > 0;
|
|
8
|
-
}
|
|
9
|
-
function o(e) {
|
|
10
|
-
return !!e && typeof e == "object";
|
|
11
|
-
}
|
|
12
|
-
function d(e, r, s, n, i) {
|
|
13
|
-
if (++i.nodes > 1e6) return { path: r, message: "组件树超过100万个结构节点预算" };
|
|
14
|
-
if (o(e)) {
|
|
15
|
-
if (s > 64) return { path: r, message: "组件嵌套超过64层预算" };
|
|
16
|
-
if (n.has(e)) return { path: r, message: "组件树包含循环引用" };
|
|
17
|
-
if (!(!o(e.grid) || !Array.isArray(e.grid.cells))) {
|
|
18
|
-
n.add(e);
|
|
19
|
-
try {
|
|
20
|
-
for (const [t, f] of e.grid.cells.entries())
|
|
21
|
-
if (Array.isArray(f))
|
|
22
|
-
for (const [u, c] of f.entries()) {
|
|
23
|
-
if (++i.nodes > 1e6) return { path: r, message: "组件树超过100万个结构节点预算" };
|
|
24
|
-
if (!(!o(c) || !Array.isArray(c.children)))
|
|
25
|
-
for (const [g, y] of c.children.entries()) {
|
|
26
|
-
const a = d(y, `${r}.grid.cells.${t}.${u}.children.${g}`, s + 1, n, i);
|
|
27
|
-
if (a) return a;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
} finally {
|
|
31
|
-
n.delete(e);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function m(e, r = "$.components", s = { nodes: 0 }) {
|
|
37
|
-
for (const [n, i] of e.entries()) {
|
|
38
|
-
const t = d(i, `${r}.${n}`, 0, /* @__PURE__ */ new Set(), s);
|
|
39
|
-
if (t) return t;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function $(e) {
|
|
43
|
-
const r = { nodes: 0 };
|
|
44
|
-
for (const [s, n] of e.entries()) {
|
|
45
|
-
if (!o(n) || !Array.isArray(n.components)) continue;
|
|
46
|
-
const i = m(n.components, `$.pages.${s}.components`, r);
|
|
47
|
-
if (i) return i;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function R(e) {
|
|
51
|
-
const r = $(e.pages);
|
|
52
|
-
if (r) throw new TypeError(`${r.path}: ${r.message}`);
|
|
53
|
-
}
|
|
54
|
-
export {
|
|
55
|
-
l as R,
|
|
56
|
-
E as a,
|
|
57
|
-
R as b,
|
|
58
|
-
m as c,
|
|
59
|
-
k as i,
|
|
60
|
-
$ as r
|
|
61
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const E=require("./style-C22Pbv3T.cjs"),R=E.SCHEMA_VERSION_MACH;function $(e){return(e.kind==="image"||e.kind==="barcode"||e.kind==="qrcode"||e.kind==="chart")&&!!e.imageData}function h(e){return e.kind==="text"&&Array.isArray(e.richParagraphs)&&e.richParagraphs.length>0}function o(e){return!!e&&typeof e=="object"}function a(e,r,s,n,i){if(++i.nodes>1e6)return{path:r,message:"组件树超过100万个结构节点预算"};if(o(e)){if(s>64)return{path:r,message:"组件嵌套超过64层预算"};if(n.has(e))return{path:r,message:"组件树包含循环引用"};if(!(!o(e.grid)||!Array.isArray(e.grid.cells))){n.add(e);try{for(const[t,d]of e.grid.cells.entries())if(Array.isArray(d))for(const[A,c]of d.entries()){if(++i.nodes>1e6)return{path:r,message:"组件树超过100万个结构节点预算"};if(!(!o(c)||!Array.isArray(c.children)))for(const[y,m]of c.children.entries()){const f=a(m,`${r}.grid.cells.${t}.${A}.children.${y}`,s+1,n,i);if(f)return f}}}finally{n.delete(e)}}}}function u(e,r="$.components",s={nodes:0}){for(const[n,i]of e.entries()){const t=a(i,`${r}.${n}`,0,new Set,s);if(t)return t}}function g(e){const r={nodes:0};for(const[s,n]of e.entries()){if(!o(n)||!Array.isArray(n.components))continue;const i=u(n.components,`$.pages.${s}.components`,r);if(i)return i}}function l(e){const r=g(e.pages);if(r)throw new TypeError(`${r.path}: ${r.message}`)}exports.RENDER_PLAN_SCHEMA_VERSION=R;exports.assertBoundedRenderTree=l;exports.componentTreeIssue=u;exports.isImageBackedComponent=$;exports.isRichText=h;exports.renderTreeIssue=g;
|