Skip to content
1 min read · 178 words

Interface: EditCapability ​

Defined in: src/batteries/media/contracts.ts:441

A structural document-editing capability group: every op in ops is applicable to every input matching over.

Remarks ​

Two engines may declare the same ops over the same patterns with different fidelity — e.g. an ExcelJS-backed editor preserves styling while a SheetJS CE-backed one strips it. The registry does not rank fidelity; supply order (or selection middleware) decides, which makes the trade-off the consumer's visible composition decision.

Properties ​

PropertyTypeDescriptionDefined in
opsreadonly string[]Operation names supported (sheet.update_cells, sheet.add_rows, …).src/batteries/media/contracts.ts:445
overreadonly string[]Input patterns this block edits.src/batteries/media/contracts.ts:443

Methods ​

edit() ​

ts
edit(request: EditRequest): Promise<EditResult>;

Defined in: src/batteries/media/contracts.ts:452

Apply one structural operation.

Parameters ​

ParameterTypeDescription
requestEditRequestThe op, its args, and the input bytes.

Returns ​

Promise<EditResult>

The restructured bytes plus optional change counts.