@agile-team/mach-report 2.16.0 → 2.17.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 +10 -6
- package/dist/{ExcelBindingWizard-CP6h2x1f.cjs → ExcelBindingWizard-Bq6FYME6.cjs} +1 -1
- package/dist/{ExcelBindingWizard-HhB3hAJE.js → ExcelBindingWizard-Co1svTsw.js} +3 -3
- package/dist/{ParamEditor-CUQLgoxa.cjs → ParamEditor-B5UZRgxv.cjs} +1 -1
- package/dist/{ParamEditor-OKesP_nO.js → ParamEditor-DNNARyeB.js} +1 -1
- package/dist/{ReportBatchPanel-cZCAMAwH.cjs → ReportBatchPanel-Ctvs2t_9.cjs} +1 -1
- package/dist/{ReportBatchPanel-ruxcbfY6.js → ReportBatchPanel-uQh06usx.js} +1 -1
- package/dist/ReportPreview-BdQawRh0.js +4879 -0
- package/dist/ReportPreview-CJC_-j2I.cjs +6 -0
- package/dist/{ReportTemplateLibrary-BDlNT8JN.cjs → ReportTemplateLibrary-CnP7_1pH.cjs} +1 -1
- package/dist/{ReportTemplateLibrary-DcwrH-63.js → ReportTemplateLibrary-TIL_Oj2l.js} +1 -1
- package/dist/RuleEditor-DkRjOLlr.js +2141 -0
- package/dist/RuleEditor-h5anGsDB.cjs +1 -0
- package/dist/{TemplateOutlinePanel-CGrT5DFN.cjs → TemplateOutlinePanel-BlLxRrfu.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-SXCjaPKR.js → TemplateOutlinePanel-BouxsuqQ.js} +1 -1
- package/dist/{TemplateReusePanel-lHLOS9Wn.js → TemplateReusePanel-BEACLPaN.js} +2 -2
- package/dist/{TemplateReusePanel-6Z3wRFz8.cjs → TemplateReusePanel-yxsHSO40.cjs} +1 -1
- package/dist/{TemplateReviewPanel-CJ9PLc48.js → TemplateReviewPanel-B1OGRY2i.js} +1 -1
- package/dist/{TemplateReviewPanel-Dpk7sLcF.cjs → TemplateReviewPanel-D9Cx0m2N.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +63 -1
- package/dist/analytics.d.ts +63 -1
- package/dist/analytics.js +4 -4
- package/dist/artifact-integrity.json +86 -90
- package/dist/assets-BIMVwjQe.js +231 -0
- package/dist/assets-Dfs2ElxI.cjs +1 -0
- package/dist/{auto-YR7a4BtF.js → auto-BIOmtVhk.js} +14 -14
- package/dist/{auto-uVBjX1j5.cjs → auto-DDHflI9v.cjs} +1 -1
- package/dist/computed-BW5a8QFk.js +612 -0
- package/dist/computed-C2GD3XcE.cjs +1 -0
- package/dist/dataset-DL83majE.js +161 -0
- package/dist/dataset-IrlXbUvh.cjs +1 -0
- package/dist/{designer-BfQSahxq.js → designer-D9XAxqSc.js} +1194 -1179
- package/dist/designer-uCDo5XSK.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +125 -3
- package/dist/designer.d.ts +125 -3
- package/dist/designer.js +1 -1
- package/dist/{drill-CsdjgkRM.cjs → drill-ByN8COs_.cjs} +1 -1
- package/dist/{drill-DIGsZfyB.js → drill-CKW3Xtfa.js} +11 -11
- package/dist/{encoding-BYF9ZTl9.cjs → encoding-BFMFIc4r.cjs} +1 -1
- package/dist/{encoding-BOGq4qYL.js → encoding-DP_Eaf0A.js} +2 -2
- package/dist/{font-loader-EKLzOJxf.cjs → font-loader-7FWVlykp.cjs} +1 -1
- package/dist/{font-loader-CzI1GuBc.js → font-loader-CQZowp0I.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +173 -1
- package/dist/index.d.ts +173 -1
- package/dist/index.js +1205 -808
- package/dist/json-snapshot-D7PE1NsU.cjs +2 -0
- package/dist/{json-snapshot-D6ioHth9.js → json-snapshot-DYmEe3sO.js} +769 -692
- package/dist/matrix-JLAXlux-.js +302 -0
- package/dist/matrix-gTHpDTGm.cjs +1 -0
- package/dist/{pdf-ByVCb1i6.cjs → pdf-B8JouyYv.cjs} +47 -47
- package/dist/{pdf-DJ5S6ukC.js → pdf-l3ea86di.js} +13 -15
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +12 -0
- package/dist/pdf.d.ts +12 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-C2j5_mhx.js → plugin-BBp74CQZ.js} +1 -1
- package/dist/{plugin-Dr39GBRG.cjs → plugin-CtFX9PFG.cjs} +1 -1
- package/dist/{prepared-DqtpvRTn.js → prepared-CARicKYh.js} +1 -1
- package/dist/{prepared-DdrjLC7L.cjs → prepared-Ch1x_Gog.cjs} +1 -1
- package/dist/{protocol-BzwMP4Vw.cjs → protocol-B5A2uom4.cjs} +1 -1
- package/dist/{protocol-kt4Iy6-3.js → protocol-BaiWjq5w.js} +3 -3
- package/dist/{record-bindings-DUX1VMlR.cjs → record-bindings-B86Sur_y.cjs} +1 -1
- package/dist/{record-bindings-CZWBJ1fU.js → record-bindings-D4TuMzHs.js} +1 -1
- package/dist/{region-binding-workflow-CWNvIjkV.js → region-binding-workflow-BNasF5kz.js} +2 -2
- package/dist/{region-binding-workflow-CqSMxQ4p.cjs → region-binding-workflow-O2Cni3mF.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/runtime-DakRXui3.js +170 -0
- package/dist/runtime-dL5ygIfa.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +46 -0
- package/dist/server/node.d.ts +46 -0
- package/dist/server-node.cjs +4 -4
- package/dist/server-node.js +2540 -1911
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +174 -1
- package/dist/server.d.ts +174 -1
- package/dist/server.js +787 -544
- package/dist/style.css +1 -1
- package/dist/template-catalog-Dua8h9ZA.cjs +1 -0
- package/dist/{template-catalog-BtR2JmCL.js → template-catalog-wT1fNeAP.js} +4 -4
- package/dist/{template-fragments-BVsbxs4a.cjs → template-fragments-BajTajb4.cjs} +1 -1
- package/dist/{template-fragments-By0aZC1D.js → template-fragments-DmX5XK4N.js} +1 -1
- package/dist/{template-registry-C62vpv4a.cjs → template-registry-CpysHAxy.cjs} +1 -1
- package/dist/{template-registry-Cw3vRTX2.js → template-registry-u11fPd8D.js} +5 -5
- package/dist/{tree-BX380Rr7.cjs → tree-CLpxYbKa.cjs} +1 -1
- package/dist/{tree-CjVZLRw7.js → tree-DNJorJUf.js} +1 -1
- package/dist/vue/async.d.cts +108 -2
- package/dist/vue/async.d.ts +108 -2
- package/dist/vue/index.d.cts +130 -3
- package/dist/vue/index.d.ts +130 -3
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +4 -4
- package/dist/{workbook-session-BeSO8PFB.js → workbook-session-B8pNW24X.js} +1 -1
- package/dist/{workbook-session-Cbts-22R.cjs → workbook-session-DN5LSA5C.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +88 -2
- package/dist/xlsx.d.ts +88 -2
- package/dist/xlsx.js +232 -230
- package/package.json +1 -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/computed-C-4C2S5h.js +0 -521
- package/dist/computed-CGV2a809.cjs +0 -1
- package/dist/dataset-BkRmwgeJ.cjs +0 -1
- package/dist/dataset-H5pFuQGU.js +0 -121
- 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/json-snapshot-DknkjvxP.cjs +0 -2
- package/dist/matrix-CGRGkn5s.js +0 -112
- package/dist/matrix-gEO7ZM_u.cjs +0 -1
- package/dist/runtime-BjKBI530.js +0 -168
- package/dist/runtime-CBFEPKEs.cjs +0 -1
- package/dist/template-catalog-C2NLdrwB.cjs +0 -1
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;
|