API reference
@searsuite/sear-plugin-clipboard
Type-neutral Sheet clipboard traversal, serialization, and paste commands.
41 exportsderived from source
- enumSheetPasteModesource ↗
-
enum SheetPasteModeSelects which structured clipboard channels are applied by a paste command.
- classDefaultSheetClipboardCodecsource ↗
-
class DefaultSheetClipboardCodec extends SheetClipboardCodecDefault codec that delegates cell serialization to the cell-type registry.
constructorconstructor DefaultSheetClipboardCodec(cellCodecs: CellClipboardCodecRegistry): DefaultSheetClipboardCodeccellCodecs: CellClipboardCodecRegistry
methoddecode decode(payload: SheetClipboardPayload, context: SheetClipboardDecodeContext): SheetClipboardDecodedRangepayload: SheetClipboardPayloadcontext: SheetClipboardDecodeContext
methodencode encode(range: SheetRangeBounds, source: SheetClipboardDataSource, visibleRowsOnly?: boolean): SheetClipboardPayloadrange: SheetRangeBoundssource: SheetClipboardDataSourcevisibleRowsOnly: boolean
- classInMemorySheetClipboardsource ↗
-
class InMemorySheetClipboard extends SheetClipboardNode-safe clipboard used when a host does not expose system clipboard I/O.
constructorconstructor InMemorySheetClipboard(): InMemorySheetClipboardmethodread read(): Promise<SheetClipboardPayload | null>methodwrite write(payload: SheetClipboardPayload): Promise<void>payload: SheetClipboardPayload
- classSheetClipboardsource ↗
-
class SheetClipboardPlatform-neutral clipboard abstraction. Implementations own system I/O.
constructorconstructor SheetClipboard(): SheetClipboardpropertysymbolstatic readonly symbol: typeof symbolmethodread read(): Promise<SheetClipboardPayload | null>methodwrite write(payload: SheetClipboardPayload): Promise<void>payload: SheetClipboardPayload
- classSheetClipboardCutSessionsource ↗
-
class SheetClipboardCutSessionTransient cut intent shared by the sheets mounted in one workbook.
constructorconstructor SheetClipboardCutSession(): SheetClipboardCutSessionpropertysymbolstatic readonly symbol: typeof symbolmethodbegin begin(pending: PendingSheetCut): voidpending: PendingSheetCut
methodcancel cancel(): voidmethodgetPending getPending(): PendingSheetCut | null - classSheetClipboardErrorsource ↗
-
class SheetClipboardError extends SearErrorPublic error raised when a clipboard command cannot satisfy its contract.
constructorconstructor SheetClipboardError(code: SheetClipboardErrorCode, message: string, details?: SearErrorDetails): SheetClipboardErrorcode: SheetClipboardErrorCodemessage: stringdetails: SearErrorDetails
propertycode readonly code: SheetClipboardErrorCodeStable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classSheetClipboardPluginsource ↗
-
class SheetClipboardPlugin extends Plugin<unknown, CellProperties, Record<string, never>>, PluginExtension<SheetCommandBus>Default sheet clipboard plugin. System clipboard I/O remains a host-owned SheetClipboardPort.
constructorconstructor SheetClipboardPlugin(source: SheetClipboardDataSource, codec: SheetClipboardCodec): SheetClipboardPluginsource: SheetClipboardDataSourcecodec: SheetClipboardCodec
propertypluginKeystatic readonly pluginKey: PluginKeypropertysymbolstatic readonly symbol: typeof symbolmethodapply apply(state: Record<string, never>, _transaction: Transaction): Record<string, never>Applies a transaction to plugin-owned state and returns the next state.
state: Record<string, never>_transaction: Transaction
methodgetPluginConfig getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
methodregisterCommands registerCommands(commands: SheetCommandBus): voidRegisters the three semantic clipboard commands on this editor's bus.
commands: SheetCommandBus
methodregisterState registerState(): { dataEngine: { enabled: boolean }; key: PluginKey; state: Record<string, never> }Registers one or more plugin-owned state records with the host manager.
methodrender render(): []Produces scene nodes owned by this plugin for the current core state.
Inherited members 30
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetClipboardSheetIdentitysource ↗
-
class SheetClipboardSheetIdentityIdentity of the mounted sheet, stable across workbook sheet remounts.
constructorconstructor SheetClipboardSheetIdentity(id: string): SheetClipboardSheetIdentityid: string
propertyid readonly id: stringpropertysymbolstatic readonly symbol: typeof symbol - interfacePendingSheetCutsource ↗
-
interface PendingSheetCut - interfaceSheetClipboardCodecsource ↗
-
interface SheetClipboardCodecCodec extension point for clipboard envelope and external formats. Cell types register their own handlers separately.
methoddecode decode(payload: SheetClipboardPayload, context: SheetClipboardDecodeContext): SheetClipboardDecodedRangepayload: SheetClipboardPayloadcontext: SheetClipboardDecodeContext
methodencode encode(range: SheetRangeBounds, source: SheetClipboardDataSource, visibleRowsOnly?: boolean): SheetClipboardPayloadrange: SheetRangeBoundssource: SheetClipboardDataSourcevisibleRowsOnly: boolean
- interfaceSheetClipboardCommandResultsource ↗
-
interface SheetClipboardCommandResult extends SheetCommandResultResult shared by copy and cut commands.
- interfaceSheetClipboardDataSourcesource ↗
-
interface SheetClipboardDataSourceData source required by the clipboard plugin; selection and storage stay replaceable.
propertycutSession readonly cutSession?: SheetClipboardCutSessionpropertycutSourceId readonly cutSourceId?: stringpropertyformatTarget readonly formatTarget: PluginKeypropertytarget readonly target: PluginKeymethodcaptureMergedRanges captureMergedRanges(range: SheetRangeBounds): readonly SheetClipboardMergedRange[]range: SheetRangeBounds
methodcaptureOwnerFormats captureOwnerFormats(range: SheetRangeBounds): readonly SheetPortableFormatTransfer[]range: SheetRangeBounds
methodclearOwnerFormats clearOwnerFormats(range: SheetRangeBounds): readonly SheetFormatTransferPlan[]range: SheetRangeBounds
methodcreateClipboardCutId createClipboardCutId(): stringmethodgetColumnCount getColumnCount(): numbermethodgetMergedRange getMergedRange(row: number, column: number): SheetRangeBounds | nullOptional host projection for rejecting writes hidden by merged cells.
row: numbercolumn: number
methodgetRowCount getRowCount(): numbermethodgetSelection getSelection(): SheetRangeBounds | nullmethodisRowVisible isRowVisible(row: number): booleanrow: number
methodplanClearMergedRanges planClearMergedRanges(range: SheetRangeBounds): SheetClipboardMergePlanrange: SheetRangeBounds
methodplanOwnerFormats planOwnerFormats(captured: readonly SheetPortableFormatTransfer[], target: SheetRangeBounds): readonly SheetFormatTransferPlan[]captured: readonly SheetPortableFormatTransfer[]target: SheetRangeBounds
methodplanPasteMergedRanges planPasteMergedRanges(merges: readonly SheetClipboardMergedRange[], target: SheetClipboardCellPoint): SheetClipboardMergePlanmerges: readonly SheetClipboardMergedRange[]target: SheetClipboardCellPoint
methodplanRangeMove planRangeMove(source: SheetClipboardRangeInput, destination: SheetClipboardRangeInput): readonly SheetRangeMovePlan[]source: SheetClipboardRangeInputdestination: SheetClipboardRangeInput
methodprepareCrossSheetCut prepareCrossSheetCut(cutId: string, clearPipeline: Pipeline): voidcutId: stringclearPipeline: Pipeline
methodreadCell readCell(row: number, column: number): CellMatrixElement | nullrow: numbercolumn: number
methodreadCellFormat readCellFormat(row: number, column: number): CellFormat | nullrow: numbercolumn: number
methodscheduleCrossSheetMove scheduleCrossSheetMove(cutId: string, sourceId: string, pastePipeline: Pipeline): Promise<void>cutId: stringsourceId: stringpastePipeline: Pipeline
- interfaceSheetClipboardDecodeContextsource ↗
-
interface SheetClipboardDecodeContextContext supplied to codecs so formula-aware implementations can rebase references on paste.
propertytarget readonly target: SheetClipboardCellPoint - interfaceSheetClipboardDecodedRangesource ↗
-
interface SheetClipboardDecodedRangeDecoded value and format matrices ready for parallel paste transactions.
propertyformats readonly formats?: readonly readonly CellFormat | null[][]Present only when the source supplied editor-native format metadata.
propertymerges readonly merges?: readonly SheetClipboardMergedRange[]propertyownerFormats readonly ownerFormats?: readonly SheetPortableFormatTransfer[]propertyownerFormatsByRow readonly ownerFormatsByRow?: readonly readonly SheetPortableFormatTransfer[][]propertyrows readonly rows: readonly SheetClipboardDecodedRow[] - interfaceSheetClipboardMergedRangesource ↗
-
interface SheetClipboardMergedRangeInclusive merged range relative to the copied range's top-left cell.
- interfaceSheetClipboardMergePlansource ↗
-
interface SheetClipboardMergePlanMerge-owner operation plan produced by the active sheet adapter.
propertyoperations readonly operations: readonly Operation[]propertytarget readonly target: PluginKey - interfaceSheetClipboardPayloadsource ↗
-
interface SheetClipboardPayloadPlatform-neutral clipboard data. It is transient and is not a persistence envelope.
propertyplainText readonly plainText: stringPlain text representation suitable for external applications.
propertystructured readonly structured?: SheetClipboardStructuredPayloadOptional editor-native representation preserving cell type and metadata.
- interfaceSheetClipboardRangeInputsource ↗
-
interface SheetClipboardRangeInputInclusive range accepted by clipboard commands.
- interfaceSheetClipboardStructuredPayloadsource ↗
-
interface SheetClipboardStructuredPayloadEditor-owned structured range data carried inside a clipboard payload.
propertycutId readonly cutId?: stringTransient identifier linking a cut and a subsequent paste in Sheet history.
propertyformats readonly formats: readonly readonly CellFormat | null[][]Parallel explicit-format rows. Null means General/no explicit format.
propertyisCut readonly isCut?: trueA cut move keeps formula references anchored to their original targets.
propertykind readonly kind: "searsuite.sheet-range"propertymerges readonly merges?: readonly SheetClipboardMergedRange[]Merge geometry relative to this payload's top-left cell.
propertyownerFormats readonly ownerFormats?: readonly SheetPortableFormatTransfer[]Optional persisted-format snapshots supplied by their state owners.
propertyownerFormatsByRow readonly ownerFormatsByRow?: readonly readonly SheetPortableFormatTransfer[][]Per-row format snapshots for a compacted visible-row selection.
propertyrows readonly rows: readonly SheetClipboardRow[]propertysource readonly source: SheetClipboardCellPointOriginal top-left coordinate, supplied to cell-type paste codecs.
propertysourceRows readonly sourceRows?: readonly number[]Original row coordinates when a filtered selection is compacted on copy.
propertyversion readonly version: 3 - interfaceSheetCopyRangeInputsource ↗
-
interface SheetCopyRangeInputOptional explicit range; omitted means the current editor selection.
propertyrange readonly range?: SheetClipboardRangeInput - interfaceSheetPasteRangeInputsource ↗
-
interface SheetPasteRangeInputInput for pasting a previously decoded or host-read clipboard payload.
- interfaceSheetPasteRangeResultsource ↗
-
interface SheetPasteRangeResult extends SheetCommandResultCommitted target range, used by hosts to select the pasted cells.
propertyrange readonly range: SheetClipboardRangeInputpropertyworkbookMove readonly workbookMove?: true - typeSheetClipboardCellPointsource ↗
-
type SheetClipboardCellPoint = readonly [number, number]A zero-based cell coordinate expressed as
[row, column]. - typeSheetClipboardDecodedRowsource ↗
-
type SheetClipboardDecodedRow = readonly CellMatrixElement | null[]Decoded cells ready for a paste transaction.
- typeSheetClipboardErrorCodesource ↗
-
type SheetClipboardErrorCode = typeof SheetClipboardErrorCode[keyof typeof SheetClipboardErrorCode]Supported sheet clipboard error code values.
- typeSheetClipboardPortsource ↗
-
type SheetClipboardPort = Pick<SheetClipboard, "read" | "write">Structural port retained as a lightweight host-adapter contract.
- typeSheetClipboardRowsource ↗
-
type SheetClipboardRow = readonly CellClipboardCellPayload | null[]One row in a structured clipboard range, including empty cells.
- variableCancelCutRangeCommandsource ↗
-
CancelCutRangeCommand: SheetCommandDefinition<void, SheetCommandResult>Cancels a pending cut without changing any cell content.
- variableCopyCommandsource ↗
-
CopyCommand: SheetCommandDefinition<void | SheetCopyRangeInput, SheetClipboardCommandResult> - variableCopyRangeCommandsource ↗
-
CopyRangeCommand: SheetCommandDefinition<void | SheetCopyRangeInput, SheetClipboardCommandResult>Typed command that snapshots a range without mutating sheet state.
- variableCutCommandsource ↗
-
CutCommand: SheetCommandDefinition<void | SheetCopyRangeInput, SheetClipboardCommandResult> - variableCutRangeCommandsource ↗
-
CutRangeCommand: SheetCommandDefinition<void | SheetCopyRangeInput, SheetClipboardCommandResult>Typed command that snapshots and clears a range in one sheet transaction.
- variablePasteCommandsource ↗
-
PasteCommand: SheetCommandDefinition<SheetPasteRangeInput, SheetPasteRangeResult> - variablePasteRangeCommandsource ↗
-
PasteRangeCommand: SheetCommandDefinition<SheetPasteRangeInput, SheetPasteRangeResult>Typed command that decodes and writes a payload through the normal sheet transaction boundary.
- variableSHEET_CLIPBOARD_MIME_TYPEsource ↗
-
SHEET_CLIPBOARD_MIME_TYPE: "application/x-searsuite-sheet-range"MIME type that a browser adapter may use for the structured payload.
- variableSHEET_CLIPBOARD_PAYLOAD_VERSIONsource ↗
-
SHEET_CLIPBOARD_PAYLOAD_VERSION: 3Current version of the transient structured sheet clipboard payload.
- variableSheetClipboardCodecSymbolsource ↗
-
SheetClipboardCodecSymbol: typeof SheetClipboardCodecSymbolDI token for the editor-local clipboard codec.
- variableSheetClipboardDataSourceSymbolsource ↗
-
SheetClipboardDataSourceSymbol: typeof SheetClipboardDataSourceSymbolDI token for the editor-local clipboard data source.
- variableSheetClipboardErrorCodesource ↗
-
SheetClipboardErrorCode: { InvalidPayload: "SEAR_SHEET_CLIPBOARD_INVALID_PAYLOAD"; NoSelection: "SEAR_SHEET_CLIPBOARD_NO_SELECTION"; NoVisibleRows: "SEAR_SHEET_CLIPBOARD_NO_VISIBLE_ROWS"; SourceIntersectsMergedCells: "SEAR_SHEET_CLIPBOARD_SOURCE_INTERSECTS_MERGED_CELLS"; TargetIntersectsMergedCells: "SEAR_SHEET_CLIPBOARD_TARGET_INTERSECTS_MERGED_CELLS"; TargetOutOfBounds: "SEAR_SHEET_CLIPBOARD_TARGET_OUT_OF_BOUNDS" }Stable public errors raised by the sheet clipboard contract.
- classAbstractSheetClipboardsource ↗
-
class AbstractSheetClipboardPlatform-neutral clipboard abstraction. Implementations own system I/O.
constructorconstructor SheetClipboard(): SheetClipboardpropertysymbolstatic readonly symbol: typeof symbolmethodread read(): Promise<SheetClipboardPayload | null>methodwrite write(payload: SheetClipboardPayload): Promise<void>payload: SheetClipboardPayload
- variableSheetClipboardErrorCodeTypesource ↗
-
SheetClipboardErrorCodeType: { InvalidPayload: "SEAR_SHEET_CLIPBOARD_INVALID_PAYLOAD"; NoSelection: "SEAR_SHEET_CLIPBOARD_NO_SELECTION"; NoVisibleRows: "SEAR_SHEET_CLIPBOARD_NO_VISIBLE_ROWS"; SourceIntersectsMergedCells: "SEAR_SHEET_CLIPBOARD_SOURCE_INTERSECTS_MERGED_CELLS"; TargetIntersectsMergedCells: "SEAR_SHEET_CLIPBOARD_TARGET_INTERSECTS_MERGED_CELLS"; TargetOutOfBounds: "SEAR_SHEET_CLIPBOARD_TARGET_OUT_OF_BOUNDS" }Stable public errors raised by the sheet clipboard contract.
No public exports match that search.