@beyondwork/xlsx-substrate-bindings 0.0.0-stage → 0.1.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 (50) hide show
  1. package/LICENSE.md +31 -0
  2. package/dist/ai/index.d.ts +2 -0
  3. package/dist/ai/index.js +1 -0
  4. package/dist/ai/types.d.ts +320 -0
  5. package/dist/ai/types.js +23 -0
  6. package/dist/index.d.ts +46 -0
  7. package/dist/index.js +72 -0
  8. package/dist/runtime/index.d.ts +2 -0
  9. package/dist/runtime/index.js +1 -0
  10. package/dist/runtime/types.d.ts +1379 -0
  11. package/dist/runtime/types.js +15 -0
  12. package/dist/shared.d.ts +69 -0
  13. package/dist/shared.js +1 -0
  14. package/dist/ui/index.d.ts +2 -0
  15. package/dist/ui/index.js +1 -0
  16. package/dist/ui/types.d.ts +765 -0
  17. package/dist/ui/types.js +12 -0
  18. package/dist/wasm/bridge-contract.d.ts +541 -0
  19. package/dist/wasm/bridge-contract.js +862 -0
  20. package/dist/wasm/chart-test-fixture.d.ts +19 -0
  21. package/dist/wasm/chart-test-fixture.js +42 -0
  22. package/dist/wasm/index.d.ts +9 -0
  23. package/dist/wasm/index.js +67 -0
  24. package/dist/wasm/media-test-fixture.d.ts +44 -0
  25. package/dist/wasm/media-test-fixture.js +160 -0
  26. package/dist/wasm/session-router.d.ts +98 -0
  27. package/dist/wasm/session-router.js +184 -0
  28. package/dist/wasm/sheet-window-binary-reference.d.ts +9 -0
  29. package/dist/wasm/sheet-window-binary-reference.js +308 -0
  30. package/dist/wasm/sheet-window-binary.d.ts +279 -0
  31. package/dist/wasm/sheet-window-binary.js +636 -0
  32. package/dist/wasm/volatile-test-fixture.d.ts +7 -0
  33. package/dist/wasm/volatile-test-fixture.js +35 -0
  34. package/dist/wasm/web.d.ts +59 -0
  35. package/dist/wasm/web.js +60 -0
  36. package/generated/wasm/package.json +3 -0
  37. package/generated/wasm/sheet-window-binary.mjs +482 -0
  38. package/generated/wasm/snippets/ironcalc_base-89b4f49381e1e289/inline0.js +45 -0
  39. package/generated/wasm/xlsx_substrate_wasm.d.ts +336 -0
  40. package/generated/wasm/xlsx_substrate_wasm.js +2108 -0
  41. package/generated/wasm/xlsx_substrate_wasm_bg.wasm +0 -0
  42. package/generated/wasm/xlsx_substrate_wasm_bg.wasm.d.ts +105 -0
  43. package/generated/wasm-web/package.json +3 -0
  44. package/generated/wasm-web/snippets/ironcalc_base-89b4f49381e1e289/inline0.js +42 -0
  45. package/generated/wasm-web/xlsx_substrate_wasm.d.ts +466 -0
  46. package/generated/wasm-web/xlsx_substrate_wasm.js +2109 -0
  47. package/generated/wasm-web/xlsx_substrate_wasm_bg.wasm +0 -0
  48. package/generated/wasm-web/xlsx_substrate_wasm_bg.wasm.d.ts +105 -0
  49. package/package.json +41 -3
  50. package/README.md +0 -3
@@ -0,0 +1,12 @@
1
+ export function classifyXlsxUiState(namespace) {
2
+ switch (namespace) {
3
+ case "runtime.workbook":
4
+ case "ui.scope.projection":
5
+ return "canonical-document";
6
+ case "runtime.viewport":
7
+ case "runtime.collab.session":
8
+ return "session-shared";
9
+ case "ui.local.preference":
10
+ return "local-preference";
11
+ }
12
+ }
@@ -0,0 +1,541 @@
1
+ import type { XlsxAiCompressedContextRequest, XlsxAiCompressedContextResult, XlsxAiCompressedDrilldownRequest, XlsxAiCompressedDrilldownResult, XlsxAiFormulaExplanationResult, XlsxAiReferenceQuery, XlsxAiReferenceResolution, XlsxAiScopeListRequest, XlsxAiScopeListResult, XlsxAiWorkbookInspection } from "../ai/index.ts";
2
+ import type { XlsxFormulaCommitRequest, XlsxFormulaCommitResult, XlsxFormulaRecalculateRequest, XlsxFormulaRecalculateResult, XlsxLayoutMetricResizeRequest, XlsxLayoutMetricResizeResult, XlsxLayoutMetricVisibilityRequest, XlsxLayoutMetricVisibilityResult, XlsxFrozenPaneRequest, XlsxFrozenPaneResult, XlsxMergeCellsRequest, XlsxMergeCellsResult, XlsxOutlineGroupVisibilityResult, XlsxOutlineLevelRequest, XlsxOutlineLevelResult, XlsxSheetStructureMutationRequest, XlsxSheetStructureMutationResult, XlsxSheetTabMutationRequest, XlsxSheetTabMutationResult, XlsxShiftCellsCommitRequest, XlsxShiftCellsCommitResult, XlsxRangeFilterApplyRequest, XlsxRangeFilterClearRequest, XlsxRangeFilterResult, XlsxRangeSortRequest, XlsxRangeSortResult, XlsxTableAppendRowRequest, XlsxTableAppendRowResult, XlsxKernelActionRequest, XlsxKernelActionValidation, XlsxKernelCreateRequest, XlsxKernelMutationResult, XlsxKernelPanelReadback, XlsxRangeClearCommitRequest, XlsxRangeClearCommitResult, XlsxRangeFormatCommitRequest, XlsxRangeDataValidationCommitRequest, XlsxRangeDataValidationCommitResult, XlsxReviewCommentCommitRequest, XlsxReviewCommentCommitResult, XlsxFindRequest, XlsxFindResult, XlsxGoToRequest, XlsxGoToResult, XlsxDataRegionRequest, XlsxDataRegionResult, XlsxRangeHyperlinkCommitRequest, XlsxRangeHyperlinkCommitResult, XlsxRangeFormatCommitResult, XlsxRangeFillCommitRequest, XlsxRangeFillCommitResult, XlsxRangePasteCommitRequest, XlsxRangePasteCommitResult, XlsxRangeTransferCommitRequest, XlsxRangeTransferCommitResult, XlsxRuntimeSessionDelimitedExportRequest, XlsxRuntimeSessionDelimitedExportResult, XlsxRuntimeSessionExportRequest, XlsxRuntimeSessionExportResult, XlsxSelectionSetClearCommitRequest, XlsxSelectionSetFormatCommitRequest, XlsxSelectionSetPasteCommitRequest, XlsxSessionRecalculateRequest, XlsxWorkflowContextInput } from "../runtime/index.ts";
3
+ import type { XlsxScopeHandle } from "../shared.ts";
4
+ import { type XlsxSheetWindowBinaryEnvelope } from "./sheet-window-binary.ts";
5
+ import type { XlsxUiAccessibilitySummary, XlsxUiOverlayLanesReadback, XlsxUiOverlayLanesRequest, XlsxUiSelectionCursor, XlsxUiSelectionReadback, XlsxUiSelectionSetReadback, XlsxUiSheetWindowReadback, XlsxUiSessionBinding, XlsxUiStateClass, XlsxUiStateNamespace, XlsxUiViewportHint, XlsxUiViewportReadback } from "../ui/index.ts";
6
+ export interface XlsxWasmBridgeStatus {
7
+ readonly packageName: "@beyondwork/xlsx-substrate-bindings";
8
+ readonly role: "wasm-ai-ui-runtime-binding";
9
+ readonly bridgeVersion: "xlsx-wasm-bridge-v40";
10
+ readonly capabilities: readonly ("workflow-context-v1" | "workflow-context-v2" | "workflow-overlay-lanes-v1" | "sheet-window-paint-geometry-v1" | "sheet-window-coordinate-posture-v1" | "formula-diagnostics-v2" | "formula-address-commit-v1" | "formula-recalculate-commit-v1" | "formula-recalculate-volatile-inputs-v1" | "formula-translation-interaction-v1" | "kernel-ui-v1" | "runtime-session-handles-v1" | "runtime-session-mutations-v1" | "staged-open-v1" | "sheet-window-cache-v1" | "readback-envelope-v1" | "preserve-only-entities-v1" | "selection-set-v1" | "multi-area-mutation-v1" | "range-fill-commit-v1" | "range-paste-commit-v1" | "range-clear-commit-v1" | "range-format-commit-v1" | "range-transfer-v1" | "layout-metric-resize-v1" | "layout-metric-visibility-v1" | "outline-group-visibility-v1" | "sheet-structure-v1" | "sheet-tabs-v1" | "table-mutation-v1" | "filter-sort-v1" | "sort-commit-v1" | "operation-pattern-hints-v1" | "ai-compressed-bundles-v1" | "ui-capability-records-v1" | "drawing-media-v1" | "drawing-chart-v1" | "sheet-window-binary-v1" | "frozen-pane-v1" | "sheet-window-extent-v1" | "selection-cursor-v1" | "merge-cells-v1" | "shift-cells-v1" | "selection-set-capabilities-v1" | "find-v1" | "go-to-v1" | "data-region-v1")[];
11
+ readonly wasmBinding: "mounted";
12
+ readonly nativeBinding: "not-mounted";
13
+ readonly readOnly: false;
14
+ }
15
+ export interface XlsxRuntimeSessionOpenRequest {
16
+ readonly sourceLabel?: string;
17
+ readonly loadMode?: "full" | "active-sheet-preview";
18
+ readonly requestedActiveSheetId?: string;
19
+ }
20
+ export interface XlsxRuntimeSessionHandle {
21
+ readonly handleId: string;
22
+ readonly workbookId: string;
23
+ /**
24
+ * Session identity at open — deterministically rooted in the loaded bytes,
25
+ * so two sessions opened from identical bytes start with identical
26
+ * identity. Opaque; equality/advancement only (see
27
+ * `XlsxRuntimeSessionMutationReceipt.canonicalHash`).
28
+ */
29
+ readonly canonicalHash: string;
30
+ readonly sourceLabel: string;
31
+ readonly hydration: XlsxRuntimeSessionHydration;
32
+ }
33
+ export interface XlsxRuntimeSessionHydration {
34
+ readonly mode: "full" | "active-sheet-preview";
35
+ readonly activeSheetId?: string;
36
+ readonly importedWorksheetCount: number;
37
+ readonly deferredWorksheetCount: number;
38
+ }
39
+ export interface XlsxRuntimeSessionDisposeResult {
40
+ readonly handleId: string;
41
+ readonly disposed: boolean;
42
+ }
43
+ export interface XlsxSelectionSetRequest {
44
+ readonly handles: readonly XlsxScopeHandle[];
45
+ readonly viewportHint?: XlsxUiViewportHint;
46
+ readonly workflowContext?: XlsxWorkflowContextInput;
47
+ readonly activeScopeId?: string;
48
+ readonly anchorScopeId?: string;
49
+ }
50
+ export interface XlsxWasmBridge {
51
+ readonly status: XlsxWasmBridgeStatus;
52
+ openWorkbookRuntimeSession(bytes: Uint8Array, request?: XlsxRuntimeSessionOpenRequest): XlsxRuntimeSessionHandle;
53
+ disposeWorkbookRuntimeSession(handleId: string): XlsxRuntimeSessionDisposeResult;
54
+ inspectWorkbookRuntimeSession(handleId: string): XlsxAiWorkbookInspection;
55
+ listRuntimeSessionScopes(handleId: string, request?: XlsxAiScopeListRequest): XlsxAiScopeListResult;
56
+ readRuntimeSessionCompressedContext(handleId: string, request?: XlsxAiCompressedContextRequest): XlsxAiCompressedContextResult;
57
+ readRuntimeSessionCompressedDrilldown(handleId: string, request: XlsxAiCompressedDrilldownRequest): XlsxAiCompressedDrilldownResult;
58
+ explainRuntimeSessionFormula(handleId: string, target: XlsxScopeHandle | XlsxAiReferenceQuery): XlsxAiFormulaExplanationResult | XlsxAiReferenceResolution;
59
+ bindUiRuntimeSession(handleId: string, requestedActiveSheetId?: string): XlsxUiSessionBinding;
60
+ readRuntimeSessionSelection(handleId: string, handle: XlsxScopeHandle, viewportHint?: XlsxUiViewportHint, workflowContext?: XlsxWorkflowContextInput, selectionCursor?: XlsxUiSelectionCursor): XlsxUiSelectionReadback;
61
+ readRuntimeSessionSelectionSet(handleId: string, request: XlsxSelectionSetRequest): XlsxUiSelectionSetReadback;
62
+ summarizeRuntimeSessionAccessibility(handleId: string, handle: XlsxScopeHandle, viewportHint?: XlsxUiViewportHint, workflowContext?: XlsxWorkflowContextInput): XlsxUiAccessibilitySummary;
63
+ /**
64
+ * X5-U-038 (bridge v34): Excel's Find over the canonical session workbook
65
+ * — current sheet or every visible sheet, values or formulas, match case,
66
+ * match entire cell, `?` `*` `~` wildcards. Read-only; the answer is the
67
+ * ordered match list with a cell handle per match and the count facts, or
68
+ * the typed refusal of the query.
69
+ */
70
+ findInRuntimeSession(handleId: string, request: XlsxFindRequest): XlsxFindResult;
71
+ /**
72
+ * X5-U-023 (bridge v35): name-box / Go To resolution over the canonical
73
+ * session workbook — an address, a range, whole rows or columns, a
74
+ * sheet-qualified reference, or a defined name with Excel's scope
75
+ * precedence. Read-only; the answer is the target sheet, range, label and
76
+ * the selection handle the selection command takes, or a typed refusal.
77
+ */
78
+ goToInRuntimeSession(handleId: string, request: XlsxGoToRequest): XlsxGoToResult;
79
+ /**
80
+ * X3-R-012 (bridge v40): Excel's Ctrl+Arrow / Ctrl+Shift+Arrow / Ctrl+A
81
+ * targets over the canonical session workbook — `Range.End` of the
82
+ * active cell in a direction, the same edge as an extended selection's
83
+ * head, or `Range.CurrentRegion` (the whole sheet once the selection
84
+ * covers it). Read-only; the answer is the target's sheet, range, label
85
+ * and the selection handle the selection command takes, or a typed
86
+ * refusal.
87
+ */
88
+ dataRegionInRuntimeSession(handleId: string, request: XlsxDataRegionRequest): XlsxDataRegionResult;
89
+ readRuntimeSessionSheetWindow(handleId: string, viewportHint: XlsxUiViewportHint, activeHandle?: XlsxScopeHandle, workflowContext?: XlsxWorkflowContextInput): XlsxUiSheetWindowReadback;
90
+ /**
91
+ * T5 (`xlsx-sheet-window-binary/1`): the binary sheet-window export —
92
+ * same parameters as `readRuntimeSessionSheetWindow`, returns the hybrid
93
+ * `{ schemaId, bytes, rest }` envelope instead of the serde'd DTO.
94
+ *
95
+ * OPTIONAL — feature-detected on the raw wasm module object so older
96
+ * builds keep mounting; use `readSheetWindowDecoded` (which feature-detects
97
+ * and falls back to the JSON export) rather than probing this directly.
98
+ */
99
+ readRuntimeSessionSheetWindowBinary?(handleId: string, viewportHint: XlsxUiViewportHint, activeHandle?: XlsxScopeHandle, workflowContext?: XlsxWorkflowContextInput): XlsxSheetWindowBinaryEnvelope;
100
+ /**
101
+ * T5 convenience seam: binary sheet-window readback decoded to the exact
102
+ * `XlsxUiSheetWindowReadback` shape when the wasm build exposes
103
+ * `readRuntimeSessionSheetWindowBinary`; the JSON export otherwise. On a
104
+ * decode error the bridge logs once and permanently falls back to JSON
105
+ * for this bridge instance (defensive, not expected). One seam for all
106
+ * consumers — readback/tile-scheduler/painter code changes zero lines.
107
+ */
108
+ readSheetWindowDecoded(handleId: string, viewportHint: XlsxUiViewportHint, activeHandle?: XlsxScopeHandle, workflowContext?: XlsxWorkflowContextInput): XlsxUiSheetWindowReadback;
109
+ readRuntimeSessionOverlayLanes(handleId: string, request?: XlsxUiOverlayLanesRequest): XlsxUiOverlayLanesReadback;
110
+ readRuntimeSessionKernelPanel(handleId: string, workflowContext?: XlsxWorkflowContextInput): XlsxKernelPanelReadback;
111
+ /**
112
+ * BR-3 (bridge v18): digest-addressed media bytes for a verified drawing
113
+ * media handle (`media:sha256:<64-hex>`). One-shot and uncached — the
114
+ * substrate recomputes the SHA-256 per call, so never invoke per paint
115
+ * frame; consumers keep a decode cache keyed by digest. Refusals throw
116
+ * typed `XlsxMediaAccessErrorCode` strings.
117
+ */
118
+ readRuntimeSessionMediaBytes(handleId: string, mediaId: string): XlsxMediaBytesReadback;
119
+ /**
120
+ * D4-R2b (bridge v20): digest-addressed chart XML for a verified drawing
121
+ * chart handle (`chart:sha256:<64-hex>`). One-shot and uncached — the
122
+ * substrate recomputes the SHA-256 per call, so never invoke per paint
123
+ * frame; consumers keep a preview store keyed by digest. The workbook
124
+ * theme XML rides along when present. Refusals throw typed
125
+ * `XlsxChartAccessErrorCode` strings.
126
+ */
127
+ readRuntimeSessionChartBytes(handleId: string, chartId: string): XlsxChartBytesReadback;
128
+ inspectWorkbook(bytes: Uint8Array, sourceLabel?: string): XlsxAiWorkbookInspection;
129
+ readPreserveOnlyEntities(bytes: Uint8Array, sourceLabel?: string): XlsxPreserveOnlyEntitiesReadback;
130
+ readRuntimeSessionPreserveOnlyEntities(handleId: string): XlsxPreserveOnlyEntitiesReadback;
131
+ listScopes(bytes: Uint8Array, request?: XlsxAiScopeListRequest): XlsxAiScopeListResult;
132
+ readCompressedContext(bytes: Uint8Array, request?: XlsxAiCompressedContextRequest): XlsxAiCompressedContextResult;
133
+ readCompressedDrilldown(bytes: Uint8Array, request: XlsxAiCompressedDrilldownRequest): XlsxAiCompressedDrilldownResult;
134
+ resolveReference(bytes: Uint8Array, query: XlsxAiReferenceQuery): XlsxAiReferenceResolution;
135
+ explainFormula(bytes: Uint8Array, target: XlsxScopeHandle | XlsxAiReferenceQuery): XlsxAiFormulaExplanationResult | XlsxAiReferenceResolution;
136
+ bindUiSession(bytes: Uint8Array, requestedActiveSheetId?: string): XlsxUiSessionBinding;
137
+ classifyUiState(namespace: XlsxUiStateNamespace): XlsxUiStateClass;
138
+ projectViewportHint(bytes: Uint8Array, hint: XlsxUiViewportHint): XlsxUiViewportReadback;
139
+ readSelection(bytes: Uint8Array, handle: XlsxScopeHandle, viewportHint?: XlsxUiViewportHint, workflowContext?: XlsxWorkflowContextInput, selectionCursor?: XlsxUiSelectionCursor): XlsxUiSelectionReadback;
140
+ readSelectionSet(bytes: Uint8Array, request: XlsxSelectionSetRequest): XlsxUiSelectionSetReadback;
141
+ summarizeAccessibility(bytes: Uint8Array, handle: XlsxScopeHandle, viewportHint?: XlsxUiViewportHint, workflowContext?: XlsxWorkflowContextInput): XlsxUiAccessibilitySummary;
142
+ readSheetWindow(bytes: Uint8Array, viewportHint: XlsxUiViewportHint, activeHandle?: XlsxScopeHandle, workflowContext?: XlsxWorkflowContextInput): XlsxUiSheetWindowReadback;
143
+ readWorkflowOverlayLanes(bytes: Uint8Array, request?: XlsxUiOverlayLanesRequest): XlsxUiOverlayLanesReadback;
144
+ readKernelPanel(bytes: Uint8Array, workflowContext?: XlsxWorkflowContextInput): XlsxKernelPanelReadback;
145
+ validateKernelAction(bytes: Uint8Array, request: XlsxKernelActionRequest): XlsxKernelActionValidation;
146
+ createKernelBinding(bytes: Uint8Array, request: XlsxKernelCreateRequest): XlsxKernelMutationResult;
147
+ updateKernelSource(bytes: Uint8Array, request: XlsxKernelActionRequest): XlsxKernelMutationResult;
148
+ startKernelRun(bytes: Uint8Array, request: XlsxKernelActionRequest): XlsxKernelMutationResult;
149
+ completeKernelRun(bytes: Uint8Array, request: XlsxKernelActionRequest): XlsxKernelMutationResult;
150
+ cancelKernelRun(bytes: Uint8Array, request: XlsxKernelActionRequest): XlsxKernelMutationResult;
151
+ detachKernelOutput(bytes: Uint8Array, request: XlsxKernelActionRequest): XlsxKernelMutationResult;
152
+ deleteKernelBinding(bytes: Uint8Array, request: XlsxKernelActionRequest): XlsxKernelMutationResult;
153
+ commitCellFormula(bytes: Uint8Array, request: XlsxFormulaCommitRequest): XlsxFormulaCommitResult;
154
+ recalculateFormulas(bytes: Uint8Array, request?: XlsxFormulaRecalculateRequest): XlsxFormulaRecalculateResult;
155
+ /**
156
+ * T1 (runtime-session-mutations-v1): stateful in-session mutation ports.
157
+ * Same request DTOs as the byte-based exports minus the bytes; results are
158
+ * the byte-based result DTOs with `exportedBytes` absent plus a `session`
159
+ * receipt block. Commits accumulate dirt; `recalculateInSession` drains it
160
+ * (mode "dirty" default, "full" forces the full plan).
161
+ *
162
+ * OPTIONAL — feature-detected on the raw wasm module object so older wasm
163
+ * builds (without the `runtime-session-mutations-v1` exports) still mount
164
+ * the bridge with the byte-based mutation surface intact. Use
165
+ * `supportsRuntimeSessionMutations(bridge)` before routing edits here.
166
+ */
167
+ commitCellFormulaInSession?(handleId: string, request: XlsxFormulaCommitRequest): XlsxFormulaCommitResult;
168
+ commitRangeClearInSession?(handleId: string, request: XlsxRangeClearCommitRequest): XlsxRangeClearCommitResult;
169
+ recalculateInSession?(handleId: string, request?: XlsxSessionRecalculateRequest): XlsxFormulaRecalculateResult;
170
+ exportRuntimeSessionBytes?(handleId: string, request?: XlsxRuntimeSessionExportRequest): XlsxRuntimeSessionExportResult;
171
+ /**
172
+ * X5-U-012: full-sheet delimited-text (CSV/TSV) export of one sheet, read
173
+ * only. Separately optional from the mutation family above — it landed
174
+ * later, so a wasm build can carry the mutation ports without it, and a
175
+ * caller must feature-detect this one method rather than assume it from
176
+ * `supportsRuntimeSessionMutations`.
177
+ */
178
+ exportRuntimeSessionDelimitedText?(handleId: string, request?: XlsxRuntimeSessionDelimitedExportRequest): XlsxRuntimeSessionDelimitedExportResult;
179
+ commitRangeFillInSession?(handleId: string, request: XlsxRangeFillCommitRequest): XlsxRangeFillCommitResult;
180
+ commitRangePasteInSession?(handleId: string, request: XlsxRangePasteCommitRequest): XlsxRangePasteCommitResult;
181
+ commitRangeTransferInSession?(handleId: string, request: XlsxRangeTransferCommitRequest): XlsxRangeTransferCommitResult;
182
+ commitRangeFormatInSession?(handleId: string, request: XlsxRangeFormatCommitRequest): XlsxRangeFormatCommitResult;
183
+ resizeColumnWidthInSession?(handleId: string, request: XlsxLayoutMetricResizeRequest): XlsxLayoutMetricResizeResult;
184
+ resizeRowHeightInSession?(handleId: string, request: XlsxLayoutMetricResizeRequest): XlsxLayoutMetricResizeResult;
185
+ setColumnHiddenInSession?(handleId: string, request: XlsxLayoutMetricVisibilityRequest): XlsxLayoutMetricVisibilityResult;
186
+ setRowHiddenInSession?(handleId: string, request: XlsxLayoutMetricVisibilityRequest): XlsxLayoutMetricVisibilityResult;
187
+ setFrozenPaneInSession?(handleId: string, request: XlsxFrozenPaneRequest): XlsxFrozenPaneResult;
188
+ mergeCellsInSession?(handleId: string, request: XlsxMergeCellsRequest): XlsxMergeCellsResult;
189
+ mutateSheetStructureInSession?(handleId: string, request: XlsxSheetStructureMutationRequest): XlsxSheetStructureMutationResult;
190
+ mutateSheetTabsInSession?(handleId: string, request: XlsxSheetTabMutationRequest): XlsxSheetTabMutationResult;
191
+ commitTableAppendRowInSession?(handleId: string, request: XlsxTableAppendRowRequest): XlsxTableAppendRowResult;
192
+ commitShiftCellsInSession?(handleId: string, request: XlsxShiftCellsCommitRequest): XlsxShiftCellsCommitResult;
193
+ commitRangeFill(bytes: Uint8Array, request: XlsxRangeFillCommitRequest): XlsxRangeFillCommitResult;
194
+ commitRangePaste(bytes: Uint8Array, request: XlsxRangePasteCommitRequest): XlsxRangePasteCommitResult;
195
+ commitRangeTransfer(bytes: Uint8Array, request: XlsxRangeTransferCommitRequest): XlsxRangeTransferCommitResult;
196
+ commitRangeClear(bytes: Uint8Array, request: XlsxRangeClearCommitRequest): XlsxRangeClearCommitResult;
197
+ commitRangeFormat(bytes: Uint8Array, request: XlsxRangeFormatCommitRequest): XlsxRangeFormatCommitResult;
198
+ commitRangeHyperlink(bytes: Uint8Array, request: XlsxRangeHyperlinkCommitRequest): XlsxRangeHyperlinkCommitResult;
199
+ /**
200
+ * X5-U-011 (bridge v31): author or clear a data-validation rule over a range.
201
+ * v32: `ruleType` gains `any` and `time`, and the comparison kinds take an
202
+ * optional `operator` (single-bound operators read `minimum` alone).
203
+ */
204
+ commitRangeDataValidation(bytes: Uint8Array, request: XlsxRangeDataValidationCommitRequest): XlsxRangeDataValidationCommitResult;
205
+ /**
206
+ * X5-U-010b (bridge v33): the `review.comment` verb on one cell — create a
207
+ * note or a threaded comment, edit, reply, resolve, reopen, delete.
208
+ */
209
+ commitReviewComment(bytes: Uint8Array, request: XlsxReviewCommentCommitRequest): XlsxReviewCommentCommitResult;
210
+ commitSelectionSetPaste(bytes: Uint8Array, request: XlsxSelectionSetPasteCommitRequest): XlsxRangePasteCommitResult;
211
+ commitSelectionSetClear(bytes: Uint8Array, request: XlsxSelectionSetClearCommitRequest): XlsxRangeClearCommitResult;
212
+ commitSelectionSetFormat(bytes: Uint8Array, request: XlsxSelectionSetFormatCommitRequest): XlsxRangeFormatCommitResult;
213
+ resizeColumnWidth(bytes: Uint8Array, request: XlsxLayoutMetricResizeRequest): XlsxLayoutMetricResizeResult;
214
+ resizeRowHeight(bytes: Uint8Array, request: XlsxLayoutMetricResizeRequest): XlsxLayoutMetricResizeResult;
215
+ setColumnHidden(bytes: Uint8Array, request: XlsxLayoutMetricVisibilityRequest): XlsxLayoutMetricVisibilityResult;
216
+ setRowHidden(bytes: Uint8Array, request: XlsxLayoutMetricVisibilityRequest): XlsxLayoutMetricVisibilityResult;
217
+ /** X5-U-004 freeze/unfreeze panes (frozen-pane-v1). */
218
+ setFrozenPane(bytes: Uint8Array, request: XlsxFrozenPaneRequest): XlsxFrozenPaneResult;
219
+ /** X5-U-037 merge/unmerge cells (merge-cells-v1). */
220
+ mergeCells(bytes: Uint8Array, request: XlsxMergeCellsRequest): XlsxMergeCellsResult;
221
+ setColumnOutlineGroupHidden(bytes: Uint8Array, request: XlsxLayoutMetricVisibilityRequest): XlsxOutlineGroupVisibilityResult;
222
+ setRowOutlineGroupHidden(bytes: Uint8Array, request: XlsxLayoutMetricVisibilityRequest): XlsxOutlineGroupVisibilityResult;
223
+ setSheetOutlineLevel(bytes: Uint8Array, request: XlsxOutlineLevelRequest): XlsxOutlineLevelResult;
224
+ mutateSheetStructure(bytes: Uint8Array, request: XlsxSheetStructureMutationRequest): XlsxSheetStructureMutationResult;
225
+ commitTableAppendRow(bytes: Uint8Array, request: XlsxTableAppendRowRequest): XlsxTableAppendRowResult;
226
+ commitApplyFilter(bytes: Uint8Array, request: XlsxRangeFilterApplyRequest): XlsxRangeFilterResult;
227
+ commitClearFilter(bytes: Uint8Array, request: XlsxRangeFilterClearRequest): XlsxRangeFilterResult;
228
+ commitApplySort(bytes: Uint8Array, request: XlsxRangeSortRequest): XlsxRangeSortResult;
229
+ mutateSheetTabs(bytes: Uint8Array, request: XlsxSheetTabMutationRequest): XlsxSheetTabMutationResult;
230
+ /** X5-U-006 insert/delete cells with shift (shift-cells-v1). */
231
+ commitShiftCells(bytes: Uint8Array, request: XlsxShiftCellsCommitRequest): XlsxShiftCellsCommitResult;
232
+ }
233
+ export interface XlsxWasmBridgeLoadResult {
234
+ readonly wasmBinding: "mounted" | "not-mounted";
235
+ readonly bridge?: XlsxWasmBridge;
236
+ readonly reason?: string;
237
+ }
238
+ /**
239
+ * T1: bridge narrowed to the runtime-session-mutations-v1 surface. Produced
240
+ * by `supportsRuntimeSessionMutations`; never construct by casting.
241
+ */
242
+ export interface XlsxRuntimeSessionMutationBridge extends XlsxWasmBridge {
243
+ commitCellFormulaInSession(handleId: string, request: XlsxFormulaCommitRequest): XlsxFormulaCommitResult;
244
+ commitRangeClearInSession(handleId: string, request: XlsxRangeClearCommitRequest): XlsxRangeClearCommitResult;
245
+ recalculateInSession(handleId: string, request?: XlsxSessionRecalculateRequest): XlsxFormulaRecalculateResult;
246
+ exportRuntimeSessionBytes(handleId: string, request?: XlsxRuntimeSessionExportRequest): XlsxRuntimeSessionExportResult;
247
+ commitRangeFillInSession(handleId: string, request: XlsxRangeFillCommitRequest): XlsxRangeFillCommitResult;
248
+ commitRangePasteInSession(handleId: string, request: XlsxRangePasteCommitRequest): XlsxRangePasteCommitResult;
249
+ commitRangeTransferInSession(handleId: string, request: XlsxRangeTransferCommitRequest): XlsxRangeTransferCommitResult;
250
+ commitRangeFormatInSession(handleId: string, request: XlsxRangeFormatCommitRequest): XlsxRangeFormatCommitResult;
251
+ resizeColumnWidthInSession(handleId: string, request: XlsxLayoutMetricResizeRequest): XlsxLayoutMetricResizeResult;
252
+ resizeRowHeightInSession(handleId: string, request: XlsxLayoutMetricResizeRequest): XlsxLayoutMetricResizeResult;
253
+ setColumnHiddenInSession(handleId: string, request: XlsxLayoutMetricVisibilityRequest): XlsxLayoutMetricVisibilityResult;
254
+ setRowHiddenInSession(handleId: string, request: XlsxLayoutMetricVisibilityRequest): XlsxLayoutMetricVisibilityResult;
255
+ setFrozenPaneInSession(handleId: string, request: XlsxFrozenPaneRequest): XlsxFrozenPaneResult;
256
+ mergeCellsInSession(handleId: string, request: XlsxMergeCellsRequest): XlsxMergeCellsResult;
257
+ mutateSheetStructureInSession(handleId: string, request: XlsxSheetStructureMutationRequest): XlsxSheetStructureMutationResult;
258
+ mutateSheetTabsInSession(handleId: string, request: XlsxSheetTabMutationRequest): XlsxSheetTabMutationResult;
259
+ commitTableAppendRowInSession(handleId: string, request: XlsxTableAppendRowRequest): XlsxTableAppendRowResult;
260
+ commitShiftCellsInSession(handleId: string, request: XlsxShiftCellsCommitRequest): XlsxShiftCellsCommitResult;
261
+ }
262
+ /**
263
+ * T1 feature detection: true when the mounted wasm build advertises
264
+ * `runtime-session-mutations-v1` AND the session-mutation methods were
265
+ * attached from the raw module object. Older wasm builds fail this check and
266
+ * callers must stay on the byte-based mutation surface (see
267
+ * `createXlsxWorkbookMutationRouter` for the routing/fallback seam).
268
+ */
269
+ /**
270
+ * The capabilities in `required` that `bridge` does not advertise. Hosts gate
271
+ * on the capabilities they call instead of pinning a bridge version, which
272
+ * changes whenever the native contract grows.
273
+ */
274
+ export declare function missingXlsxWasmCapabilities(bridge: XlsxWasmBridge, required: readonly string[]): string[];
275
+ export declare function supportsRuntimeSessionMutations(bridge: XlsxWasmBridge): bridge is XlsxRuntimeSessionMutationBridge;
276
+ export interface RawXlsxWasmModule {
277
+ getWasmStatus(): XlsxWasmBridgeStatus;
278
+ openWorkbookRuntimeSession(bytes: Uint8Array, request?: XlsxRuntimeSessionOpenRequest): XlsxRuntimeSessionHandle;
279
+ disposeWorkbookRuntimeSession(handleId: string): XlsxRuntimeSessionDisposeResult;
280
+ inspectWorkbookRuntimeSession(handleId: string): XlsxAiWorkbookInspection;
281
+ listRuntimeSessionScopes(handleId: string, request?: XlsxAiScopeListRequest): XlsxAiScopeListResult;
282
+ readRuntimeSessionCompressedContext(handleId: string, request?: XlsxAiCompressedContextRequest): XlsxAiCompressedContextResult;
283
+ readRuntimeSessionCompressedDrilldown(handleId: string, request: XlsxAiCompressedDrilldownRequest): XlsxAiCompressedDrilldownResult;
284
+ explainRuntimeSessionFormula(handleId: string, target: XlsxScopeHandle | XlsxAiReferenceQuery): XlsxAiFormulaExplanationResult | XlsxAiReferenceResolution;
285
+ bindUiRuntimeSession(handleId: string, requestedActiveSheetId?: string): XlsxUiSessionBinding;
286
+ readRuntimeSessionSelection(handleId: string, handle: XlsxScopeHandle, viewportHint?: XlsxUiViewportHint, workflowContext?: XlsxWorkflowContextInput, selectionCursor?: XlsxUiSelectionCursor): XlsxUiSelectionReadback;
287
+ readRuntimeSessionSelectionSet(handleId: string, request: XlsxSelectionSetRequest): XlsxUiSelectionSetReadback;
288
+ summarizeRuntimeSessionAccessibility(handleId: string, handle: XlsxScopeHandle, viewportHint?: XlsxUiViewportHint, workflowContext?: XlsxWorkflowContextInput): XlsxUiAccessibilitySummary;
289
+ /**
290
+ * X5-U-038 (bridge v34): Excel's Find over the canonical session workbook
291
+ * — current sheet or every visible sheet, values or formulas, match case,
292
+ * match entire cell, `?` `*` `~` wildcards. Read-only; the answer is the
293
+ * ordered match list with a cell handle per match and the count facts, or
294
+ * the typed refusal of the query.
295
+ */
296
+ findInRuntimeSession(handleId: string, request: XlsxFindRequest): XlsxFindResult;
297
+ /**
298
+ * X5-U-023 (bridge v35): name-box / Go To resolution over the canonical
299
+ * session workbook — an address, a range, whole rows or columns, a
300
+ * sheet-qualified reference, or a defined name with Excel's scope
301
+ * precedence. Read-only; the answer is the target sheet, range, label and
302
+ * the selection handle the selection command takes, or a typed refusal.
303
+ */
304
+ goToInRuntimeSession(handleId: string, request: XlsxGoToRequest): XlsxGoToResult;
305
+ /** X3-R-012 (bridge v40): Excel's Ctrl+Arrow / Ctrl+Shift+Arrow / Ctrl+A targets over the canonical session workbook. Read-only. */
306
+ dataRegionInRuntimeSession(handleId: string, request: XlsxDataRegionRequest): XlsxDataRegionResult;
307
+ readRuntimeSessionSheetWindow(handleId: string, viewportHint: XlsxUiViewportHint, activeHandle?: XlsxScopeHandle, workflowContext?: XlsxWorkflowContextInput): XlsxUiSheetWindowReadback;
308
+ /**
309
+ * Optional T5 binary sheet-window export — absent on wasm builds older
310
+ * than `sheet-window-binary-v1`; the mount gate does not require it.
311
+ */
312
+ readRuntimeSessionSheetWindowBinary?(handleId: string, viewportHint: XlsxUiViewportHint, activeHandle?: XlsxScopeHandle, workflowContext?: XlsxWorkflowContextInput): RawXlsxSheetWindowBinaryEnvelope;
313
+ readRuntimeSessionOverlayLanes(handleId: string, request?: XlsxUiOverlayLanesRequest): XlsxUiOverlayLanesReadback;
314
+ readRuntimeSessionKernelPanel(handleId: string, workflowContext?: XlsxWorkflowContextInput): XlsxKernelPanelReadback;
315
+ readRuntimeSessionMediaBytes(handleId: string, mediaId: string): RawXlsxMediaBytesReadback;
316
+ readRuntimeSessionChartBytes(handleId: string, chartId: string): XlsxChartBytesReadback;
317
+ inspectWorkbook(bytes: Uint8Array, sourceLabel?: string): XlsxAiWorkbookInspection;
318
+ readPreserveOnlyEntities(bytes: Uint8Array, sourceLabel?: string): XlsxPreserveOnlyEntitiesReadback;
319
+ readRuntimeSessionPreserveOnlyEntities(handleId: string): XlsxPreserveOnlyEntitiesReadback;
320
+ listScopes(bytes: Uint8Array, request?: XlsxAiScopeListRequest): XlsxAiScopeListResult;
321
+ readCompressedContext(bytes: Uint8Array, request?: XlsxAiCompressedContextRequest): XlsxAiCompressedContextResult;
322
+ readCompressedDrilldown(bytes: Uint8Array, request: XlsxAiCompressedDrilldownRequest): XlsxAiCompressedDrilldownResult;
323
+ resolveReference(bytes: Uint8Array, query: XlsxAiReferenceQuery): XlsxAiReferenceResolution;
324
+ explainFormula(bytes: Uint8Array, target: XlsxScopeHandle | XlsxAiReferenceQuery): XlsxAiFormulaExplanationResult | XlsxAiReferenceResolution;
325
+ bindUiSession(bytes: Uint8Array, requestedActiveSheetId?: string): XlsxUiSessionBinding;
326
+ classifyUiState(namespace: XlsxUiStateNamespace): XlsxUiStateClass;
327
+ projectViewportHint(bytes: Uint8Array, hint: XlsxUiViewportHint): XlsxUiViewportReadback;
328
+ readSelection(bytes: Uint8Array, handle: XlsxScopeHandle, viewportHint?: XlsxUiViewportHint, workflowContext?: XlsxWorkflowContextInput, selectionCursor?: XlsxUiSelectionCursor): XlsxUiSelectionReadback;
329
+ readSelectionSet(bytes: Uint8Array, request: XlsxSelectionSetRequest): XlsxUiSelectionSetReadback;
330
+ summarizeAccessibility(bytes: Uint8Array, handle: XlsxScopeHandle, viewportHint?: XlsxUiViewportHint, workflowContext?: XlsxWorkflowContextInput): XlsxUiAccessibilitySummary;
331
+ readSheetWindow(bytes: Uint8Array, viewportHint: XlsxUiViewportHint, activeHandle?: XlsxScopeHandle, workflowContext?: XlsxWorkflowContextInput): XlsxUiSheetWindowReadback;
332
+ readWorkflowOverlayLanes(bytes: Uint8Array, request?: XlsxUiOverlayLanesRequest): XlsxUiOverlayLanesReadback;
333
+ readKernelPanel(bytes: Uint8Array, workflowContext?: XlsxWorkflowContextInput): XlsxKernelPanelReadback;
334
+ validateKernelAction(bytes: Uint8Array, request: XlsxKernelActionRequest): XlsxKernelActionValidation;
335
+ createKernelBinding(bytes: Uint8Array, request: XlsxKernelCreateRequest): RawXlsxKernelMutationResult;
336
+ updateKernelSource(bytes: Uint8Array, request: XlsxKernelActionRequest): RawXlsxKernelMutationResult;
337
+ startKernelRun(bytes: Uint8Array, request: XlsxKernelActionRequest): RawXlsxKernelMutationResult;
338
+ completeKernelRun(bytes: Uint8Array, request: XlsxKernelActionRequest): RawXlsxKernelMutationResult;
339
+ cancelKernelRun(bytes: Uint8Array, request: XlsxKernelActionRequest): RawXlsxKernelMutationResult;
340
+ detachKernelOutput(bytes: Uint8Array, request: XlsxKernelActionRequest): RawXlsxKernelMutationResult;
341
+ deleteKernelBinding(bytes: Uint8Array, request: XlsxKernelActionRequest): RawXlsxKernelMutationResult;
342
+ commitCellFormula(bytes: Uint8Array, request: XlsxFormulaCommitRequest): RawXlsxFormulaCommitResult;
343
+ recalculateFormulas(bytes: Uint8Array, request?: XlsxFormulaRecalculateRequest): RawXlsxFormulaRecalculateResult;
344
+ /**
345
+ * Optional runtime-session-mutations-v1 exports — absent on older
346
+ * generated wasm builds; the mount gate does not require them.
347
+ */
348
+ commitCellFormulaInSession?(handleId: string, request: XlsxFormulaCommitRequest): RawXlsxFormulaCommitResult;
349
+ commitRangeClearInSession?(handleId: string, request: XlsxRangeClearCommitRequest): RawXlsxRangeClearCommitResult;
350
+ recalculateInSession?(handleId: string, request?: XlsxSessionRecalculateRequest): RawXlsxFormulaRecalculateResult;
351
+ exportRuntimeSessionBytes?(handleId: string, request?: XlsxRuntimeSessionExportRequest): RawXlsxRuntimeSessionExportResult;
352
+ /** X5-U-012 delimited-text export; absent on wasm builds older than it. */
353
+ exportRuntimeSessionDelimitedText?(handleId: string, request?: XlsxRuntimeSessionDelimitedExportRequest): XlsxRuntimeSessionDelimitedExportResult;
354
+ commitRangeFillInSession?(handleId: string, request: XlsxRangeFillCommitRequest): RawXlsxRangeFillCommitResult;
355
+ commitRangePasteInSession?(handleId: string, request: XlsxRangePasteCommitRequest): RawXlsxRangePasteCommitResult;
356
+ commitRangeTransferInSession?(handleId: string, request: XlsxRangeTransferCommitRequest): RawXlsxRangeTransferCommitResult;
357
+ commitRangeFormatInSession?(handleId: string, request: XlsxRangeFormatCommitRequest): RawXlsxRangeFormatCommitResult;
358
+ resizeColumnWidthInSession?(handleId: string, request: XlsxLayoutMetricResizeRequest): RawXlsxLayoutMetricResizeResult;
359
+ resizeRowHeightInSession?(handleId: string, request: XlsxLayoutMetricResizeRequest): RawXlsxLayoutMetricResizeResult;
360
+ setColumnHiddenInSession?(handleId: string, request: XlsxLayoutMetricVisibilityRequest): RawXlsxLayoutMetricVisibilityResult;
361
+ setRowHiddenInSession?(handleId: string, request: XlsxLayoutMetricVisibilityRequest): RawXlsxLayoutMetricVisibilityResult;
362
+ setFrozenPaneInSession?(handleId: string, request: XlsxFrozenPaneRequest): RawXlsxFrozenPaneResult;
363
+ mergeCellsInSession?(handleId: string, request: XlsxMergeCellsRequest): RawXlsxMergeCellsResult;
364
+ mutateSheetStructureInSession?(handleId: string, request: XlsxSheetStructureMutationRequest): RawXlsxSheetStructureMutationResult;
365
+ mutateSheetTabsInSession?(handleId: string, request: XlsxSheetTabMutationRequest): RawXlsxSheetTabMutationResult;
366
+ commitTableAppendRowInSession?(handleId: string, request: XlsxTableAppendRowRequest): RawXlsxTableAppendRowResult;
367
+ commitShiftCellsInSession?(handleId: string, request: XlsxShiftCellsCommitRequest): RawXlsxShiftCellsCommitResult;
368
+ commitRangeFill(bytes: Uint8Array, request: XlsxRangeFillCommitRequest): RawXlsxRangeFillCommitResult;
369
+ commitRangePaste(bytes: Uint8Array, request: XlsxRangePasteCommitRequest): RawXlsxRangePasteCommitResult;
370
+ commitRangeTransfer(bytes: Uint8Array, request: XlsxRangeTransferCommitRequest): RawXlsxRangeTransferCommitResult;
371
+ commitRangeClear(bytes: Uint8Array, request: XlsxRangeClearCommitRequest): RawXlsxRangeClearCommitResult;
372
+ commitRangeFormat(bytes: Uint8Array, request: XlsxRangeFormatCommitRequest): RawXlsxRangeFormatCommitResult;
373
+ commitRangeHyperlink(bytes: Uint8Array, request: XlsxRangeHyperlinkCommitRequest): RawXlsxRangeHyperlinkCommitResult;
374
+ commitRangeDataValidation(bytes: Uint8Array, request: XlsxRangeDataValidationCommitRequest): RawXlsxRangeDataValidationCommitResult;
375
+ commitReviewComment(bytes: Uint8Array, request: XlsxReviewCommentCommitRequest): RawXlsxReviewCommentCommitResult;
376
+ commitSelectionSetPaste(bytes: Uint8Array, request: XlsxSelectionSetPasteCommitRequest): RawXlsxRangePasteCommitResult;
377
+ commitSelectionSetClear(bytes: Uint8Array, request: XlsxSelectionSetClearCommitRequest): RawXlsxRangeClearCommitResult;
378
+ commitSelectionSetFormat(bytes: Uint8Array, request: XlsxSelectionSetFormatCommitRequest): RawXlsxRangeFormatCommitResult;
379
+ resizeColumnWidth(bytes: Uint8Array, request: XlsxLayoutMetricResizeRequest): RawXlsxLayoutMetricResizeResult;
380
+ resizeRowHeight(bytes: Uint8Array, request: XlsxLayoutMetricResizeRequest): RawXlsxLayoutMetricResizeResult;
381
+ setColumnHidden(bytes: Uint8Array, request: XlsxLayoutMetricVisibilityRequest): RawXlsxLayoutMetricVisibilityResult;
382
+ setRowHidden(bytes: Uint8Array, request: XlsxLayoutMetricVisibilityRequest): RawXlsxLayoutMetricVisibilityResult;
383
+ setFrozenPane(bytes: Uint8Array, request: XlsxFrozenPaneRequest): RawXlsxFrozenPaneResult;
384
+ mergeCells(bytes: Uint8Array, request: XlsxMergeCellsRequest): RawXlsxMergeCellsResult;
385
+ setColumnOutlineGroupHidden(bytes: Uint8Array, request: XlsxLayoutMetricVisibilityRequest): RawXlsxOutlineGroupVisibilityResult;
386
+ setRowOutlineGroupHidden(bytes: Uint8Array, request: XlsxLayoutMetricVisibilityRequest): RawXlsxOutlineGroupVisibilityResult;
387
+ setSheetOutlineLevel(bytes: Uint8Array, request: XlsxOutlineLevelRequest): RawXlsxOutlineLevelResult;
388
+ mutateSheetStructure(bytes: Uint8Array, request: XlsxSheetStructureMutationRequest): RawXlsxSheetStructureMutationResult;
389
+ commitTableAppendRow(bytes: Uint8Array, request: XlsxTableAppendRowRequest): RawXlsxTableAppendRowResult;
390
+ commitApplyFilter(bytes: Uint8Array, request: XlsxRangeFilterApplyRequest): RawXlsxRangeFilterResult;
391
+ commitClearFilter(bytes: Uint8Array, request: XlsxRangeFilterClearRequest): RawXlsxRangeFilterResult;
392
+ commitApplySort(bytes: Uint8Array, request: XlsxRangeSortRequest): RawXlsxRangeSortResult;
393
+ mutateSheetTabs(bytes: Uint8Array, request: XlsxSheetTabMutationRequest): RawXlsxSheetTabMutationResult;
394
+ commitShiftCells(bytes: Uint8Array, request: XlsxShiftCellsCommitRequest): RawXlsxShiftCellsCommitResult;
395
+ }
396
+ type RawXlsxFormulaCommitResult = Omit<XlsxFormulaCommitResult, "exportedBytes"> & {
397
+ readonly exportedBytes?: Uint8Array | readonly number[];
398
+ };
399
+ type RawXlsxFormulaRecalculateResult = Omit<XlsxFormulaRecalculateResult, "exportedBytes"> & {
400
+ readonly exportedBytes?: Uint8Array | readonly number[];
401
+ };
402
+ type RawXlsxRangeFillCommitResult = Omit<XlsxRangeFillCommitResult, "exportedBytes"> & {
403
+ readonly exportedBytes?: Uint8Array | readonly number[];
404
+ };
405
+ type RawXlsxRangePasteCommitResult = Omit<XlsxRangePasteCommitResult, "exportedBytes"> & {
406
+ readonly exportedBytes?: Uint8Array | readonly number[];
407
+ };
408
+ type RawXlsxRangeTransferCommitResult = Omit<XlsxRangeTransferCommitResult, "exportedBytes"> & {
409
+ readonly exportedBytes?: Uint8Array | readonly number[];
410
+ };
411
+ type RawXlsxRangeClearCommitResult = Omit<XlsxRangeClearCommitResult, "exportedBytes"> & {
412
+ readonly exportedBytes?: Uint8Array | readonly number[];
413
+ };
414
+ type RawXlsxRangeFormatCommitResult = Omit<XlsxRangeFormatCommitResult, "exportedBytes"> & {
415
+ readonly exportedBytes?: Uint8Array | readonly number[];
416
+ };
417
+ type RawXlsxRangeHyperlinkCommitResult = Omit<XlsxRangeHyperlinkCommitResult, "exportedBytes"> & {
418
+ readonly exportedBytes?: Uint8Array | readonly number[];
419
+ };
420
+ type RawXlsxRangeDataValidationCommitResult = Omit<XlsxRangeDataValidationCommitResult, "exportedBytes"> & {
421
+ readonly exportedBytes?: Uint8Array | readonly number[];
422
+ };
423
+ type RawXlsxReviewCommentCommitResult = Omit<XlsxReviewCommentCommitResult, "exportedBytes"> & {
424
+ readonly exportedBytes?: Uint8Array | readonly number[];
425
+ };
426
+ type RawXlsxLayoutMetricResizeResult = Omit<XlsxLayoutMetricResizeResult, "exportedBytes"> & {
427
+ readonly exportedBytes?: Uint8Array | readonly number[];
428
+ };
429
+ type RawXlsxLayoutMetricVisibilityResult = Omit<XlsxLayoutMetricVisibilityResult, "exportedBytes"> & {
430
+ readonly exportedBytes?: Uint8Array | readonly number[];
431
+ };
432
+ type RawXlsxOutlineGroupVisibilityResult = Omit<XlsxOutlineGroupVisibilityResult, "exportedBytes"> & {
433
+ readonly exportedBytes?: Uint8Array | readonly number[];
434
+ };
435
+ type RawXlsxOutlineLevelResult = Omit<XlsxOutlineLevelResult, "exportedBytes"> & {
436
+ readonly exportedBytes?: Uint8Array | readonly number[];
437
+ };
438
+ type RawXlsxFrozenPaneResult = Omit<XlsxFrozenPaneResult, "exportedBytes"> & {
439
+ readonly exportedBytes?: Uint8Array | readonly number[];
440
+ };
441
+ type RawXlsxMergeCellsResult = Omit<XlsxMergeCellsResult, "exportedBytes"> & {
442
+ readonly exportedBytes?: Uint8Array | readonly number[];
443
+ };
444
+ type RawXlsxSheetStructureMutationResult = Omit<XlsxSheetStructureMutationResult, "exportedBytes"> & {
445
+ readonly exportedBytes?: Uint8Array | readonly number[];
446
+ };
447
+ type RawXlsxTableAppendRowResult = Omit<XlsxTableAppendRowResult, "exportedBytes"> & {
448
+ readonly exportedBytes?: Uint8Array | readonly number[];
449
+ };
450
+ type RawXlsxRangeFilterResult = Omit<XlsxRangeFilterResult, "exportedBytes"> & {
451
+ readonly exportedBytes?: Uint8Array | readonly number[];
452
+ };
453
+ type RawXlsxRangeSortResult = Omit<XlsxRangeSortResult, "exportedBytes"> & {
454
+ readonly exportedBytes?: Uint8Array | readonly number[];
455
+ };
456
+ type RawXlsxSheetTabMutationResult = Omit<XlsxSheetTabMutationResult, "exportedBytes"> & {
457
+ readonly exportedBytes?: Uint8Array | readonly number[];
458
+ };
459
+ type RawXlsxShiftCellsCommitResult = Omit<XlsxShiftCellsCommitResult, "exportedBytes"> & {
460
+ readonly exportedBytes?: Uint8Array | readonly number[];
461
+ };
462
+ type RawXlsxKernelMutationResult = Omit<XlsxKernelMutationResult, "exportedBytes"> & {
463
+ readonly exportedBytes?: Uint8Array | readonly number[];
464
+ };
465
+ type RawXlsxRuntimeSessionExportResult = Omit<XlsxRuntimeSessionExportResult, "exportedBytes"> & {
466
+ readonly exportedBytes?: Uint8Array | readonly number[];
467
+ };
468
+ /**
469
+ * BR-3 (bridge v18) media-bytes readback: digest-verified bytes plus the
470
+ * allowlisted content type and SHA-256 hex digest.
471
+ */
472
+ export interface XlsxMediaBytesReadback {
473
+ readonly bytes: Uint8Array;
474
+ readonly contentType: string;
475
+ readonly sha256: string;
476
+ }
477
+ /**
478
+ * Typed refusal codes thrown by `readRuntimeSessionMediaBytes` — the
479
+ * one-to-one wire mirror of the substrate `MediaAccessError` variants.
480
+ */
481
+ export type XlsxMediaAccessErrorCode = "invalid-media-id" | "unknown-media-id" | "disallowed-path" | "disallowed-content-type" | "digest-mismatch";
482
+ type RawXlsxMediaBytesReadback = Omit<XlsxMediaBytesReadback, "bytes"> & {
483
+ readonly bytes: Uint8Array | readonly number[];
484
+ };
485
+ type RawXlsxSheetWindowBinaryEnvelope = Omit<XlsxSheetWindowBinaryEnvelope, "bytes"> & {
486
+ readonly bytes: Uint8Array | readonly number[];
487
+ };
488
+ /**
489
+ * D4-R2b (bridge v20) chart-bytes readback: digest-verified chart XML plus
490
+ * the workbook theme XML (when present) and the SHA-256 hex digest. Strings
491
+ * cross the bridge as-is — no byte normalization needed.
492
+ */
493
+ export interface XlsxChartBytesReadback {
494
+ readonly chartXml: string;
495
+ readonly themeXml?: string;
496
+ readonly sha256: string;
497
+ }
498
+ /**
499
+ * Typed refusal codes thrown by `readRuntimeSessionChartBytes` — the
500
+ * one-to-one wire mirror of the substrate `ChartAccessError` variants
501
+ * (same kebab vocabulary as the media family).
502
+ */
503
+ export type XlsxChartAccessErrorCode = "invalid-chart-id" | "unknown-chart-id" | "disallowed-path" | "disallowed-content-type" | "digest-mismatch";
504
+ export { createSheetWindowDecodedReader, decodeSheetWindowBinary, SHEET_WINDOW_BINARY_SCHEMA_ID, type SheetWindowBinaryDecodeOptions, type SheetWindowDecodedReaderDeps, type XlsxSheetWindowBinaryEnvelope, type XlsxSheetWindowBinaryRest, type XlsxSheetWindowRareCell } from "./sheet-window-binary.ts";
505
+ export interface XlsxPreserveOnlyEntityReadback {
506
+ readonly key: string;
507
+ readonly kind: "chart" | "pivot-table" | "pivot-cache" | "solver-model" | "scenario" | "external-source" | "validation-region" | "comment-thread" | "unknown";
508
+ readonly sourceLabel: string;
509
+ readonly sourceDigestPrefix: string;
510
+ readonly provenance: "generated" | "derived" | "marker-backed";
511
+ readonly editable: boolean;
512
+ }
513
+ export interface XlsxPreserveOnlyEntitiesReadback {
514
+ readonly verdict: "available";
515
+ readonly entityCount: number;
516
+ readonly entities: readonly XlsxPreserveOnlyEntityReadback[];
517
+ }
518
+ /**
519
+ * Result of validating a raw wasm module object against the bridge
520
+ * contract. `reason` is the soft not-mounted loader reason;
521
+ * `requiredModeMessage` is the message loaders throw in required mode
522
+ * (identical to `reason` except where the historical node loader
523
+ * distinguished them).
524
+ */
525
+ export type XlsxRawWasmModuleValidation = {
526
+ readonly ok: true;
527
+ readonly status: XlsxWasmBridgeStatus;
528
+ } | {
529
+ readonly ok: false;
530
+ readonly reason: string;
531
+ readonly requiredModeMessage: string;
532
+ };
533
+ /**
534
+ * Target-independent mount gate: role, bridge version, required
535
+ * capabilities, and required raw methods. Both the Node.js loader
536
+ * (`loadGeneratedXlsxWasmBridge`) and the browser loader
537
+ * (`loadXlsxWasmBridgeWeb`) run this exact check so the two artifacts can
538
+ * never mount divergent contracts.
539
+ */
540
+ export declare function validateRawXlsxWasmModule(raw: RawXlsxWasmModule): XlsxRawWasmModuleValidation;
541
+ export declare function createXlsxWasmBridge(raw: RawXlsxWasmModule, status?: XlsxWasmBridgeStatus): XlsxWasmBridge;