@agile-team/mach-report 2.14.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.
- package/README.md +26 -16
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/{ExcelBindingWizard-CLT2p7P3.cjs → ExcelBindingWizard-CP6h2x1f.cjs} +1 -1
- package/dist/{ExcelBindingWizard-CvsWR8Ga.js → ExcelBindingWizard-HhB3hAJE.js} +3 -3
- package/dist/ParamEditor-CUQLgoxa.cjs +1 -0
- package/dist/ParamEditor-OKesP_nO.js +594 -0
- package/dist/{ReportBatchPanel-DkxTzBkD.cjs → ReportBatchPanel-cZCAMAwH.cjs} +1 -1
- package/dist/{ReportBatchPanel-LqVgiqp7.js → ReportBatchPanel-ruxcbfY6.js} +39 -39
- package/dist/ReportPreview-BcDKCLiK.js +4834 -0
- package/dist/ReportPreview-Bk9nLfO9.cjs +6 -0
- package/dist/{ReportTemplateLibrary-cQ1sqNYo.cjs → ReportTemplateLibrary-BDlNT8JN.cjs} +1 -1
- package/dist/{ReportTemplateLibrary-MjWEtc7X.js → ReportTemplateLibrary-DcwrH-63.js} +1 -1
- package/dist/{RuleEditor-BaR6xUiI.cjs → RuleEditor-BX5S8RSF.cjs} +1 -1
- package/dist/{RuleEditor-ChuXMlei.js → RuleEditor-CGl9XY2s.js} +5 -5
- package/dist/{TemplateOutlinePanel-BHKP89Xz.cjs → TemplateOutlinePanel-CGrT5DFN.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-Dci6aRn1.js → TemplateOutlinePanel-SXCjaPKR.js} +2 -2
- package/dist/{TemplateReusePanel-CY5eO2Sh.cjs → TemplateReusePanel-6Z3wRFz8.cjs} +1 -1
- package/dist/{TemplateReusePanel-B7Gmyc1z.js → TemplateReusePanel-lHLOS9Wn.js} +2 -2
- package/dist/{TemplateReviewPanel-DjlX3xpt.js → TemplateReviewPanel-CJ9PLc48.js} +2 -2
- package/dist/{TemplateReviewPanel-JvZe9_4G.cjs → TemplateReviewPanel-Dpk7sLcF.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +5 -1
- package/dist/analytics.d.ts +5 -1
- package/dist/analytics.js +154 -60
- package/dist/artifact-integrity.json +143 -0
- package/dist/assets-CqIbfbTr.js +126 -0
- package/dist/assets-e4YSke8n.cjs +1 -0
- package/dist/auto-YR7a4BtF.js +240 -0
- package/dist/auto-uVBjX1j5.cjs +1 -0
- package/dist/batch-WzDIXJAt.js +220 -0
- package/dist/batch-z6Aw5GEY.cjs +1 -0
- package/dist/capabilities-DDwXr_cA.js +103 -0
- package/dist/capabilities-DNLyZdNw.cjs +1 -0
- package/dist/codes.d.cts +4 -0
- package/dist/codes.d.ts +4 -0
- package/dist/component-tree-Ca6YYfHq.js +61 -0
- package/dist/component-tree-DkGLEfZC.cjs +1 -0
- package/dist/{computed-Bvk0W15F.js → computed-C-4C2S5h.js} +3 -3
- package/dist/config-Dg_o8e7m.cjs +1 -0
- package/dist/config-XQ4qrQ7Q.js +844 -0
- package/dist/designer-BfQSahxq.js +5163 -0
- package/dist/designer-CPPdeM5_.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +197 -16
- package/dist/designer.d.ts +197 -16
- package/dist/designer.js +1 -1
- package/dist/diagnostic-notification-B9K9We3h.cjs +1 -0
- package/dist/diagnostic-notification-qGAYZdkB.js +7 -0
- package/dist/drill-CsdjgkRM.cjs +1 -0
- package/dist/drill-DIGsZfyB.js +145 -0
- package/dist/encoding-BOGq4qYL.js +21 -0
- package/dist/encoding-BYF9ZTl9.cjs +1 -0
- package/dist/{font-loader-DHto6Lra.js → font-loader-CzI1GuBc.js} +1 -1
- package/dist/{font-loader-vhCT8znW.cjs → font-loader-EKLzOJxf.cjs} +1 -1
- package/dist/index.cjs +8 -9
- package/dist/index.d.cts +84 -4
- package/dist/index.d.ts +84 -4
- package/dist/index.js +829 -833
- package/dist/json-snapshot-D6ioHth9.js +1702 -0
- package/dist/json-snapshot-DknkjvxP.cjs +2 -0
- package/dist/licenses/_bwip-js_generic-4.11.4.txt +24 -0
- package/dist/licenses/_fast-csv_format-4.3.5.txt +22 -0
- package/dist/licenses/_fast-csv_parse-4.3.6.txt +22 -0
- package/dist/licenses/_pdf-lib_fontkit-1.1.1.txt +326 -0
- package/dist/licenses/_pdf-lib_standard-fonts-1.0.0.txt +22 -0
- package/dist/licenses/_pdf-lib_upng-1.0.1.txt +22 -0
- package/dist/licenses/_types_node-14.18.63.txt +22 -0
- package/dist/licenses/_types_pako-2.0.3.txt +22 -0
- package/dist/licenses/_types_pegjs-0.10.6.txt +22 -0
- package/dist/licenses/archiver-5.3.2.txt +23 -0
- package/dist/licenses/archiver-utils-2.1.0.txt +23 -0
- package/dist/licenses/archiver-utils-3.0.4.txt +23 -0
- package/dist/licenses/async-3.2.6.txt +20 -0
- package/dist/licenses/balanced-match-1.0.2.txt +22 -0
- package/dist/licenses/base64-js-1.5.1.txt +22 -0
- package/dist/licenses/big-integer-1.6.52.txt +25 -0
- package/dist/licenses/binary-0.3.0.txt +178 -0
- package/dist/licenses/bl-4.1.0.txt +14 -0
- package/dist/licenses/bluebird-3.4.7.txt +22 -0
- package/dist/licenses/brace-expansion-1.1.21.txt +22 -0
- package/dist/licenses/brace-expansion-2.1.7.txt +22 -0
- package/dist/licenses/buffer-5.7.1.txt +22 -0
- package/dist/licenses/buffer-crc32-0.2.13.txt +20 -0
- package/dist/licenses/buffer-indexof-polyfill-1.0.2.txt +23 -0
- package/dist/licenses/buffers-0.1.1.txt +140 -0
- package/dist/licenses/chainsaw-0.1.0.txt +184 -0
- package/dist/licenses/compress-commons-4.1.2.txt +23 -0
- package/dist/licenses/concat-map-0.0.1.txt +19 -0
- package/dist/licenses/core-util-is-1.0.3.txt +20 -0
- package/dist/licenses/crc-32-1.2.2.txt +202 -0
- package/dist/licenses/crc32-stream-4.0.3.txt +23 -0
- package/dist/licenses/dayjs-1.11.23.txt +22 -0
- package/dist/licenses/duplexer2-0.1.4.txt +27 -0
- package/dist/licenses/end-of-stream-1.4.5.txt +22 -0
- package/dist/licenses/exceljs-4.4.0.txt +23 -0
- package/dist/licenses/fast-csv-4.3.6.txt +22 -0
- package/dist/licenses/fast-png-6.4.0.txt +22 -0
- package/dist/licenses/fs-constants-1.0.0.txt +22 -0
- package/dist/licenses/fs.realpath-1.0.0.txt +44 -0
- package/dist/licenses/fstream-1.0.12.txt +16 -0
- package/dist/licenses/glob-7.2.3.txt +22 -0
- package/dist/licenses/graceful-fs-4.2.11.txt +16 -0
- package/dist/licenses/ieee754-1.2.1.txt +12 -0
- package/dist/licenses/immediate-3.0.6.txt +21 -0
- package/dist/licenses/inflight-1.0.6.txt +16 -0
- package/dist/licenses/inherits-2.0.4.txt +17 -0
- package/dist/licenses/iobuffer-5.4.0.txt +23 -0
- package/dist/licenses/isarray-1.0.0.txt +61 -0
- package/dist/licenses/jszip-3.10.2.txt +652 -0
- package/dist/licenses/lazystream-1.0.1.txt +24 -0
- package/dist/licenses/lie-3.3.0.txt +8 -0
- package/dist/licenses/listenercount-1.0.1.txt +6 -0
- package/dist/licenses/lodash.defaults-4.2.0.txt +48 -0
- package/dist/licenses/lodash.difference-4.5.0.txt +48 -0
- package/dist/licenses/lodash.escaperegexp-4.1.2.txt +48 -0
- package/dist/licenses/lodash.flatten-4.4.0.txt +48 -0
- package/dist/licenses/lodash.groupby-4.6.0.txt +48 -0
- package/dist/licenses/lodash.isboolean-3.0.3.txt +23 -0
- package/dist/licenses/lodash.isequal-4.5.0.txt +48 -0
- package/dist/licenses/lodash.isfunction-3.0.9.txt +48 -0
- package/dist/licenses/lodash.isnil-4.0.0.txt +23 -0
- package/dist/licenses/lodash.isplainobject-4.0.6.txt +48 -0
- package/dist/licenses/lodash.isundefined-3.0.1.txt +23 -0
- package/dist/licenses/lodash.union-4.6.0.txt +48 -0
- package/dist/licenses/lodash.uniq-4.5.0.txt +48 -0
- package/dist/licenses/minimatch-3.1.5.txt +16 -0
- package/dist/licenses/minimatch-5.1.9.txt +16 -0
- package/dist/licenses/minimist-1.2.8.txt +19 -0
- package/dist/licenses/mkdirp-0.5.6.txt +22 -0
- package/dist/licenses/node-sql-parser-5.4.0.txt +202 -0
- package/dist/licenses/normalize-path-3.0.0.txt +22 -0
- package/dist/licenses/once-1.4.0.txt +16 -0
- package/dist/licenses/pako-1.0.11.txt +22 -0
- package/dist/licenses/pako-2.2.0.txt +22 -0
- package/dist/licenses/path-is-absolute-1.0.1.txt +22 -0
- package/dist/licenses/pdf-lib-1.17.1.txt +22 -0
- package/dist/licenses/process-nextick-args-2.0.1.txt +20 -0
- package/dist/licenses/readable-stream-2.3.8.txt +48 -0
- package/dist/licenses/readable-stream-3.6.2.txt +48 -0
- package/dist/licenses/readdir-glob-1.1.3.txt +202 -0
- package/dist/licenses/rimraf-2.7.1.txt +16 -0
- package/dist/licenses/safe-buffer-5.1.2.txt +22 -0
- package/dist/licenses/safe-buffer-5.2.1.txt +22 -0
- package/dist/licenses/saxes-5.0.1.txt +397 -0
- package/dist/licenses/setimmediate-1.0.5.txt +21 -0
- package/dist/licenses/string_decoder-1.1.1.txt +49 -0
- package/dist/licenses/string_decoder-1.3.0.txt +49 -0
- package/dist/licenses/tar-stream-2.2.0.txt +22 -0
- package/dist/licenses/tmp-0.2.7.txt +22 -0
- package/dist/licenses/traverse-0.3.9.txt +25 -0
- package/dist/licenses/tslib-1.14.1.txt +13 -0
- package/dist/licenses/unzipper-0.10.14.txt +26 -0
- package/dist/licenses/util-deprecate-1.0.2.txt +25 -0
- package/dist/licenses/uuid-11.1.1.txt +10 -0
- package/dist/licenses/wrappy-1.0.2.txt +16 -0
- package/dist/licenses/xmlchars-2.2.0.txt +19 -0
- package/dist/licenses/zip-stream-4.1.1.txt +23 -0
- package/dist/matrix-CGRGkn5s.js +112 -0
- package/dist/matrix-gEO7ZM_u.cjs +1 -0
- package/dist/media-B7vnpD8k.cjs +1 -0
- package/dist/media-Y90dHK9z.js +70 -0
- package/dist/param-validation-C3HlcLLO.cjs +1 -0
- package/dist/param-validation-Do7Eg8Zv.js +181 -0
- package/dist/{pdf-AyJGb22z.cjs → pdf-ByVCb1i6.cjs} +49 -49
- package/dist/{pdf-8UPQebOE.js → pdf-DJ5S6ukC.js} +4924 -4872
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +20 -3
- package/dist/pdf.d.ts +20 -3
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BGKf-Tqg.js → plugin-C2j5_mhx.js} +2 -2
- package/dist/{plugin-CktLH_Iy.cjs → plugin-Dr39GBRG.cjs} +1 -1
- package/dist/prepared-DdrjLC7L.cjs +1 -0
- package/dist/prepared-DqtpvRTn.js +87 -0
- package/dist/progress-B0ctFpKf.cjs +1 -0
- package/dist/progress-BXzlVbIp.js +29 -0
- package/dist/progress-DJBd9Rb9.cjs +1 -0
- package/dist/progress-Hc2vxoCs.js +52 -0
- package/dist/protocol-BzwMP4Vw.cjs +1 -0
- package/dist/protocol-kt4Iy6-3.js +90 -0
- package/dist/record-bindings-CZWBJ1fU.js +195 -0
- package/dist/record-bindings-DUX1VMlR.cjs +1 -0
- package/dist/{region-binding-workflow-DEJbhpCv.js → region-binding-workflow-CWNvIjkV.js} +1 -1
- package/dist/{region-binding-workflow-BzfbxRiR.cjs → region-binding-workflow-CqSMxQ4p.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -0
- package/dist/report-encoding-worker.d.ts +1 -0
- package/dist/report-encoding-worker.js +2 -0
- package/dist/{report-params-B44imUd4.js → report-params-B1RzkhJj.js} +1 -1
- package/dist/{report-params-SJfhKgaX.cjs → report-params-WDGrA4oP.cjs} +1 -1
- package/dist/rich-text-layout-ALlMoYOG.cjs +3 -0
- package/dist/rich-text-layout-Ct5WrY1g.js +102 -0
- package/dist/runtime-BjKBI530.js +168 -0
- package/dist/runtime-CBFEPKEs.cjs +1 -0
- package/dist/sbom.cdx.json +3982 -0
- package/dist/server/node.d.cts +106 -2
- package/dist/server/node.d.ts +106 -2
- package/dist/server-node.cjs +5 -1
- package/dist/server-node.js +4634 -539
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +780 -5
- package/dist/server.d.ts +780 -5
- package/dist/server.js +773 -691
- package/dist/sha256-BshdOkCC.cjs +1 -0
- package/dist/sha256-DTG-Gq8i.js +157 -0
- package/dist/style-67OqfNed.js +73 -0
- package/dist/style-C22Pbv3T.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/template-bindings-C2SpvsMU.js +58 -0
- package/dist/template-bindings-CEtWyiLX.cjs +1 -0
- package/dist/template-catalog-BtR2JmCL.js +414 -0
- package/dist/template-catalog-C2NLdrwB.cjs +1 -0
- package/dist/{template-fragments-DFUpq5QM.cjs → template-fragments-BVsbxs4a.cjs} +1 -1
- package/dist/{template-fragments-CLkGo6To.js → template-fragments-By0aZC1D.js} +21 -21
- package/dist/{template-outline-B3xVkzSv.cjs → template-outline-BwRV_eRo.cjs} +1 -1
- package/dist/{template-outline-CFenM1PV.js → template-outline-cnWfT_LK.js} +3 -3
- package/dist/template-registry-C62vpv4a.cjs +1 -0
- package/dist/template-registry-Cw3vRTX2.js +801 -0
- package/dist/textwrap-BEIg2w8y.js +110 -0
- package/dist/textwrap-BI-yJ6Wt.cjs +4 -0
- package/dist/{tree-CqcQ99NM.js → tree-CjVZLRw7.js} +1 -1
- package/dist/vue/async.d.cts +189 -14
- package/dist/vue/async.d.ts +189 -14
- package/dist/vue/index.d.cts +246 -22
- package/dist/vue/index.d.ts +246 -22
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +80 -78
- package/dist/{workbook-session-BfK1yHOO.js → workbook-session-BeSO8PFB.js} +5460 -5295
- package/dist/{workbook-session-DNa2RHNG.cjs → workbook-session-Cbts-22R.cjs} +19 -19
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +104 -2
- package/dist/worker.d.ts +104 -2
- package/dist/worker.js +12 -156
- package/dist/xlsx-node.cjs +35 -35
- package/dist/xlsx-node.js +2138 -2137
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +24 -10
- package/dist/xlsx.d.ts +24 -10
- package/dist/xlsx.js +303 -277
- package/package.json +7 -4
- package/dist/ParamEditor-CflQV3eQ.js +0 -526
- package/dist/ParamEditor-vIDzvpPV.cjs +0 -1
- package/dist/ReportPreview-CvbqLUzM.cjs +0 -6
- package/dist/ReportPreview-D_ywJ_-H.js +0 -4533
- package/dist/assets-C2U-e-Sz.cjs +0 -4
- package/dist/assets-Q0wUwNrV.js +0 -217
- package/dist/batch-DzaTNLWI.js +0 -371
- package/dist/batch-xMkqYiTr.cjs +0 -1
- package/dist/capabilities-CK_7hizc.js +0 -63
- package/dist/capabilities-CsZ-pNHR.cjs +0 -1
- package/dist/config-0UIohTS7.cjs +0 -1
- package/dist/config-Dt9NtCPl.js +0 -566
- package/dist/data-explanation-BktvER5B.cjs +0 -1
- package/dist/data-explanation-C_J6jYNi.js +0 -16
- package/dist/defaults-DXhiM1ZD.js +0 -10
- package/dist/defaults-xhmcLLrf.cjs +0 -1
- package/dist/designer-Ci1LizA9.js +0 -5020
- package/dist/designer-rtmVIIdN.cjs +0 -2
- package/dist/grid-strokes-Cr7DwUux.cjs +0 -1
- package/dist/grid-strokes-DyyG1q_o.js +0 -53
- package/dist/json-snapshot-BeFT3Tso.js +0 -1952
- package/dist/json-snapshot-D1NTP2oI.cjs +0 -2
- package/dist/matrix-DVyWiYsd.cjs +0 -1
- package/dist/matrix-yZsGnldA.js +0 -227
- package/dist/page-window-index-CIuT4BAv.js +0 -43
- package/dist/page-window-index-DEjnM6IB.cjs +0 -1
- package/dist/param-validation-BlHHXs6u.js +0 -153
- package/dist/param-validation-DCK039V1.cjs +0 -1
- package/dist/progress-7OSZbFok.js +0 -39
- package/dist/progress-BnLiS5eH.cjs +0 -1
- package/dist/render-plan-7xpGrCEl.cjs +0 -1
- package/dist/render-plan-Ck6koX9L.js +0 -13
- package/dist/style-CQ1PK8ZB.js +0 -67
- package/dist/style-UgIJSA1F.cjs +0 -1
- package/dist/task-events-DQ276fn2.cjs +0 -1
- package/dist/task-events-Dpsvf_t2.js +0 -47
- package/dist/template-bindings-BJR4k7qZ.cjs +0 -1
- package/dist/template-bindings-Daui7hLF.js +0 -252
- package/dist/template-registry-COXDEJEM.js +0 -570
- package/dist/template-registry-D3SjENi6.cjs +0 -1
- package/dist/validate-BJ5HIWY8.cjs +0 -1
- package/dist/validate-CkQBWCeg.js +0 -163
package/dist/pdf.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./font-loader-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./font-loader-EKLzOJxf.cjs"),t=require("./pdf-ByVCb1i6.cjs");exports.clearFontCache=e.clearFontCache;exports.configureFontCache=e.configureFontCache;exports.getFontCacheStats=e.getFontCacheStats;exports.invalidateFontCache=e.invalidateFontCache;exports.loadFontWithCache=e.loadFontWithCache;exports.createFontBytesMeasurer=t.createFontBytesMeasurer;exports.renderPlanToPdf=t.renderPlanToPdf;
|
package/dist/pdf.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ declare interface AssetRenderBudget {
|
|
|
9
9
|
maxDurationMs?: number;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
declare interface AssetRenderOptions extends OutputDiagnosticOptions {
|
|
12
|
+
declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMediaOptions {
|
|
13
13
|
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
14
14
|
assetBudget?: AssetRenderBudget;
|
|
15
15
|
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
@@ -139,6 +139,8 @@ export declare interface FontLoadOptions {
|
|
|
139
139
|
export declare function getFontCacheStats(): FontCacheStats;
|
|
140
140
|
|
|
141
141
|
declare interface GridCell {
|
|
142
|
+
/** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
|
|
143
|
+
richParagraphs?: RichParagraph[];
|
|
142
144
|
text?: string;
|
|
143
145
|
rawText?: string;
|
|
144
146
|
/** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
|
|
@@ -164,6 +166,19 @@ declare interface GridCell {
|
|
|
164
166
|
|
|
165
167
|
declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
166
168
|
|
|
169
|
+
/** Bounded binary image inspection shared by PDF, Excel and template import. No decoder is loaded. */
|
|
170
|
+
export declare interface ImageMediaOptions {
|
|
171
|
+
maxImageBytes?: number;
|
|
172
|
+
maxTotalImageBytes?: number;
|
|
173
|
+
maxImages?: number;
|
|
174
|
+
/** Decoded pixels per unique image, default 16 million. */
|
|
175
|
+
maxImagePixels?: number;
|
|
176
|
+
/** Total decoded pixels for unique media, default 64 million. */
|
|
177
|
+
maxTotalImagePixels?: number;
|
|
178
|
+
/** Maximum source dimension, default 16384 pixels. */
|
|
179
|
+
maxImageDimension?: number;
|
|
180
|
+
}
|
|
181
|
+
|
|
167
182
|
/** Invalidating or clearing also fences late downloads from repopulating the cache. */
|
|
168
183
|
export declare function invalidateFontCache(url: string): Promise<void>;
|
|
169
184
|
|
|
@@ -175,7 +190,7 @@ export declare function invalidateFontCache(url: string): Promise<void>;
|
|
|
175
190
|
export declare function loadFontWithCache(url: string, options?: FontLoadOptions): Promise<Uint8Array | null>;
|
|
176
191
|
|
|
177
192
|
declare interface OutputDiagnostic {
|
|
178
|
-
code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
193
|
+
code: "invalid-image-data" | "image-budget-exceeded" | "component-render-failed" | "unsupported-text" | "output-degraded" | "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
179
194
|
severity: "warning";
|
|
180
195
|
format: OutputFormat;
|
|
181
196
|
pageIndex: number;
|
|
@@ -210,7 +225,7 @@ export declare type PdfDocumentHandle = {
|
|
|
210
225
|
save(): Promise<Uint8Array>;
|
|
211
226
|
};
|
|
212
227
|
|
|
213
|
-
export declare interface PdfRenderOptions extends AssetRenderOptions, OutputTaskOptions {
|
|
228
|
+
export declare interface PdfRenderOptions extends AssetRenderOptions, OutputTaskOptions, ImageMediaOptions {
|
|
214
229
|
/** 嵌入字体字节(TTF,如黑体);缺省用 Helvetica(不支持 CJK) */
|
|
215
230
|
customFontBytes?: Uint8Array | ArrayBuffer;
|
|
216
231
|
customFontName?: string;
|
|
@@ -315,6 +330,8 @@ export declare function renderPlanToPdf(plan: RenderPlan, options?: PdfRenderOpt
|
|
|
315
330
|
|
|
316
331
|
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
317
332
|
declare interface ReportCellSource {
|
|
333
|
+
/** Source identity across report occurrences; sharing must be explicitly declared. */
|
|
334
|
+
sourceScope?: string;
|
|
318
335
|
datasetId: string;
|
|
319
336
|
rowKey: string | number;
|
|
320
337
|
field: string;
|
package/dist/pdf.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare interface AssetRenderBudget {
|
|
|
9
9
|
maxDurationMs?: number;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
declare interface AssetRenderOptions extends OutputDiagnosticOptions {
|
|
12
|
+
declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMediaOptions {
|
|
13
13
|
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
14
14
|
assetBudget?: AssetRenderBudget;
|
|
15
15
|
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
@@ -139,6 +139,8 @@ export declare interface FontLoadOptions {
|
|
|
139
139
|
export declare function getFontCacheStats(): FontCacheStats;
|
|
140
140
|
|
|
141
141
|
declare interface GridCell {
|
|
142
|
+
/** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
|
|
143
|
+
richParagraphs?: RichParagraph[];
|
|
142
144
|
text?: string;
|
|
143
145
|
rawText?: string;
|
|
144
146
|
/** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
|
|
@@ -164,6 +166,19 @@ declare interface GridCell {
|
|
|
164
166
|
|
|
165
167
|
declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
166
168
|
|
|
169
|
+
/** Bounded binary image inspection shared by PDF, Excel and template import. No decoder is loaded. */
|
|
170
|
+
export declare interface ImageMediaOptions {
|
|
171
|
+
maxImageBytes?: number;
|
|
172
|
+
maxTotalImageBytes?: number;
|
|
173
|
+
maxImages?: number;
|
|
174
|
+
/** Decoded pixels per unique image, default 16 million. */
|
|
175
|
+
maxImagePixels?: number;
|
|
176
|
+
/** Total decoded pixels for unique media, default 64 million. */
|
|
177
|
+
maxTotalImagePixels?: number;
|
|
178
|
+
/** Maximum source dimension, default 16384 pixels. */
|
|
179
|
+
maxImageDimension?: number;
|
|
180
|
+
}
|
|
181
|
+
|
|
167
182
|
/** Invalidating or clearing also fences late downloads from repopulating the cache. */
|
|
168
183
|
export declare function invalidateFontCache(url: string): Promise<void>;
|
|
169
184
|
|
|
@@ -175,7 +190,7 @@ export declare function invalidateFontCache(url: string): Promise<void>;
|
|
|
175
190
|
export declare function loadFontWithCache(url: string, options?: FontLoadOptions): Promise<Uint8Array | null>;
|
|
176
191
|
|
|
177
192
|
declare interface OutputDiagnostic {
|
|
178
|
-
code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
193
|
+
code: "invalid-image-data" | "image-budget-exceeded" | "component-render-failed" | "unsupported-text" | "output-degraded" | "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
179
194
|
severity: "warning";
|
|
180
195
|
format: OutputFormat;
|
|
181
196
|
pageIndex: number;
|
|
@@ -210,7 +225,7 @@ export declare type PdfDocumentHandle = {
|
|
|
210
225
|
save(): Promise<Uint8Array>;
|
|
211
226
|
};
|
|
212
227
|
|
|
213
|
-
export declare interface PdfRenderOptions extends AssetRenderOptions, OutputTaskOptions {
|
|
228
|
+
export declare interface PdfRenderOptions extends AssetRenderOptions, OutputTaskOptions, ImageMediaOptions {
|
|
214
229
|
/** 嵌入字体字节(TTF,如黑体);缺省用 Helvetica(不支持 CJK) */
|
|
215
230
|
customFontBytes?: Uint8Array | ArrayBuffer;
|
|
216
231
|
customFontName?: string;
|
|
@@ -315,6 +330,8 @@ export declare function renderPlanToPdf(plan: RenderPlan, options?: PdfRenderOpt
|
|
|
315
330
|
|
|
316
331
|
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
317
332
|
declare interface ReportCellSource {
|
|
333
|
+
/** Source identity across report occurrences; sharing must be explicitly declared. */
|
|
334
|
+
sourceScope?: string;
|
|
318
335
|
datasetId: string;
|
|
319
336
|
rowKey: string | number;
|
|
320
337
|
field: string;
|
package/dist/pdf.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { clearFontCache as t, configureFontCache as o, getFontCacheStats as r, invalidateFontCache as n, loadFontWithCache as c } from "./font-loader-
|
|
2
|
-
import { c as F, r as s } from "./pdf-
|
|
1
|
+
import { clearFontCache as t, configureFontCache as o, getFontCacheStats as r, invalidateFontCache as n, loadFontWithCache as c } from "./font-loader-CzI1GuBc.js";
|
|
2
|
+
import { c as F, r as s } from "./pdf-DJ5S6ukC.js";
|
|
3
3
|
export {
|
|
4
4
|
t as clearFontCache,
|
|
5
5
|
o as configureFontCache,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineAsyncComponent as c, computed as m } from "vue";
|
|
2
2
|
import { b as i, c as l, a as s } from "./injection-keys-e85udZCp.js";
|
|
3
|
-
import { g as d } from "./report-params-
|
|
4
|
-
const p = c(() => import("./ReportPreview-
|
|
3
|
+
import { g as d } from "./report-params-B1RzkhJj.js";
|
|
4
|
+
const p = c(() => import("./ReportPreview-BcDKCLiK.js").then((r) => r.s)), _ = {
|
|
5
5
|
install(r, e = {}) {
|
|
6
6
|
let t = e.fetcher;
|
|
7
7
|
if (!t && e.reports) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var R=Object.create;var f=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var m=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of P(e))!p.call(r,o)&&o!==t&&f(r,o,{get:()=>e[o],enumerable:!(n=u(e,o))||n.enumerable});return r};var E=(r,e,t)=>(t=r!=null?R(d(r)):{},m(e||!r||!r.__esModule?f(t,"default",{value:r,enumerable:!0}):t,r));const l=require("vue"),i=require("./injection-keys-Db_DyLkm.cjs"),h=require("./report-params-
|
|
1
|
+
"use strict";var R=Object.create;var f=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var m=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of P(e))!p.call(r,o)&&o!==t&&f(r,o,{get:()=>e[o],enumerable:!(n=u(e,o))||n.enumerable});return r};var E=(r,e,t)=>(t=r!=null?R(d(r)):{},m(e||!r||!r.__esModule?f(t,"default",{value:r,enumerable:!0}):t,r));const l=require("vue"),i=require("./injection-keys-Db_DyLkm.cjs"),h=require("./report-params-WDGrA4oP.cjs"),s=l.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ReportPreview-Bk9nLfO9.cjs")).then(r=>r.ReportPreview$1)),v={install(r,e={}){let t=e.fetcher;if(!t&&e.reports){const n=e.reports;let o;t=async c=>(o??=import("@agile-team/mach-report").then(({createReportSource:a})=>a(n)),(await o)(c)),t.getParamDefs=c=>h.getReportParamDefs(n,c)}t&&r.provide(i.MACH_REPORT_FETCHER_KEY,t),e.pdfExporter&&r.provide(i.MACH_REPORT_PDF_EXPORTER_KEY,e.pdfExporter),r.provide(i.MACH_REPORT_CONFIG_KEY,l.computed(()=>{if(e.pdfFontUrl===void 0)return e.config??null;const n=e.config??{defaults:{},presets:{}};return{...n,defaults:{...n.defaults,pdfFontUrl:e.pdfFontUrl}}})),e.globalComponent!==!1&&!r.component("MachReportPreview")&&r.component("MachReportPreview",s)}};exports.MachReportPreview=s;exports.machReportPlugin=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./json-snapshot-DknkjvxP.cjs"),a=require("./sha256-BshdOkCC.cjs");function y(r){return r&&{...r}}function g(r){if(!r)return;const t=e=>{if(!(e instanceof Uint8Array)&&!(e instanceof ArrayBuffer))throw new i.ReportSourceError("validate","字体应为 Uint8Array 或 ArrayBuffer");if(e.byteLength>32e6)throw new a.ReportRuntimeError("budget","单份字体超过 32 MB","$.pdf");return new Uint8Array(e instanceof Uint8Array?e:new Uint8Array(e))};if(r.customFontFaces){const e=r.customFontFaces;return{customFontName:r.customFontName,customFontFaces:{regular:t(e.regular),...e.bold?{bold:t(e.bold)}:{},...e.italic?{italic:t(e.italic)}:{},...e.boldItalic?{boldItalic:t(e.boldItalic)}:{}}}}return{customFontName:r.customFontName,...r.customFontBytes?{customFontBytes:t(r.customFontBytes)}:{}}}function f(r){const t=r?.customFontFaces??(r?.customFontBytes?{regular:r.customFontBytes}:void 0);if(!t)return;const e=["regular","bold","italic","boldItalic"].map(o=>{const n=t[o];if(!n)return[o,null];const s=n instanceof Uint8Array?n:new Uint8Array(n);if(s.byteLength>32e6)throw new a.ReportRuntimeError("budget","单份字体超过 32 MB","$.pdf");return[o,a.portableSha256Hex(s)]});return a.portableSha256Hex(new TextEncoder().encode(JSON.stringify(e)))}const d=new WeakMap;function w(r,t,e){const o=u(r,t,e);let n=!0;return{prepared:o,forward(){if(!n)throw new Error("报表快照只能交接一次");return n=!1,d.set(o,t),o}}}function u(r,t,e){if(a.throwIfAborted(e),!Number.isSafeInteger(t)||t<=0)throw new a.ReportRuntimeError("budget","快照预算应为正安全整数","$.budget.maxPreparedBytes");const o=d.get(r);if(d.delete(r),o!==void 0&&o<=t)return r;const n=i.snapshotReportJson(r,{maxBytes:t,maxNodes:t,check:()=>a.throwIfAborted(e),error:(s,c)=>s==="budget"?new a.ReportRuntimeError("budget",c,"$.budget.maxPreparedBytes"):new i.ReportSourceError("validate",c)});return l(n),n}function p(r){if(r===void 0)return!0;if(!Array.isArray(r))return!1;const t=new Set;return r.every(e=>!e||typeof e!="object"||Array.isArray(e)||typeof e.reportId!="string"||!e.reportId.trim()||!Number.isSafeInteger(e.reportIndex)||e.reportIndex<0||t.has(e.reportIndex)||typeof e.reportScope!="string"||!e.reportScope.trim()||e.reportScope.length>4096||e.revision!==void 0&&typeof e.revision!="string"||e.sourceToken!==void 0&&typeof e.sourceToken!="string"?!1:(t.add(e.reportIndex),!0))}function l(r){if(!p(r.sources))throw new i.ReportSourceError("validate","准备结果来源清单无效");if(!r?.stats||["rows","pages","cells"].some(t=>!Number.isSafeInteger(r.stats[t])||r.stats[t]<0)||!Number.isFinite(r.stats.durationMs)||r.stats.durationMs<0)throw new i.ReportSourceError("validate","准备结果统计无效");if(!Array.isArray(r.diagnostics)||r.diagnostics.some(t=>!t||typeof t.code!="string"||typeof t.message!="string"||!["info","warning","error"].includes(t.severity)||!i.hasValidDataExplanation(t)))throw new i.ReportSourceError("validate","准备结果诊断无效");if(!r.revisions||typeof r.revisions!="object"||Array.isArray(r.revisions)||Object.values(r.revisions).some(t=>!t||typeof t!="object"||t.revision!==void 0&&typeof t.revision!="string"||t.sourceToken!==void 0&&typeof t.sourceToken!="string"))throw new i.ReportSourceError("validate","准备结果修订无效");if(r.layout&&(!["heuristic","provided","font-bytes"].includes(r.layout.textMetrics)||r.layout.fontFingerprint!==void 0&&!/^[a-f0-9]{64}$/.test(r.layout.fontFingerprint)))throw new i.ReportSourceError("validate","准备结果字体度量标识无效")}function v(r){if(r.layoutPolicy!==void 0&&!["verify","preserve"].includes(r.layoutPolicy))throw new i.ReportSourceError("validate","无效的 layoutPolicy");if(r.format!=="pdf")return;if(r.layoutPolicy==="preserve"&&!r.prepared.layout?.fontFingerprint){r.prepared.diagnostics.push({code:"prepared-layout-preserved",severity:"info",message:"显式保持现有分页与几何;未验证排版字体身份,实际 PDF 输出仍遵循 fidelity 校验。"});return}const t=r.prepared.layout?.fontFingerprint,e=f(r.pdf);if(t===e&&(t!==void 0||r.prepared.layout?.textMetrics==="heuristic"&&!e))return;const o="已准备计划的字体度量无法与本次 PDF 字体确认一致;保持现有分页,未重新查询或排版。请在 prepare 和 exportPrepared 提供相同字体字节。";if(r.fidelity==="strict")throw new i.ReportSourceError("validate",o);r.prepared.diagnostics.push({code:"prepared-font-metrics",severity:"warning",message:o})}exports.capturePreparedHandoff=w;exports.checkPreparedFont=v;exports.reportFontFingerprint=f;exports.snapshotPdfFonts=g;exports.snapshotPreparedReport=u;exports.snapshotXlsxOptions=y;exports.validPreparedSources=p;exports.validatePreparedMetadata=l;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { R as n, t as u, s as y } from "./json-snapshot-D6ioHth9.js";
|
|
2
|
+
import { R as s, t as c, p as l } from "./sha256-DTG-Gq8i.js";
|
|
3
|
+
function F(e) {
|
|
4
|
+
return e && { ...e };
|
|
5
|
+
}
|
|
6
|
+
function A(e) {
|
|
7
|
+
if (!e) return;
|
|
8
|
+
const t = (r) => {
|
|
9
|
+
if (!(r instanceof Uint8Array) && !(r instanceof ArrayBuffer)) throw new n("validate", "字体应为 Uint8Array 或 ArrayBuffer");
|
|
10
|
+
if (r.byteLength > 32e6) throw new s("budget", "单份字体超过 32 MB", "$.pdf");
|
|
11
|
+
return new Uint8Array(r instanceof Uint8Array ? r : new Uint8Array(r));
|
|
12
|
+
};
|
|
13
|
+
if (e.customFontFaces) {
|
|
14
|
+
const r = e.customFontFaces;
|
|
15
|
+
return { customFontName: e.customFontName, customFontFaces: { regular: t(r.regular), ...r.bold ? { bold: t(r.bold) } : {}, ...r.italic ? { italic: t(r.italic) } : {}, ...r.boldItalic ? { boldItalic: t(r.boldItalic) } : {} } };
|
|
16
|
+
}
|
|
17
|
+
return { customFontName: e.customFontName, ...e.customFontBytes ? { customFontBytes: t(e.customFontBytes) } : {} };
|
|
18
|
+
}
|
|
19
|
+
function p(e) {
|
|
20
|
+
const t = e?.customFontFaces ?? (e?.customFontBytes ? { regular: e.customFontBytes } : void 0);
|
|
21
|
+
if (!t) return;
|
|
22
|
+
const r = ["regular", "bold", "italic", "boldItalic"].map((o) => {
|
|
23
|
+
const i = t[o];
|
|
24
|
+
if (!i) return [o, null];
|
|
25
|
+
const a = i instanceof Uint8Array ? i : new Uint8Array(i);
|
|
26
|
+
if (a.byteLength > 32e6) throw new s("budget", "单份字体超过 32 MB", "$.pdf");
|
|
27
|
+
return [o, l(a)];
|
|
28
|
+
});
|
|
29
|
+
return l(new TextEncoder().encode(JSON.stringify(r)));
|
|
30
|
+
}
|
|
31
|
+
const d = /* @__PURE__ */ new WeakMap();
|
|
32
|
+
function h(e, t, r) {
|
|
33
|
+
const o = g(e, t, r);
|
|
34
|
+
let i = !0;
|
|
35
|
+
return { prepared: o, forward() {
|
|
36
|
+
if (!i) throw new Error("报表快照只能交接一次");
|
|
37
|
+
return i = !1, d.set(o, t), o;
|
|
38
|
+
} };
|
|
39
|
+
}
|
|
40
|
+
function g(e, t, r) {
|
|
41
|
+
if (c(r), !Number.isSafeInteger(t) || t <= 0) throw new s("budget", "快照预算应为正安全整数", "$.budget.maxPreparedBytes");
|
|
42
|
+
const o = d.get(e);
|
|
43
|
+
if (d.delete(e), o !== void 0 && o <= t) return e;
|
|
44
|
+
const i = y(e, {
|
|
45
|
+
maxBytes: t,
|
|
46
|
+
maxNodes: t,
|
|
47
|
+
check: () => c(r),
|
|
48
|
+
error: (a, f) => a === "budget" ? new s("budget", f, "$.budget.maxPreparedBytes") : new n("validate", f)
|
|
49
|
+
});
|
|
50
|
+
return v(i), i;
|
|
51
|
+
}
|
|
52
|
+
function w(e) {
|
|
53
|
+
if (e === void 0) return !0;
|
|
54
|
+
if (!Array.isArray(e)) return !1;
|
|
55
|
+
const t = /* @__PURE__ */ new Set();
|
|
56
|
+
return e.every((r) => !r || typeof r != "object" || Array.isArray(r) || typeof r.reportId != "string" || !r.reportId.trim() || !Number.isSafeInteger(r.reportIndex) || r.reportIndex < 0 || t.has(r.reportIndex) || typeof r.reportScope != "string" || !r.reportScope.trim() || r.reportScope.length > 4096 || r.revision !== void 0 && typeof r.revision != "string" || r.sourceToken !== void 0 && typeof r.sourceToken != "string" ? !1 : (t.add(r.reportIndex), !0));
|
|
57
|
+
}
|
|
58
|
+
function v(e) {
|
|
59
|
+
if (!w(e.sources)) throw new n("validate", "准备结果来源清单无效");
|
|
60
|
+
if (!e?.stats || ["rows", "pages", "cells"].some((t) => !Number.isSafeInteger(e.stats[t]) || e.stats[t] < 0) || !Number.isFinite(e.stats.durationMs) || e.stats.durationMs < 0) throw new n("validate", "准备结果统计无效");
|
|
61
|
+
if (!Array.isArray(e.diagnostics) || e.diagnostics.some((t) => !t || typeof t.code != "string" || typeof t.message != "string" || !["info", "warning", "error"].includes(t.severity) || !u(t))) throw new n("validate", "准备结果诊断无效");
|
|
62
|
+
if (!e.revisions || typeof e.revisions != "object" || Array.isArray(e.revisions) || Object.values(e.revisions).some((t) => !t || typeof t != "object" || t.revision !== void 0 && typeof t.revision != "string" || t.sourceToken !== void 0 && typeof t.sourceToken != "string")) throw new n("validate", "准备结果修订无效");
|
|
63
|
+
if (e.layout && (!["heuristic", "provided", "font-bytes"].includes(e.layout.textMetrics) || e.layout.fontFingerprint !== void 0 && !/^[a-f0-9]{64}$/.test(e.layout.fontFingerprint))) throw new n("validate", "准备结果字体度量标识无效");
|
|
64
|
+
}
|
|
65
|
+
function P(e) {
|
|
66
|
+
if (e.layoutPolicy !== void 0 && !["verify", "preserve"].includes(e.layoutPolicy)) throw new n("validate", "无效的 layoutPolicy");
|
|
67
|
+
if (e.format !== "pdf") return;
|
|
68
|
+
if (e.layoutPolicy === "preserve" && !e.prepared.layout?.fontFingerprint) {
|
|
69
|
+
e.prepared.diagnostics.push({ code: "prepared-layout-preserved", severity: "info", message: "显式保持现有分页与几何;未验证排版字体身份,实际 PDF 输出仍遵循 fidelity 校验。" });
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const t = e.prepared.layout?.fontFingerprint, r = p(e.pdf);
|
|
73
|
+
if (t === r && (t !== void 0 || e.prepared.layout?.textMetrics === "heuristic" && !r)) return;
|
|
74
|
+
const o = "已准备计划的字体度量无法与本次 PDF 字体确认一致;保持现有分页,未重新查询或排版。请在 prepare 和 exportPrepared 提供相同字体字节。";
|
|
75
|
+
if (e.fidelity === "strict") throw new n("validate", o);
|
|
76
|
+
e.prepared.diagnostics.push({ code: "prepared-font-metrics", severity: "warning", message: o });
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
F as a,
|
|
80
|
+
w as b,
|
|
81
|
+
h as c,
|
|
82
|
+
g as d,
|
|
83
|
+
P as e,
|
|
84
|
+
p as r,
|
|
85
|
+
A as s,
|
|
86
|
+
v
|
|
87
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function o(t){if(t?.aborted)throw t.reason??new DOMException("The operation was aborted.","AbortError")}function c(t){try{Promise.resolve(t()).catch(()=>{})}catch{}}function b(t,e,r){o(t.signal),c(()=>t.onProgress?.(e,r)),o(t.signal)}function d(t,e){const r=Promise.resolve(t);return e?.aborted?(r.catch(()=>{}),Promise.reject(e.reason??new DOMException("The operation was aborted.","AbortError"))):e?new Promise((n,u)=>{const a=()=>e.removeEventListener("abort",i),i=()=>{a(),u(e.reason??new DOMException("The operation was aborted.","AbortError"))};e.addEventListener("abort",i,{once:!0}),r.then(s=>{a(),n(s)},s=>{a(),u(s)}),e.aborted&&i()}):r}function f(t,e){const r=()=>e.abort(t?.reason);return t?.addEventListener("abort",r,{once:!0}),t?.aborted&&r(),()=>t?.removeEventListener("abort",r)}async function w(t,e,r){b(t,e,r),(t.signal||t.onProgress)&&await new Promise(n=>setTimeout(n,0)),o(t.signal)}function p(t){let e=0,r=Date.now();return(n=1)=>{if(o(t.signal),e+=n,!(e<4096&&Date.now()-r<8))return e=0,new Promise(u=>setTimeout(u,0)).then(()=>{r=Date.now(),o(t.signal)})}}exports.assertOutputActive=o;exports.createOutputScheduler=p;exports.forwardOutputAbort=f;exports.notifyOutputProgress=b;exports.observeOutput=c;exports.outputCheckpoint=w;exports.waitForOutput=d;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function s(o) {
|
|
2
|
+
if (o?.aborted) throw o.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
3
|
+
}
|
|
4
|
+
function u(o) {
|
|
5
|
+
try {
|
|
6
|
+
Promise.resolve(o()).catch(() => {
|
|
7
|
+
});
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function b(o, e) {
|
|
12
|
+
const r = Promise.resolve(o);
|
|
13
|
+
return e?.aborted ? (r.catch(() => {
|
|
14
|
+
}), Promise.reject(e.reason ?? new DOMException("The operation was aborted.", "AbortError"))) : e ? new Promise((i, c) => {
|
|
15
|
+
const t = () => e.removeEventListener("abort", n), n = () => {
|
|
16
|
+
t(), c(e.reason ?? new DOMException("The operation was aborted.", "AbortError"));
|
|
17
|
+
};
|
|
18
|
+
e.addEventListener("abort", n, { once: !0 }), r.then((a) => {
|
|
19
|
+
t(), i(a);
|
|
20
|
+
}, (a) => {
|
|
21
|
+
t(), c(a);
|
|
22
|
+
}), e.aborted && n();
|
|
23
|
+
}) : r;
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
s as a,
|
|
27
|
+
u as o,
|
|
28
|
+
b as w
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(e){if(e?.aborted)throw e.reason??new DOMException("The operation was aborted.","AbortError")}function s(e){try{Promise.resolve(e()).catch(()=>{})}catch{}}function b(e,t){const r=Promise.resolve(e);return t?.aborted?(r.catch(()=>{}),Promise.reject(t.reason??new DOMException("The operation was aborted.","AbortError"))):t?new Promise((a,c)=>{const o=()=>t.removeEventListener("abort",n),n=()=>{o(),c(t.reason??new DOMException("The operation was aborted.","AbortError"))};t.addEventListener("abort",n,{once:!0}),r.then(u=>{o(),a(u)},u=>{o(),c(u)}),t.aborted&&n()}):r}exports.assertOutputActive=i;exports.observeOutput=s;exports.waitForOutput=b;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
function n(e) {
|
|
2
|
+
if (e?.aborted) throw e.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
3
|
+
}
|
|
4
|
+
function c(e) {
|
|
5
|
+
try {
|
|
6
|
+
Promise.resolve(e()).catch(() => {
|
|
7
|
+
});
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function b(e, t, r) {
|
|
12
|
+
n(e.signal), c(() => e.onProgress?.(t, r)), n(e.signal);
|
|
13
|
+
}
|
|
14
|
+
function d(e, t) {
|
|
15
|
+
const r = Promise.resolve(e);
|
|
16
|
+
return t?.aborted ? (r.catch(() => {
|
|
17
|
+
}), Promise.reject(t.reason ?? new DOMException("The operation was aborted.", "AbortError"))) : t ? new Promise((o, a) => {
|
|
18
|
+
const s = () => t.removeEventListener("abort", i), i = () => {
|
|
19
|
+
s(), a(t.reason ?? new DOMException("The operation was aborted.", "AbortError"));
|
|
20
|
+
};
|
|
21
|
+
t.addEventListener("abort", i, { once: !0 }), r.then((u) => {
|
|
22
|
+
s(), o(u);
|
|
23
|
+
}, (u) => {
|
|
24
|
+
s(), a(u);
|
|
25
|
+
}), t.aborted && i();
|
|
26
|
+
}) : r;
|
|
27
|
+
}
|
|
28
|
+
function f(e, t) {
|
|
29
|
+
const r = () => t.abort(e?.reason);
|
|
30
|
+
return e?.addEventListener("abort", r, { once: !0 }), e?.aborted && r(), () => e?.removeEventListener("abort", r);
|
|
31
|
+
}
|
|
32
|
+
async function w(e, t, r) {
|
|
33
|
+
b(e, t, r), (e.signal || e.onProgress) && await new Promise((o) => setTimeout(o, 0)), n(e.signal);
|
|
34
|
+
}
|
|
35
|
+
function v(e) {
|
|
36
|
+
let t = 0, r = Date.now();
|
|
37
|
+
return (o = 1) => {
|
|
38
|
+
if (n(e.signal), t += o, !(t < 4096 && Date.now() - r < 8))
|
|
39
|
+
return t = 0, new Promise((a) => setTimeout(a, 0)).then(() => {
|
|
40
|
+
r = Date.now(), n(e.signal);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
c as a,
|
|
46
|
+
n as b,
|
|
47
|
+
v as c,
|
|
48
|
+
f,
|
|
49
|
+
b as n,
|
|
50
|
+
w as o,
|
|
51
|
+
d as w
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const f=require("./prepared-DdrjLC7L.cjs"),c=require("./json-snapshot-DknkjvxP.cjs"),a=require("./template-registry-C62vpv4a.cjs"),i="mach-report-worker/1";class d extends Error{constructor(t){super(t.message),this.name=t.name,this.code=t.code,this.path=t.path,this.issues=t.issues,this.diagnostics=t.diagnostics}}function o(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}function y(r){return o(r)?["rows","pages","cells"].every(t=>typeof r[t]=="number"&&Number.isSafeInteger(r[t])&&r[t]>=0)&&typeof r.durationMs=="number"&&Number.isFinite(r.durationMs)&&r.durationMs>=0:!1}function g(r){return Array.isArray(r)&&r.every(t=>o(t)&&typeof t.code=="string"&&typeof t.message=="string"&&["info","warning","error"].includes(t.severity)&&c.hasValidDataExplanation(t))}function m(r){return o(r)&&Object.values(r).every(t=>o(t)&&(t.revision===void 0||typeof t.revision=="string")&&(t.sourceToken===void 0||typeof t.sourceToken=="string"))}function u(r){return r===void 0?!0:o(r)&&["heuristic","provided","font-bytes"].includes(r.textMetrics)&&(r.fontFingerprint===void 0||typeof r.fontFingerprint=="string"&&/^[a-f0-9]{64}$/.test(r.fontFingerprint))}function R(r,t){if(!o(r)||!y(r.stats)||!g(r.diagnostics)||!m(r.revisions)||!u(r.layout)||!f.validPreparedSources(r.sources))return!1;if(t==="prepare")return a.validateRenderPlan(r.plan).ok;const e=r.format==="pdf"?"application/pdf":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";return r.bytes instanceof Uint8Array&&(r.format==="pdf"||r.format==="xlsx")&&r.contentType===e}function n(r){if(!r||typeof r!="object")return{message:String(r)};const t={};for(const e of["code","path","field","message"]){const s=r[e];typeof s=="string"&&(t[e]=s)}return t}function k(r){const t=n(r);if(!o(r))return t;for(const e of["format","severity","kind","nid"])typeof r[e]=="string"&&(t[e]=r[e]);for(const e of["pageIndex","componentIndex"])Number.isSafeInteger(r[e])&&r[e]>=0&&(t[e]=r[e]);return Array.isArray(r.componentPath)&&r.componentPath.every(e=>Number.isSafeInteger(e)&&e>=0)&&(t.componentPath=r.componentPath),t}function p(r){if(!(r instanceof Error))return{name:"Error",message:String(r)};const t=r;return{name:r.name,message:r.message,...typeof t.code=="string"?{code:t.code}:{},...typeof t.path=="string"?{path:t.path}:{},...Array.isArray(t.issues)?{issues:t.issues.map(n)}:{},...Array.isArray(t.diagnostics)?{diagnostics:t.diagnostics.map(k)}:{}}}function h(r){if(!r||typeof r!="object")return!1;const t=r;return t.protocol===i&&typeof t.id=="string"&&(t.operation==="prepare"||t.operation==="export"||t.operation==="exportPrepared")&&!!t.input&&typeof t.input=="object"}async function b(r,t,e){try{const s=t.operation==="prepare"?await r.prepare({...t.input,onEvent:e}):t.operation==="exportPrepared"?await r.exportPrepared({...t.input,onEvent:e}):await r.export({...t.input,onEvent:e});return{protocol:i,id:t.id,result:s}}catch(s){return{protocol:i,id:t.id,error:p(s)}}}function I(r){const t=r.result;return!t||!("bytes"in t)||!(t.bytes.buffer instanceof ArrayBuffer)?[]:[t.bytes.buffer]}function W(r,t){if(!o(r)||typeof r.taskId!="string"||!r.taskId||t.taskId!==void 0&&r.taskId!==t.taskId||r.correlationId!==t.correlationId||r.reportId!==void 0&&(typeof r.reportId!="string"||!("reportIds"in t&&t.reportIds.includes(r.reportId)))||!["query","validate","layout","assets","encode"].includes(r.stage)||!["started","completed","failed"].includes(r.status))return!1;for(const e of["completed","total"])if(r[e]!==void 0&&(typeof r[e]!="number"||!Number.isFinite(r[e])||r[e]<0))return!1;return r.completed===void 0||r.total===void 0||r.completed<=r.total}exports.REPORT_WORKER_PROTOCOL=i;exports.ReportWorkerError=d;exports.isReportWorkerRequest=h;exports.reportWorkerTransferList=I;exports.runReportWorkerRequest=b;exports.serializeError=p;exports.validReportWorkerEvent=W;exports.validReportWorkerResult=R;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { b as f } from "./prepared-DqtpvRTn.js";
|
|
2
|
+
import { t as a } from "./json-snapshot-D6ioHth9.js";
|
|
3
|
+
import { a as p } from "./template-registry-Cw3vRTX2.js";
|
|
4
|
+
const i = "mach-report-worker/1";
|
|
5
|
+
class I extends Error {
|
|
6
|
+
constructor(r) {
|
|
7
|
+
super(r.message), this.name = r.name, this.code = r.code, this.path = r.path, this.issues = r.issues, this.diagnostics = r.diagnostics;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function e(t) {
|
|
11
|
+
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
12
|
+
}
|
|
13
|
+
function c(t) {
|
|
14
|
+
return e(t) ? ["rows", "pages", "cells"].every((r) => typeof t[r] == "number" && Number.isSafeInteger(t[r]) && t[r] >= 0) && typeof t.durationMs == "number" && Number.isFinite(t.durationMs) && t.durationMs >= 0 : !1;
|
|
15
|
+
}
|
|
16
|
+
function d(t) {
|
|
17
|
+
return Array.isArray(t) && t.every((r) => e(r) && typeof r.code == "string" && typeof r.message == "string" && ["info", "warning", "error"].includes(r.severity) && a(r));
|
|
18
|
+
}
|
|
19
|
+
function m(t) {
|
|
20
|
+
return e(t) && Object.values(t).every((r) => e(r) && (r.revision === void 0 || typeof r.revision == "string") && (r.sourceToken === void 0 || typeof r.sourceToken == "string"));
|
|
21
|
+
}
|
|
22
|
+
function y(t) {
|
|
23
|
+
return t === void 0 ? !0 : e(t) && ["heuristic", "provided", "font-bytes"].includes(t.textMetrics) && (t.fontFingerprint === void 0 || typeof t.fontFingerprint == "string" && /^[a-f0-9]{64}$/.test(t.fontFingerprint));
|
|
24
|
+
}
|
|
25
|
+
function R(t, r) {
|
|
26
|
+
if (!e(t) || !c(t.stats) || !d(t.diagnostics) || !m(t.revisions) || !y(t.layout) || !f(t.sources)) return !1;
|
|
27
|
+
if (r === "prepare") return p(t.plan).ok;
|
|
28
|
+
const o = t.format === "pdf" ? "application/pdf" : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
29
|
+
return t.bytes instanceof Uint8Array && (t.format === "pdf" || t.format === "xlsx") && t.contentType === o;
|
|
30
|
+
}
|
|
31
|
+
function n(t) {
|
|
32
|
+
if (!t || typeof t != "object") return { message: String(t) };
|
|
33
|
+
const r = {};
|
|
34
|
+
for (const o of ["code", "path", "field", "message"]) {
|
|
35
|
+
const s = t[o];
|
|
36
|
+
typeof s == "string" && (r[o] = s);
|
|
37
|
+
}
|
|
38
|
+
return r;
|
|
39
|
+
}
|
|
40
|
+
function g(t) {
|
|
41
|
+
const r = n(t);
|
|
42
|
+
if (!e(t)) return r;
|
|
43
|
+
for (const o of ["format", "severity", "kind", "nid"]) typeof t[o] == "string" && (r[o] = t[o]);
|
|
44
|
+
for (const o of ["pageIndex", "componentIndex"]) Number.isSafeInteger(t[o]) && t[o] >= 0 && (r[o] = t[o]);
|
|
45
|
+
return Array.isArray(t.componentPath) && t.componentPath.every((o) => Number.isSafeInteger(o) && o >= 0) && (r.componentPath = t.componentPath), r;
|
|
46
|
+
}
|
|
47
|
+
function u(t) {
|
|
48
|
+
if (!(t instanceof Error)) return { name: "Error", message: String(t) };
|
|
49
|
+
const r = t;
|
|
50
|
+
return {
|
|
51
|
+
name: t.name,
|
|
52
|
+
message: t.message,
|
|
53
|
+
...typeof r.code == "string" ? { code: r.code } : {},
|
|
54
|
+
...typeof r.path == "string" ? { path: r.path } : {},
|
|
55
|
+
...Array.isArray(r.issues) ? { issues: r.issues.map(n) } : {},
|
|
56
|
+
...Array.isArray(r.diagnostics) ? { diagnostics: r.diagnostics.map(g) } : {}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function x(t) {
|
|
60
|
+
if (!t || typeof t != "object") return !1;
|
|
61
|
+
const r = t;
|
|
62
|
+
return r.protocol === i && typeof r.id == "string" && (r.operation === "prepare" || r.operation === "export" || r.operation === "exportPrepared") && !!r.input && typeof r.input == "object";
|
|
63
|
+
}
|
|
64
|
+
async function A(t, r, o) {
|
|
65
|
+
try {
|
|
66
|
+
const s = r.operation === "prepare" ? await t.prepare({ ...r.input, onEvent: o }) : r.operation === "exportPrepared" ? await t.exportPrepared({ ...r.input, onEvent: o }) : await t.export({ ...r.input, onEvent: o });
|
|
67
|
+
return { protocol: i, id: r.id, result: s };
|
|
68
|
+
} catch (s) {
|
|
69
|
+
return { protocol: i, id: r.id, error: u(s) };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function P(t) {
|
|
73
|
+
const r = t.result;
|
|
74
|
+
return !r || !("bytes" in r) || !(r.bytes.buffer instanceof ArrayBuffer) ? [] : [r.bytes.buffer];
|
|
75
|
+
}
|
|
76
|
+
function E(t, r) {
|
|
77
|
+
if (!e(t) || typeof t.taskId != "string" || !t.taskId || r.taskId !== void 0 && t.taskId !== r.taskId || t.correlationId !== r.correlationId || t.reportId !== void 0 && (typeof t.reportId != "string" || !("reportIds" in r && r.reportIds.includes(t.reportId))) || !["query", "validate", "layout", "assets", "encode"].includes(t.stage) || !["started", "completed", "failed"].includes(t.status)) return !1;
|
|
78
|
+
for (const o of ["completed", "total"]) if (t[o] !== void 0 && (typeof t[o] != "number" || !Number.isFinite(t[o]) || t[o] < 0)) return !1;
|
|
79
|
+
return t.completed === void 0 || t.total === void 0 || t.completed <= t.total;
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
i as R,
|
|
83
|
+
P as a,
|
|
84
|
+
I as b,
|
|
85
|
+
R as c,
|
|
86
|
+
x as i,
|
|
87
|
+
A as r,
|
|
88
|
+
u as s,
|
|
89
|
+
E as v
|
|
90
|
+
};
|