@agile-team/mach-report 2.21.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +16 -2
  2. package/dist/{ExcelBindingWizard-B2xXBOJu.cjs → ExcelBindingWizard-CW79I6Gl.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-CixTPQAL.js → ExcelBindingWizard-CZyppD7I.js} +3 -3
  4. package/dist/{ParamEditor-DhHlNxai.cjs → ParamEditor-CiYCJI0b.cjs} +1 -1
  5. package/dist/{ParamEditor-gKhvEsnr.js → ParamEditor-DQit-Gdf.js} +2 -2
  6. package/dist/{ReportBatchPanel-D-lyWKyf.js → ReportBatchPanel-DKTpV7MU.js} +2 -2
  7. package/dist/{ReportBatchPanel-BUdUfTdm.cjs → ReportBatchPanel-Db6TAfG5.cjs} +1 -1
  8. package/dist/ReportLabelStudio-B0i9ohQj.cjs +1 -0
  9. package/dist/ReportLabelStudio-BYnRqmje.js +780 -0
  10. package/dist/{ReportParamPanel-peB-KEmm.js → ReportParamPanel-BHSKVL8k.js} +231 -224
  11. package/dist/ReportParamPanel-lngONOEz.cjs +1 -0
  12. package/dist/ReportPreview-BDgKssYR.js +5887 -0
  13. package/dist/ReportPreview-Dw-4icG6.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-WZl-AK-2.js → ReportTemplateLibrary-BZuKn0YK.js} +1 -1
  15. package/dist/{ReportTemplateLibrary-Cs9WKneQ.cjs → ReportTemplateLibrary-DEXH07ND.cjs} +1 -1
  16. package/dist/{RuleEditor-DGpmjCko.js → RuleEditor-CIQn547x.js} +3 -3
  17. package/dist/{RuleEditor-Dtcq-7LO.cjs → RuleEditor-zSUmPjKa.cjs} +1 -1
  18. package/dist/{TemplateOutlinePanel-CkCh506f.cjs → TemplateOutlinePanel-B5SfGYVN.cjs} +1 -1
  19. package/dist/{TemplateOutlinePanel-cxp95OT9.js → TemplateOutlinePanel-D0PgOSQE.js} +2 -2
  20. package/dist/{TemplateReusePanel-BZ8VTtrO.js → TemplateReusePanel-BKlAEF8-.js} +2 -2
  21. package/dist/{TemplateReusePanel-CwttuSta.cjs → TemplateReusePanel-DAy_Hwqz.cjs} +1 -1
  22. package/dist/TemplateReviewPanel-CowmHaQQ.cjs +1 -0
  23. package/dist/{TemplateReviewPanel-C9cTvsRs.js → TemplateReviewPanel-div-EH_m.js} +2 -2
  24. package/dist/artifact-integrity.json +76 -76
  25. package/dist/{auto-Tq7ReIC1.cjs → auto-DcUHlKob.cjs} +1 -1
  26. package/dist/{auto-BkdGiNtr.js → auto-moShblh1.js} +4 -4
  27. package/dist/{designer-CIDHt5xz.js → designer-B7jJeAeG.js} +1500 -1455
  28. package/dist/{designer-CDqok4S5.cjs → designer-BWQVpJeN.cjs} +2 -2
  29. package/dist/designer.cjs +1 -1
  30. package/dist/designer.d.cts +149 -2
  31. package/dist/designer.d.ts +149 -2
  32. package/dist/designer.js +13 -12
  33. package/dist/{encoding-BSeUwrN7.js → encoding-DbnhbwI8.js} +2 -2
  34. package/dist/{encoding-B79hW4zq.cjs → encoding-ncQAvyOv.cjs} +1 -1
  35. package/dist/index.cjs +5 -5
  36. package/dist/index.d.cts +38 -0
  37. package/dist/index.d.ts +38 -0
  38. package/dist/index.js +299 -279
  39. package/dist/{json-snapshot-Kgn459Oj.js → json-snapshot-DvQbZlD7.js} +2 -2
  40. package/dist/{json-snapshot-I5VI84Vp.cjs → json-snapshot-nyV63AbB.cjs} +1 -1
  41. package/dist/{plugin-BaRUGORD.cjs → plugin-AcAQ2m9X.cjs} +1 -1
  42. package/dist/{plugin-D4kAxfLG.js → plugin-w5Nyt08U.js} +1 -1
  43. package/dist/{prefill-CJSazcVY.js → prefill-BXBxx5We.js} +1 -1
  44. package/dist/{prefill-Bpyn58AZ.cjs → prefill-DUvejVt1.cjs} +1 -1
  45. package/dist/prepared-YXy-fVLw.cjs +1 -0
  46. package/dist/{prepared-BwjwEzFz.js → prepared-rXCKqdHY.js} +35 -34
  47. package/dist/{protocol-C8VWF9An.cjs → protocol-C9ZaylID.cjs} +1 -1
  48. package/dist/{protocol-Bs9-ohHN.js → protocol-fjaeKkjf.js} +3 -3
  49. package/dist/{region-binding-workflow-JNowHd0A.cjs → region-binding-workflow-BiJQ7NU6.cjs} +1 -1
  50. package/dist/{region-binding-workflow-Cy4GIOUo.js → region-binding-workflow-aA8nxmkZ.js} +1 -1
  51. package/dist/report-encoding-worker.cjs +1 -1
  52. package/dist/report-encoding-worker.js +1 -1
  53. package/dist/{runtime-BDf5x1i1.js → runtime-BTtpjF3D.js} +4 -4
  54. package/dist/{runtime-DsJt1PIf.cjs → runtime-Dq0LUsyS.cjs} +1 -1
  55. package/dist/sbom.cdx.json +1 -1
  56. package/dist/server/node.d.cts +9 -0
  57. package/dist/server/node.d.ts +9 -0
  58. package/dist/server-node.cjs +5 -4
  59. package/dist/server-node.js +1838 -1760
  60. package/dist/server.cjs +1 -1
  61. package/dist/server.d.cts +81 -0
  62. package/dist/server.d.ts +81 -0
  63. package/dist/server.js +6 -6
  64. package/dist/style.css +1 -1
  65. package/dist/template-catalog-CLAM4w7H.cjs +1 -0
  66. package/dist/{template-catalog-DFwIS9aN.js → template-catalog-JSxSqk5y.js} +3 -3
  67. package/dist/template-fragments-Ca25Jt7e.cjs +1 -0
  68. package/dist/{template-fragments-Dng-AlHk.js → template-fragments-D2JFj7Du.js} +18 -18
  69. package/dist/{template-outline-DiADphlq.js → template-outline-CDWXptuj.js} +1 -1
  70. package/dist/template-outline-K4jGhATu.cjs +1 -0
  71. package/dist/template-registry-CWnuGqyP.cjs +1 -0
  72. package/dist/{template-registry-DhBqoD7W.js → template-registry-Do1Uav2Z.js} +333 -261
  73. package/dist/template-serialization-CU4n_Miu.js +307 -0
  74. package/dist/template-serialization-CgqBo6s-.cjs +1 -0
  75. package/dist/vue/async.d.cts +97 -2
  76. package/dist/vue/async.d.ts +97 -2
  77. package/dist/vue/index.d.cts +197 -4
  78. package/dist/vue/index.d.ts +197 -4
  79. package/dist/vue-async.cjs +1 -1
  80. package/dist/vue-async.js +3 -3
  81. package/dist/vue.cjs +1 -1
  82. package/dist/vue.js +75 -70
  83. package/dist/{workbook-session-NYv01LHe.cjs → workbook-session-BvEBRRMz.cjs} +1 -1
  84. package/dist/{workbook-session-oinxX3qo.js → workbook-session-f0wVlzst.js} +1 -1
  85. package/dist/workbook-sheets-CaPAulQ6.cjs +2 -0
  86. package/dist/workbook-sheets-D4M7XXBh.js +44 -0
  87. package/dist/worker.cjs +1 -1
  88. package/dist/worker.d.cts +9 -0
  89. package/dist/worker.d.ts +9 -0
  90. package/dist/worker.js +4 -4
  91. package/dist/xlsx.cjs +4 -4
  92. package/dist/xlsx.d.cts +39 -2
  93. package/dist/xlsx.d.ts +39 -2
  94. package/dist/xlsx.js +290 -270
  95. package/package.json +1 -1
  96. package/dist/ReportLabelStudio-BcjQt73a.cjs +0 -1
  97. package/dist/ReportLabelStudio-N2w6DdaZ.js +0 -764
  98. package/dist/ReportParamPanel-CVpK8mFc.cjs +0 -1
  99. package/dist/ReportPreview-BBJNlu2U.js +0 -5740
  100. package/dist/ReportPreview-nf4Dk1Jc.cjs +0 -6
  101. package/dist/TemplateReviewPanel-C2YjiaEC.cjs +0 -1
  102. package/dist/prepared-BiSz_9vN.cjs +0 -1
  103. package/dist/template-bindings-Cg5oBLFT.cjs +0 -1
  104. package/dist/template-bindings-TKnXM7ll.js +0 -62
  105. package/dist/template-catalog-D_2jdnkL.cjs +0 -1
  106. package/dist/template-fragments-DZVUBhuB.cjs +0 -1
  107. package/dist/template-outline-DWkzZXVC.cjs +0 -1
  108. package/dist/template-registry-DpLUSLwF.cjs +0 -1
  109. package/dist/template-serialization-Cc3h-miv.js +0 -247
  110. package/dist/template-serialization-D1R5oAqh.cjs +0 -1
package/dist/designer.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("vue");const E=require("./designer-CDqok4S5.cjs");exports.COLUMN_VISUAL_MESSAGES=E.COLUMN_VISUAL_MESSAGES;exports.ChartBindingInspector=E.ChartBindingInspector;exports.ColumnVisualEditor=E.ColumnVisualEditor;exports.DESIGNER_GUIDE_MESSAGES=E.DESIGNER_GUIDE_MESSAGES;exports.EXCEL_BINDING_MESSAGES=E.EXCEL_BINDING_MESSAGES;exports.ExcelBindingWizard=E.ExcelBindingWizard;exports.LABEL_STUDIO_MESSAGES=E.LABEL_STUDIO_MESSAGES;exports.PARAM_EDITOR_MESSAGES=E.PARAM_EDITOR_MESSAGES;exports.ParamEditor=E.ParamEditor;exports.REPORT_BATCH_MESSAGES=E.REPORT_BATCH_MESSAGES;exports.RULE_EDITOR_MESSAGES=E.DEFAULT_RULE_EDITOR_MESSAGES;exports.ReportBatchPanel=E.ReportBatchPanel;exports.ReportLabelStudio=E.ReportLabelStudio;exports.ReportTemplateEditor=E.ReportTemplateEditor;exports.ReportTemplateLibrary=E.ReportTemplateLibrary;exports.RuleEditor=E.RuleEditor;exports.TEMPLATE_EDITOR_MESSAGES=E.TEMPLATE_EDITOR_MESSAGES;exports.TEMPLATE_LIBRARY_MESSAGES=E.TEMPLATE_LIBRARY_MESSAGES;exports.TEMPLATE_PRODUCT_MESSAGES=E.TEMPLATE_PRODUCT_MESSAGES;exports.TEMPLATE_RECOVERY_MESSAGES=E.TEMPLATE_RECOVERY_MESSAGES;exports.TEMPLATE_REVIEW_MESSAGES=E.TEMPLATE_REVIEW_MESSAGES;exports.TemplateOutlinePanel=E.TemplateOutlinePanel;exports.TemplateReusePanel=E.TemplateReusePanel;exports.TemplateReviewPanel=E.TemplateReviewPanel;exports.createTemplateDraftStorage=E.createTemplateDraftStorage;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("vue");const E=require("./designer-BWQVpJeN.cjs");exports.COLUMN_VISUAL_MESSAGES=E.COLUMN_VISUAL_MESSAGES;exports.ChartBindingInspector=E.ChartBindingInspector;exports.ColumnVisualEditor=E.ColumnVisualEditor;exports.DESIGNER_GUIDE_MESSAGES=E.DESIGNER_GUIDE_MESSAGES;exports.EXCEL_BINDING_MESSAGES=E.EXCEL_BINDING_MESSAGES;exports.ExcelBindingWizard=E.ExcelBindingWizard;exports.LABEL_STUDIO_MESSAGES=E.LABEL_STUDIO_MESSAGES;exports.PARAM_EDITOR_MESSAGES=E.PARAM_EDITOR_MESSAGES;exports.ParamEditor=E.ParamEditor;exports.REPORT_BATCH_MESSAGES=E.REPORT_BATCH_MESSAGES;exports.RULE_EDITOR_MESSAGES=E.DEFAULT_RULE_EDITOR_MESSAGES;exports.ReportBatchPanel=E.ReportBatchPanel;exports.ReportLabelStudio=E.ReportLabelStudio;exports.ReportTemplateEditor=E.ReportTemplateEditor;exports.ReportTemplateLibrary=E.ReportTemplateLibrary;exports.RuleEditor=E.RuleEditor;exports.TEMPLATE_EDITOR_MESSAGES=E.TEMPLATE_EDITOR_MESSAGES;exports.TEMPLATE_LIBRARY_MESSAGES=E.TEMPLATE_LIBRARY_MESSAGES;exports.TEMPLATE_PRODUCT_MESSAGES=E.TEMPLATE_PRODUCT_MESSAGES;exports.TEMPLATE_RECOVERY_MESSAGES=E.TEMPLATE_RECOVERY_MESSAGES;exports.TEMPLATE_REVIEW_MESSAGES=E.TEMPLATE_REVIEW_MESSAGES;exports.TemplateOutlinePanel=E.TemplateOutlinePanel;exports.TemplateReusePanel=E.TemplateReusePanel;exports.TemplateReviewPanel=E.TemplateReviewPanel;exports.createTemplateDraftStorage=E.createTemplateDraftStorage;exports.useTemplateWorkbench=E.useTemplateWorkbench;
@@ -1,6 +1,8 @@
1
1
  import { ComponentOptionsMixin } from 'vue';
2
2
  import { ComputedRef } from 'vue';
3
3
  import { DefineComponent } from 'vue';
4
+ import { Ref } from 'vue';
5
+ import { ShallowRef } from 'vue';
4
6
  declare type __VLS_Props = {
5
7
  modelValue?: ColumnVisual_2;
6
8
  fields?: ReadonlyArray<{
@@ -1040,6 +1042,10 @@ export declare interface LabelStudioBrand {
1040
1042
  export declare interface LabelStudioController {
1041
1043
  readonly busy?: boolean;
1042
1044
  readonly pendingLocalChanges?: boolean;
1045
+ readonly mode: "preview" | "design";
1046
+ readonly canPrint: boolean;
1047
+ preview(): Promise<boolean>;
1048
+ print(): Promise<void>;
1043
1049
  guardChanges(): Promise<boolean>;
1044
1050
  prepare(): Promise<ReportTemplateDocument | undefined>;
1045
1051
  }
@@ -1058,6 +1064,8 @@ export declare interface LabelStudioOptions extends LabelStudioLayout {
1058
1064
  schema: DatasetContract;
1059
1065
  title?: string;
1060
1066
  identityField?: string;
1067
+ /** Optional business provenance retained by generated label templates for safe reuse. */
1068
+ dataContract?: ReportTemplate["dataContract"];
1061
1069
  modelValue?: ReportTemplateDocument;
1062
1070
  preview?: TemplateEditorOptions["preview"];
1063
1071
  save?: TemplateEditorOptions["save"];
@@ -1440,6 +1448,7 @@ declare interface MachReportDefaults {
1440
1448
  toolbar?: MachReportToolbarOptions;
1441
1449
  interaction?: ReportInteractionOptions;
1442
1450
  preferences?: ReportPreferencesOptions;
1451
+ refresh?: ReportRefreshOptions;
1443
1452
  /** Protect local input and drafts before replacing a report. Default true. */
1444
1453
  guardChanges?: boolean;
1445
1454
  beforeDiscard?: ReportBeforeDiscard;
@@ -1478,6 +1487,7 @@ declare type MachReportLogger = Pick<Console, "warn" | "info">;
1478
1487
  */
1479
1488
  /** 工具栏与状态文案(默认简体中文;出海场景覆写) */
1480
1489
  declare interface MachReportMessages extends Partial<ReportCalculationMessages>, Partial<ReportDataReviewMessages>, ReportPrintMessages, ReportParamOptionsMessages {
1490
+ previousSnapshot?: string;
1481
1491
  reviewTools?: string;
1482
1492
  validationTitle?: string;
1483
1493
  validationError?: string;
@@ -1664,6 +1674,7 @@ declare interface MachReportMessages extends Partial<ReportCalculationMessages>,
1664
1674
  */
1665
1675
  /** 工具栏与状态文案(默认简体中文;出海场景覆写) */
1666
1676
  declare interface MachReportMessages_2 extends Partial<ReportCalculationMessages_2>, Partial<ReportDataReviewMessages_2>, ReportPrintMessages_2, ReportParamOptionsMessages_2 {
1677
+ previousSnapshot?: string;
1667
1678
  reviewTools?: string;
1668
1679
  validationTitle?: string;
1669
1680
  validationError?: string;
@@ -1865,6 +1876,8 @@ declare interface MachReportTheme {
1865
1876
  btnActiveBg: string;
1866
1877
  }
1867
1878
  declare interface MachReportToolbarOptions {
1879
+ /** Reasons explain host restrictions without granting capabilities. */
1880
+ unavailableReasons?: Partial<Record<ReportPreviewTool, string>>;
1868
1881
  search?: boolean;
1869
1882
  thumbnails?: boolean;
1870
1883
  zoom?: boolean;
@@ -3212,6 +3225,7 @@ declare type ReportExpressionOperation_2 = "add" | "subtract" | "multiply" | "di
3212
3225
  declare type ReportExpressionOperation_3 = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
3213
3226
  declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
3214
3227
  declare type ReportFieldAggregation_2 = "sum" | "avg" | "min" | "max" | "count" | "none";
3228
+ declare type ReportFieldAggregation_3 = "sum" | "avg" | "min" | "max" | "count" | "none";
3215
3229
  declare interface ReportFieldCalculation {
3216
3230
  /** Business-owned explanation, never executable JavaScript or an inferred business formula. */
3217
3231
  description: string;
@@ -3222,6 +3236,11 @@ declare interface ReportFieldCalculation_2 {
3222
3236
  description: string;
3223
3237
  dependsOn: readonly string[];
3224
3238
  }
3239
+ declare interface ReportFieldCalculation_3 {
3240
+ /** Business-owned explanation, never executable JavaScript or an inferred business formula. */
3241
+ description: string;
3242
+ dependsOn: readonly string[];
3243
+ }
3225
3244
  declare interface ReportFieldContract extends ReportFieldSemantics {
3226
3245
  field: string;
3227
3246
  label?: string;
@@ -3250,6 +3269,20 @@ declare interface ReportFieldContract_2 extends ReportFieldSemantics_2 {
3250
3269
  semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
3251
3270
  unit?: string;
3252
3271
  }
3272
+ declare interface ReportFieldContract_3 extends ReportFieldSemantics_3 {
3273
+ field: string;
3274
+ label?: string;
3275
+ type: "text" | "number" | "boolean" | "date" | "decimal";
3276
+ required?: boolean;
3277
+ nullable?: boolean;
3278
+ enum?: readonly (string | number | boolean)[];
3279
+ min?: number;
3280
+ max?: number;
3281
+ minLength?: number;
3282
+ maxLength?: number;
3283
+ semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
3284
+ unit?: string;
3285
+ }
3253
3286
  declare interface ReportFieldSemantics {
3254
3287
  description?: string;
3255
3288
  /** Explicit meaning of null/missing; does not convert blanks into zero. */
@@ -3270,6 +3303,16 @@ declare interface ReportFieldSemantics_2 {
3270
3303
  format?: ColumnFormat_2;
3271
3304
  calculation?: ReportFieldCalculation_2;
3272
3305
  }
3306
+ declare interface ReportFieldSemantics_3 {
3307
+ description?: string;
3308
+ /** Explicit meaning of null/missing; does not convert blanks into zero. */
3309
+ missingMeaning?: string;
3310
+ /** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
3311
+ aggregation?: ReportFieldAggregation_3;
3312
+ /** Shared presentation only; raw values and calculation precision remain unchanged. */
3313
+ format?: ColumnFormat_3;
3314
+ calculation?: ReportFieldCalculation_3;
3315
+ }
3273
3316
  declare interface ReportFlowBand {
3274
3317
  /** Exact stable component IDs. Static components use nid, lists use id. */
3275
3318
  componentIds: string[];
@@ -3305,6 +3348,10 @@ declare interface ReportInteractionOptions {
3305
3348
  export declare const ReportLabelStudio: DefineComponent<LabelStudioOptions, {
3306
3349
  guardChanges: () => Promise<boolean>;
3307
3350
  prepare: () => Promise<ReportTemplateDocument_3 | undefined>;
3351
+ preview: () => Promise<boolean>;
3352
+ print: () => Promise<void>;
3353
+ mode: "preview" | "design";
3354
+ canPrint: boolean;
3308
3355
  busy: boolean;
3309
3356
  pendingLocalChanges: boolean;
3310
3357
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
@@ -3512,8 +3559,8 @@ declare type ReportPredicateScalar = string | number | boolean | null;
3512
3559
  declare type ReportPredicateScalar_2 = string | number | boolean | null;
3513
3560
  declare type ReportPredicateScalar_3 = string | number | boolean | null;
3514
3561
  declare interface ReportPreferencesAdapter {
3515
- load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
3516
- save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
3562
+ load(key: string): ReportStoredPreferences | null | Promise<ReportStoredPreferences | null>;
3563
+ save(key: string, value: Readonly<ReportStoredPreferences>): void | Promise<void>;
3517
3564
  remove?(key: string): void | Promise<void>;
3518
3565
  }
3519
3566
  declare interface ReportPreferencesOptions {
@@ -3573,6 +3620,17 @@ declare interface ReportPrintOptions {
3573
3620
  /** Physical translation only; no scaling or mutation of the report data/plan. */
3574
3621
  calibration?: ReportPrintCalibration;
3575
3622
  }
3623
+ /** Explicit refresh policy. The key identifies template/layout revisions outside query parameters. */
3624
+ declare interface ReportRefreshOptions {
3625
+ retainPrevious?: boolean;
3626
+ key?: string;
3627
+ /** Host API request preceding the preview reload. Blocks edits and output without discarding drafts. */
3628
+ pending?: boolean;
3629
+ /** The host retained an earlier snapshot after its own query failed or was cancelled. */
3630
+ stale?: boolean;
3631
+ /** Retry the host HTTP query when it owns the stale snapshot. The host updates its own state. */
3632
+ retry?(): void | Promise<void>;
3633
+ }
3576
3634
  declare interface ReportRuntimeBudget {
3577
3635
  maxRows?: number;
3578
3636
  maxPages?: number;
@@ -3584,8 +3642,14 @@ declare interface ReportRuntimeBudget {
3584
3642
  maxPreparedBytes?: number;
3585
3643
  maxDurationMs?: number;
3586
3644
  }
3645
+ declare interface ReportStoredPreferences extends Partial<ReportPreviewPreferences> {
3646
+ zoomMode?: "fit" | number;
3647
+ wideZoomMode?: "fit" | number;
3648
+ }
3587
3649
  declare interface ReportTemplate {
3588
3650
  schemaVersion?: string;
3651
+ /** Optional source identity and stable field meanings for safe stored-template reuse. */
3652
+ dataContract?: ReportTemplateDataContract;
3589
3653
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
3590
3654
  params?: ReportParamDef[];
3591
3655
  /** Fixed label pages repeat in record → copy → template-page order. */
@@ -3594,6 +3658,8 @@ declare interface ReportTemplate {
3594
3658
  }
3595
3659
  declare interface ReportTemplate_2 {
3596
3660
  schemaVersion?: string;
3661
+ /** Optional source identity and stable field meanings for safe stored-template reuse. */
3662
+ dataContract?: ReportTemplateDataContract_2;
3597
3663
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
3598
3664
  params?: ReportParamDef_2[];
3599
3665
  /** Fixed label pages repeat in record → copy → template-page order. */
@@ -3602,6 +3668,8 @@ declare interface ReportTemplate_2 {
3602
3668
  }
3603
3669
  declare interface ReportTemplate_3 {
3604
3670
  schemaVersion?: string;
3671
+ /** Optional source identity and stable field meanings for safe stored-template reuse. */
3672
+ dataContract?: ReportTemplateDataContract_3;
3605
3673
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
3606
3674
  params?: ReportParamDef_3[];
3607
3675
  /** Fixed label pages repeat in record → copy → template-page order. */
@@ -3646,6 +3714,27 @@ declare interface ReportTemplateCatalogQuery {
3646
3714
  limit?: number;
3647
3715
  signal?: AbortSignal;
3648
3716
  }
3717
+ declare interface ReportTemplateDataContract {
3718
+ /** Host-owned report/domain identity, without a query date or tenant credentials. */
3719
+ source?: string;
3720
+ datasets: Readonly<Record<string, {
3721
+ fields: readonly ReportTemplateFieldBinding[];
3722
+ }>>;
3723
+ }
3724
+ declare interface ReportTemplateDataContract_2 {
3725
+ /** Host-owned report/domain identity, without a query date or tenant credentials. */
3726
+ source?: string;
3727
+ datasets: Readonly<Record<string, {
3728
+ fields: readonly ReportTemplateFieldBinding_2[];
3729
+ }>>;
3730
+ }
3731
+ declare interface ReportTemplateDataContract_3 {
3732
+ /** Host-owned report/domain identity, without a query date or tenant credentials. */
3733
+ source?: string;
3734
+ datasets: Readonly<Record<string, {
3735
+ fields: readonly ReportTemplateFieldBinding_3[];
3736
+ }>>;
3737
+ }
3649
3738
  /** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
3650
3739
  declare interface ReportTemplateDocument {
3651
3740
  schemaVersion: "1.0";
@@ -3706,6 +3795,30 @@ export declare const ReportTemplateEditor: DefineComponent<TemplateEditorOptions
3706
3795
  showSave: boolean;
3707
3796
  showModeSwitch: boolean;
3708
3797
  }>;
3798
+ /** Stable business meaning is independent of a column's position and editable caption. */
3799
+ declare interface ReportTemplateFieldBinding {
3800
+ field: string;
3801
+ label?: string;
3802
+ semanticKey?: string;
3803
+ type?: ReportFieldContract["type"];
3804
+ unit?: string;
3805
+ }
3806
+ /** Stable business meaning is independent of a column's position and editable caption. */
3807
+ declare interface ReportTemplateFieldBinding_2 {
3808
+ field: string;
3809
+ label?: string;
3810
+ semanticKey?: string;
3811
+ type?: ReportFieldContract_2["type"];
3812
+ unit?: string;
3813
+ }
3814
+ /** Stable business meaning is independent of a column's position and editable caption. */
3815
+ declare interface ReportTemplateFieldBinding_3 {
3816
+ field: string;
3817
+ label?: string;
3818
+ semanticKey?: string;
3819
+ type?: ReportFieldContract_3["type"];
3820
+ unit?: string;
3821
+ }
3709
3822
  declare interface ReportTemplateFixture {
3710
3823
  name: string;
3711
3824
  datasets: DatasetRows;
@@ -4607,6 +4720,8 @@ export declare interface TemplateEditorOptions extends TemplateEditorConflictOpt
4607
4720
  datasets?: DatasetRows;
4608
4721
  dataSchemas?: Record<string, DatasetContract>;
4609
4722
  bindingDatasets?: ExcelBindingDataset[];
4723
+ /** Adopt the host's declared field meaning only after an explicit Excel binding is accepted. */
4724
+ bindingDataContract?: ReportTemplateDocument["template"]["dataContract"];
4610
4725
  /** Optional independently persisted Excel source and binding recipe. */
4611
4726
  bindingSession?: AnyExcelBindingSession;
4612
4727
  readonly?: boolean;
@@ -4740,6 +4855,18 @@ export declare interface TemplateToolDraft {
4740
4855
  value: string;
4741
4856
  }
4742
4857
  export declare type TemplateTotalsMessages = typeof TOTALS_MESSAGES;
4858
+ export declare interface TemplateWorkbenchOptions {
4859
+ blocked?: () => boolean;
4860
+ /** Return guards in the visible-first order, including mounted hidden workspaces. */
4861
+ guards?: () => readonly (() => boolean | Promise<boolean>)[];
4862
+ prepare?: () => ReportTemplateDocument | undefined | Promise<ReportTemplateDocument | undefined>;
4863
+ apply?: (document: ReportTemplateDocument, context: TemplateWorkbenchTaskContext) => boolean | void | Promise<boolean | void>;
4864
+ applied?: (document: ReportTemplateDocument) => void | Promise<void>;
4865
+ onError?: (cause: unknown) => void;
4866
+ }
4867
+ export declare interface TemplateWorkbenchTaskContext {
4868
+ signal: AbortSignal;
4869
+ }
4743
4870
  declare const TOTALS_MESSAGES: {
4744
4871
  title: string;
4745
4872
  field: string;
@@ -4820,12 +4947,28 @@ declare interface TreeTableOptions_3 {
4820
4947
  /** Bounded leaf-to-ancestor aggregate work; default one million. */
4821
4948
  maxAggregationVisits?: number;
4822
4949
  }
4950
+ /** Optional task orchestration shared by workbench shells, using their existing editor and manager. */
4951
+ export declare function useTemplateWorkbench(options: TemplateWorkbenchOptions): {
4952
+ operating: Ref<boolean>;
4953
+ busy: ComputedRef<boolean>;
4954
+ error: ShallowRef<unknown, unknown>;
4955
+ run: <T>(action: (context: TemplateWorkbenchTaskContext) => T | Promise<T>) => Promise<T | undefined>;
4956
+ guardChanges: () => Promise<boolean>;
4957
+ apply: () => Promise<boolean>;
4958
+ dispose: () => void;
4959
+ };
4823
4960
  /** The same declarative formatting used by list columns, before any output backend. */
4824
4961
  declare type ValueFormat = ColumnFormat;
4825
4962
  /** The same declarative formatting used by list columns, before any output backend. */
4826
4963
  declare type ValueFormat_2 = ColumnFormat_2;
4827
4964
  /** The same declarative formatting used by list columns, before any output backend. */
4828
4965
  declare type ValueFormat_3 = ColumnFormat_3;
4966
+ /** 可序列化的附加工作表在编码前写入,浏览器与 Worker 共用同一声明。 */
4967
+ declare interface XlsxAdditionalSheet {
4968
+ name: string;
4969
+ rows: readonly (readonly (string | number | boolean | null)[])[];
4970
+ columnWidths?: readonly number[];
4971
+ }
4829
4972
  declare type XlsxImageOptions = ImageMediaOptions;
4830
4973
  /**
4831
4974
  * RenderPlan → xlsx 导出(B 端第二出口,对齐家族 @agile-team/mach-table-xlsx 路线):
@@ -4838,6 +4981,8 @@ declare type XlsxImageOptions = ImageMediaOptions;
4838
4981
  declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImageOptions {
4839
4982
  /** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
4840
4983
  sheetName?: (sheetIndex: number) => string;
4984
+ /** 可序列化命名,用于 Worker;未提供的项沿用默认名称。 */
4985
+ sheetNames?: readonly string[];
4841
4986
  /** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
4842
4987
  sheetMode?: "auto" | "pages" | "continuous";
4843
4988
  /** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
@@ -4846,6 +4991,8 @@ declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImageOptions
4846
4991
  maxDataBars?: number;
4847
4992
  /** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
4848
4993
  paperSize?: "auto" | "a3" | "a4" | "a5";
4994
+ /** 在最终编码前追加说明、审计等标量工作表,可直接交给 Worker。 */
4995
+ additionalSheets?: readonly XlsxAdditionalSheet[];
4849
4996
  }
4850
4997
  export {};
4851
4998
 
@@ -1,6 +1,8 @@
1
1
  import { ComponentOptionsMixin } from 'vue';
2
2
  import { ComputedRef } from 'vue';
3
3
  import { DefineComponent } from 'vue';
4
+ import { Ref } from 'vue';
5
+ import { ShallowRef } from 'vue';
4
6
  declare type __VLS_Props = {
5
7
  modelValue?: ColumnVisual_2;
6
8
  fields?: ReadonlyArray<{
@@ -1040,6 +1042,10 @@ export declare interface LabelStudioBrand {
1040
1042
  export declare interface LabelStudioController {
1041
1043
  readonly busy?: boolean;
1042
1044
  readonly pendingLocalChanges?: boolean;
1045
+ readonly mode: "preview" | "design";
1046
+ readonly canPrint: boolean;
1047
+ preview(): Promise<boolean>;
1048
+ print(): Promise<void>;
1043
1049
  guardChanges(): Promise<boolean>;
1044
1050
  prepare(): Promise<ReportTemplateDocument | undefined>;
1045
1051
  }
@@ -1058,6 +1064,8 @@ export declare interface LabelStudioOptions extends LabelStudioLayout {
1058
1064
  schema: DatasetContract;
1059
1065
  title?: string;
1060
1066
  identityField?: string;
1067
+ /** Optional business provenance retained by generated label templates for safe reuse. */
1068
+ dataContract?: ReportTemplate["dataContract"];
1061
1069
  modelValue?: ReportTemplateDocument;
1062
1070
  preview?: TemplateEditorOptions["preview"];
1063
1071
  save?: TemplateEditorOptions["save"];
@@ -1440,6 +1448,7 @@ declare interface MachReportDefaults {
1440
1448
  toolbar?: MachReportToolbarOptions;
1441
1449
  interaction?: ReportInteractionOptions;
1442
1450
  preferences?: ReportPreferencesOptions;
1451
+ refresh?: ReportRefreshOptions;
1443
1452
  /** Protect local input and drafts before replacing a report. Default true. */
1444
1453
  guardChanges?: boolean;
1445
1454
  beforeDiscard?: ReportBeforeDiscard;
@@ -1478,6 +1487,7 @@ declare type MachReportLogger = Pick<Console, "warn" | "info">;
1478
1487
  */
1479
1488
  /** 工具栏与状态文案(默认简体中文;出海场景覆写) */
1480
1489
  declare interface MachReportMessages extends Partial<ReportCalculationMessages>, Partial<ReportDataReviewMessages>, ReportPrintMessages, ReportParamOptionsMessages {
1490
+ previousSnapshot?: string;
1481
1491
  reviewTools?: string;
1482
1492
  validationTitle?: string;
1483
1493
  validationError?: string;
@@ -1664,6 +1674,7 @@ declare interface MachReportMessages extends Partial<ReportCalculationMessages>,
1664
1674
  */
1665
1675
  /** 工具栏与状态文案(默认简体中文;出海场景覆写) */
1666
1676
  declare interface MachReportMessages_2 extends Partial<ReportCalculationMessages_2>, Partial<ReportDataReviewMessages_2>, ReportPrintMessages_2, ReportParamOptionsMessages_2 {
1677
+ previousSnapshot?: string;
1667
1678
  reviewTools?: string;
1668
1679
  validationTitle?: string;
1669
1680
  validationError?: string;
@@ -1865,6 +1876,8 @@ declare interface MachReportTheme {
1865
1876
  btnActiveBg: string;
1866
1877
  }
1867
1878
  declare interface MachReportToolbarOptions {
1879
+ /** Reasons explain host restrictions without granting capabilities. */
1880
+ unavailableReasons?: Partial<Record<ReportPreviewTool, string>>;
1868
1881
  search?: boolean;
1869
1882
  thumbnails?: boolean;
1870
1883
  zoom?: boolean;
@@ -3212,6 +3225,7 @@ declare type ReportExpressionOperation_2 = "add" | "subtract" | "multiply" | "di
3212
3225
  declare type ReportExpressionOperation_3 = "add" | "subtract" | "multiply" | "divide" | "coalesce" | "if" | "round" | "abs" | "concat" | "trim" | "upper" | "lower" | "dateYear" | "dateMonth" | "dateDay";
3213
3226
  declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
3214
3227
  declare type ReportFieldAggregation_2 = "sum" | "avg" | "min" | "max" | "count" | "none";
3228
+ declare type ReportFieldAggregation_3 = "sum" | "avg" | "min" | "max" | "count" | "none";
3215
3229
  declare interface ReportFieldCalculation {
3216
3230
  /** Business-owned explanation, never executable JavaScript or an inferred business formula. */
3217
3231
  description: string;
@@ -3222,6 +3236,11 @@ declare interface ReportFieldCalculation_2 {
3222
3236
  description: string;
3223
3237
  dependsOn: readonly string[];
3224
3238
  }
3239
+ declare interface ReportFieldCalculation_3 {
3240
+ /** Business-owned explanation, never executable JavaScript or an inferred business formula. */
3241
+ description: string;
3242
+ dependsOn: readonly string[];
3243
+ }
3225
3244
  declare interface ReportFieldContract extends ReportFieldSemantics {
3226
3245
  field: string;
3227
3246
  label?: string;
@@ -3250,6 +3269,20 @@ declare interface ReportFieldContract_2 extends ReportFieldSemantics_2 {
3250
3269
  semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
3251
3270
  unit?: string;
3252
3271
  }
3272
+ declare interface ReportFieldContract_3 extends ReportFieldSemantics_3 {
3273
+ field: string;
3274
+ label?: string;
3275
+ type: "text" | "number" | "boolean" | "date" | "decimal";
3276
+ required?: boolean;
3277
+ nullable?: boolean;
3278
+ enum?: readonly (string | number | boolean)[];
3279
+ min?: number;
3280
+ max?: number;
3281
+ minLength?: number;
3282
+ maxLength?: number;
3283
+ semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
3284
+ unit?: string;
3285
+ }
3253
3286
  declare interface ReportFieldSemantics {
3254
3287
  description?: string;
3255
3288
  /** Explicit meaning of null/missing; does not convert blanks into zero. */
@@ -3270,6 +3303,16 @@ declare interface ReportFieldSemantics_2 {
3270
3303
  format?: ColumnFormat_2;
3271
3304
  calculation?: ReportFieldCalculation_2;
3272
3305
  }
3306
+ declare interface ReportFieldSemantics_3 {
3307
+ description?: string;
3308
+ /** Explicit meaning of null/missing; does not convert blanks into zero. */
3309
+ missingMeaning?: string;
3310
+ /** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
3311
+ aggregation?: ReportFieldAggregation_3;
3312
+ /** Shared presentation only; raw values and calculation precision remain unchanged. */
3313
+ format?: ColumnFormat_3;
3314
+ calculation?: ReportFieldCalculation_3;
3315
+ }
3273
3316
  declare interface ReportFlowBand {
3274
3317
  /** Exact stable component IDs. Static components use nid, lists use id. */
3275
3318
  componentIds: string[];
@@ -3305,6 +3348,10 @@ declare interface ReportInteractionOptions {
3305
3348
  export declare const ReportLabelStudio: DefineComponent<LabelStudioOptions, {
3306
3349
  guardChanges: () => Promise<boolean>;
3307
3350
  prepare: () => Promise<ReportTemplateDocument_3 | undefined>;
3351
+ preview: () => Promise<boolean>;
3352
+ print: () => Promise<void>;
3353
+ mode: "preview" | "design";
3354
+ canPrint: boolean;
3308
3355
  busy: boolean;
3309
3356
  pendingLocalChanges: boolean;
3310
3357
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
@@ -3512,8 +3559,8 @@ declare type ReportPredicateScalar = string | number | boolean | null;
3512
3559
  declare type ReportPredicateScalar_2 = string | number | boolean | null;
3513
3560
  declare type ReportPredicateScalar_3 = string | number | boolean | null;
3514
3561
  declare interface ReportPreferencesAdapter {
3515
- load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
3516
- save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
3562
+ load(key: string): ReportStoredPreferences | null | Promise<ReportStoredPreferences | null>;
3563
+ save(key: string, value: Readonly<ReportStoredPreferences>): void | Promise<void>;
3517
3564
  remove?(key: string): void | Promise<void>;
3518
3565
  }
3519
3566
  declare interface ReportPreferencesOptions {
@@ -3573,6 +3620,17 @@ declare interface ReportPrintOptions {
3573
3620
  /** Physical translation only; no scaling or mutation of the report data/plan. */
3574
3621
  calibration?: ReportPrintCalibration;
3575
3622
  }
3623
+ /** Explicit refresh policy. The key identifies template/layout revisions outside query parameters. */
3624
+ declare interface ReportRefreshOptions {
3625
+ retainPrevious?: boolean;
3626
+ key?: string;
3627
+ /** Host API request preceding the preview reload. Blocks edits and output without discarding drafts. */
3628
+ pending?: boolean;
3629
+ /** The host retained an earlier snapshot after its own query failed or was cancelled. */
3630
+ stale?: boolean;
3631
+ /** Retry the host HTTP query when it owns the stale snapshot. The host updates its own state. */
3632
+ retry?(): void | Promise<void>;
3633
+ }
3576
3634
  declare interface ReportRuntimeBudget {
3577
3635
  maxRows?: number;
3578
3636
  maxPages?: number;
@@ -3584,8 +3642,14 @@ declare interface ReportRuntimeBudget {
3584
3642
  maxPreparedBytes?: number;
3585
3643
  maxDurationMs?: number;
3586
3644
  }
3645
+ declare interface ReportStoredPreferences extends Partial<ReportPreviewPreferences> {
3646
+ zoomMode?: "fit" | number;
3647
+ wideZoomMode?: "fit" | number;
3648
+ }
3587
3649
  declare interface ReportTemplate {
3588
3650
  schemaVersion?: string;
3651
+ /** Optional source identity and stable field meanings for safe stored-template reuse. */
3652
+ dataContract?: ReportTemplateDataContract;
3589
3653
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
3590
3654
  params?: ReportParamDef[];
3591
3655
  /** Fixed label pages repeat in record → copy → template-page order. */
@@ -3594,6 +3658,8 @@ declare interface ReportTemplate {
3594
3658
  }
3595
3659
  declare interface ReportTemplate_2 {
3596
3660
  schemaVersion?: string;
3661
+ /** Optional source identity and stable field meanings for safe stored-template reuse. */
3662
+ dataContract?: ReportTemplateDataContract_2;
3597
3663
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
3598
3664
  params?: ReportParamDef_2[];
3599
3665
  /** Fixed label pages repeat in record → copy → template-page order. */
@@ -3602,6 +3668,8 @@ declare interface ReportTemplate_2 {
3602
3668
  }
3603
3669
  declare interface ReportTemplate_3 {
3604
3670
  schemaVersion?: string;
3671
+ /** Optional source identity and stable field meanings for safe stored-template reuse. */
3672
+ dataContract?: ReportTemplateDataContract_3;
3605
3673
  /** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
3606
3674
  params?: ReportParamDef_3[];
3607
3675
  /** Fixed label pages repeat in record → copy → template-page order. */
@@ -3646,6 +3714,27 @@ declare interface ReportTemplateCatalogQuery {
3646
3714
  limit?: number;
3647
3715
  signal?: AbortSignal;
3648
3716
  }
3717
+ declare interface ReportTemplateDataContract {
3718
+ /** Host-owned report/domain identity, without a query date or tenant credentials. */
3719
+ source?: string;
3720
+ datasets: Readonly<Record<string, {
3721
+ fields: readonly ReportTemplateFieldBinding[];
3722
+ }>>;
3723
+ }
3724
+ declare interface ReportTemplateDataContract_2 {
3725
+ /** Host-owned report/domain identity, without a query date or tenant credentials. */
3726
+ source?: string;
3727
+ datasets: Readonly<Record<string, {
3728
+ fields: readonly ReportTemplateFieldBinding_2[];
3729
+ }>>;
3730
+ }
3731
+ declare interface ReportTemplateDataContract_3 {
3732
+ /** Host-owned report/domain identity, without a query date or tenant credentials. */
3733
+ source?: string;
3734
+ datasets: Readonly<Record<string, {
3735
+ fields: readonly ReportTemplateFieldBinding_3[];
3736
+ }>>;
3737
+ }
3649
3738
  /** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
3650
3739
  declare interface ReportTemplateDocument {
3651
3740
  schemaVersion: "1.0";
@@ -3706,6 +3795,30 @@ export declare const ReportTemplateEditor: DefineComponent<TemplateEditorOptions
3706
3795
  showSave: boolean;
3707
3796
  showModeSwitch: boolean;
3708
3797
  }>;
3798
+ /** Stable business meaning is independent of a column's position and editable caption. */
3799
+ declare interface ReportTemplateFieldBinding {
3800
+ field: string;
3801
+ label?: string;
3802
+ semanticKey?: string;
3803
+ type?: ReportFieldContract["type"];
3804
+ unit?: string;
3805
+ }
3806
+ /** Stable business meaning is independent of a column's position and editable caption. */
3807
+ declare interface ReportTemplateFieldBinding_2 {
3808
+ field: string;
3809
+ label?: string;
3810
+ semanticKey?: string;
3811
+ type?: ReportFieldContract_2["type"];
3812
+ unit?: string;
3813
+ }
3814
+ /** Stable business meaning is independent of a column's position and editable caption. */
3815
+ declare interface ReportTemplateFieldBinding_3 {
3816
+ field: string;
3817
+ label?: string;
3818
+ semanticKey?: string;
3819
+ type?: ReportFieldContract_3["type"];
3820
+ unit?: string;
3821
+ }
3709
3822
  declare interface ReportTemplateFixture {
3710
3823
  name: string;
3711
3824
  datasets: DatasetRows;
@@ -4607,6 +4720,8 @@ export declare interface TemplateEditorOptions extends TemplateEditorConflictOpt
4607
4720
  datasets?: DatasetRows;
4608
4721
  dataSchemas?: Record<string, DatasetContract>;
4609
4722
  bindingDatasets?: ExcelBindingDataset[];
4723
+ /** Adopt the host's declared field meaning only after an explicit Excel binding is accepted. */
4724
+ bindingDataContract?: ReportTemplateDocument["template"]["dataContract"];
4610
4725
  /** Optional independently persisted Excel source and binding recipe. */
4611
4726
  bindingSession?: AnyExcelBindingSession;
4612
4727
  readonly?: boolean;
@@ -4740,6 +4855,18 @@ export declare interface TemplateToolDraft {
4740
4855
  value: string;
4741
4856
  }
4742
4857
  export declare type TemplateTotalsMessages = typeof TOTALS_MESSAGES;
4858
+ export declare interface TemplateWorkbenchOptions {
4859
+ blocked?: () => boolean;
4860
+ /** Return guards in the visible-first order, including mounted hidden workspaces. */
4861
+ guards?: () => readonly (() => boolean | Promise<boolean>)[];
4862
+ prepare?: () => ReportTemplateDocument | undefined | Promise<ReportTemplateDocument | undefined>;
4863
+ apply?: (document: ReportTemplateDocument, context: TemplateWorkbenchTaskContext) => boolean | void | Promise<boolean | void>;
4864
+ applied?: (document: ReportTemplateDocument) => void | Promise<void>;
4865
+ onError?: (cause: unknown) => void;
4866
+ }
4867
+ export declare interface TemplateWorkbenchTaskContext {
4868
+ signal: AbortSignal;
4869
+ }
4743
4870
  declare const TOTALS_MESSAGES: {
4744
4871
  title: string;
4745
4872
  field: string;
@@ -4820,12 +4947,28 @@ declare interface TreeTableOptions_3 {
4820
4947
  /** Bounded leaf-to-ancestor aggregate work; default one million. */
4821
4948
  maxAggregationVisits?: number;
4822
4949
  }
4950
+ /** Optional task orchestration shared by workbench shells, using their existing editor and manager. */
4951
+ export declare function useTemplateWorkbench(options: TemplateWorkbenchOptions): {
4952
+ operating: Ref<boolean>;
4953
+ busy: ComputedRef<boolean>;
4954
+ error: ShallowRef<unknown, unknown>;
4955
+ run: <T>(action: (context: TemplateWorkbenchTaskContext) => T | Promise<T>) => Promise<T | undefined>;
4956
+ guardChanges: () => Promise<boolean>;
4957
+ apply: () => Promise<boolean>;
4958
+ dispose: () => void;
4959
+ };
4823
4960
  /** The same declarative formatting used by list columns, before any output backend. */
4824
4961
  declare type ValueFormat = ColumnFormat;
4825
4962
  /** The same declarative formatting used by list columns, before any output backend. */
4826
4963
  declare type ValueFormat_2 = ColumnFormat_2;
4827
4964
  /** The same declarative formatting used by list columns, before any output backend. */
4828
4965
  declare type ValueFormat_3 = ColumnFormat_3;
4966
+ /** 可序列化的附加工作表在编码前写入,浏览器与 Worker 共用同一声明。 */
4967
+ declare interface XlsxAdditionalSheet {
4968
+ name: string;
4969
+ rows: readonly (readonly (string | number | boolean | null)[])[];
4970
+ columnWidths?: readonly number[];
4971
+ }
4829
4972
  declare type XlsxImageOptions = ImageMediaOptions;
4830
4973
  /**
4831
4974
  * RenderPlan → xlsx 导出(B 端第二出口,对齐家族 @agile-team/mach-table-xlsx 路线):
@@ -4838,6 +4981,8 @@ declare type XlsxImageOptions = ImageMediaOptions;
4838
4981
  declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImageOptions {
4839
4982
  /** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
4840
4983
  sheetName?: (sheetIndex: number) => string;
4984
+ /** 可序列化命名,用于 Worker;未提供的项沿用默认名称。 */
4985
+ sheetNames?: readonly string[];
4841
4986
  /** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
4842
4987
  sheetMode?: "auto" | "pages" | "continuous";
4843
4988
  /** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
@@ -4846,6 +4991,8 @@ declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImageOptions
4846
4991
  maxDataBars?: number;
4847
4992
  /** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
4848
4993
  paperSize?: "auto" | "a3" | "a4" | "a5";
4994
+ /** 在最终编码前追加说明、审计等标量工作表,可直接交给 Worker。 */
4995
+ additionalSheets?: readonly XlsxAdditionalSheet[];
4849
4996
  }
4850
4997
  export {};
4851
4998