API reference
@searsuite/sear-plugin-find-replace
Sparse, typed Sheet find and replace.
28 exportsderived from source
- classSheetFindReplaceErrorsource ↗
-
class SheetFindReplaceError extends SearErrorDiagnostic error surfaced to hosts by find and replace commands or queries.
constructorconstructor SheetFindReplaceError(code: SheetFindReplaceErrorCode, message: string, details?: SearErrorDetails): SheetFindReplaceErrorcode: SheetFindReplaceErrorCodemessage: stringdetails: SearErrorDetails
propertycode readonly code: SheetFindReplaceErrorCodeStable error category.
Inherited members 9
Inherited from SearError.
- classSheetFindReplacePluginsource ↗
-
class SheetFindReplacePlugin extends Plugin<unknown, CellProperties, null>Stateless Sheet feature; matches always read the current staged data owner.
constructorconstructor SheetFindReplacePlugin(data: SheetDataPlugin, codecs: CellClipboardCodecRegistry, commits: CellCommitStrategyRegistry, projection?: Pick<SheetFindSource, "readValue" | "forEachProjectedValueInRange">): SheetFindReplacePlugindata: SheetDataPlugincodecs: CellClipboardCodecRegistrycommits: CellCommitStrategyRegistryprojection: Pick<SheetFindSource, "readValue" | "forEachProjectedValueInRange">
propertywarnOnDuplicateDepth readonly warnOnDuplicateDepth: falseWhether PluginManager should warn when another ordered plugin shares this depth.
propertypluginKeystatic readonly pluginKey: PluginKeypropertysymbolstatic readonly symbol: typeof symbolmethodapply apply(_state: null, _transaction: Transaction): nullApplies a transaction to plugin-owned state and returns the next state.
_state: null_transaction: Transaction
methodgetPluginConfig getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
methodonTransactionCommitted onTransactionCommitted(transaction: Transaction): voidRuns only after every step in the enclosing pipeline has succeeded and all staged plugin state has been committed. Use it for derived caches, notifications, persistence, and transport; never perform those effects in apply, because a later pipeline step may still fail.
transaction: TransactionA committed transaction from the completed pipeline.
methodregisterCommands registerCommands(commands: SheetCommandBus): voidcommands: SheetCommandBus
methodregisterQueries registerQueries(queries: SheetQueryRegistry): voidqueries: SheetQueryRegistry
methodregisterState registerState(): { key: PluginKey; state: null }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 28
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceSheetFindInputsource ↗
-
interface SheetFindInputQuery options shared by navigation and replacement.
propertycontent readonly content?: SheetFindContentWhether to read displayed values or formula source.
propertyentireCell readonly entireCell?: booleanRequires the search text to equal the entire cell text.
propertymatchCase readonly matchCase?: booleanEnables case-sensitive matching.
propertyorder readonly order?: SheetFindOrderCell traversal order.
propertyrange readonly range?: SheetFindRangeLimits search to an inclusive rectangular cell range.
propertytext readonly text: stringLiteral text to search for; an empty string produces no matches.
- interfaceSheetFindMatchsource ↗
-
interface SheetFindMatchOne occurrence, with UTF-16 offsets within the cell's searched text.
propertycolumn readonly column: numberZero-based column coordinate.
propertyend readonly end: numberExclusive UTF-16 offset.
propertyrow readonly row: numberZero-based row coordinate.
propertystart readonly start: numberInclusive UTF-16 offset.
propertytext readonly text: stringSearched cell text at query time.
- interfaceSheetFindPagesource ↗
-
interface SheetFindPageMatch window and its position in the complete result set.
propertymatches readonly matches: readonly SheetFindMatch[]propertyrevision readonly revision: numberpropertystartIndex readonly startIndex: numberpropertytotal readonly total: number - interfaceSheetFindPageInputsource ↗
-
interface SheetFindPageInput extends SheetFindInputA bounded window of matches in the requested traversal order.
propertybackward readonly backward?: booleanReads the matches preceding the cursor when set.
propertycursor readonly cursor?: Pick<SheetFindMatch, "start" | "row" | "column">Exclusive position from which to continue.
propertyexpectedRevision readonly expectedRevision?: numberRejects a cursor created before the Sheet data changed.
propertylimit readonly limit: numberMaximum number of matches returned.
- interfaceSheetFindRangesource ↗
-
interface SheetFindRangeInclusive cell bounds for a Sheet search.
- interfaceSheetFindReplaceSourcesource ↗
-
interface SheetFindReplaceSource extends SheetFindSourceSearch source plus the cell commit policy used for replacements.
propertycommitStrategies readonly commitStrategies: Pick<CellCommitStrategyRegistry, "commit">Inherited members 5
Inherited from SheetFindSource.
- interfaceSheetFindSourcesource ↗
-
interface SheetFindSourceSparse cells and optional projected values visible to a Sheet search.
propertycodecs readonly codecs: Pick<CellClipboardCodecRegistry, "toPlainText">propertyforEachProjectedValueInRange readonly forEachProjectedValueInRange?: (startRow: number, startColumn: number, endRow: number, endColumn: number, visit: (row: number, column: number): void): voidpropertygetRevision readonly getRevision?: (): numberpropertymatrix readonly matrix: CSRMatrix<CellMatrixElement>propertyreadValue readonly readValue?: (row: number, column: number, cell: CellMatrixElement | null): unknown - interfaceSheetReplaceInputsource ↗
-
interface SheetReplaceInput extends SheetFindInputReplacement options shared by single and bulk commands.
propertyreplacement readonly replacement: stringLiteral text inserted for each matching occurrence.
- interfaceSheetReplaceOneInputsource ↗
-
interface SheetReplaceOneInput extends SheetReplaceInputReplaces one match returned by the find query.
propertymatch readonly match: SheetFindMatchSelected occurrence, including the cell text observed by the find query.
Inherited members 7
Inherited from SheetReplaceInput.
- typeSheetFindContentsource ↗
-
type SheetFindContent = typeof SheetFindContent[keyof typeof SheetFindContent]Supported cell content projections for search.
- typeSheetFindOrdersource ↗
-
type SheetFindOrder = typeof SheetFindOrder[keyof typeof SheetFindOrder]Supported match traversal orders.
- typeSheetFindReplaceErrorCodesource ↗
-
type SheetFindReplaceErrorCode = typeof SheetFindReplaceErrorCode[keyof typeof SheetFindReplaceErrorCode]Public code union for diagnostic find/replace failures.
- variableFindSheetMatchesQuerysource ↗
-
FindSheetMatchesQuery: SheetQueryDefinition<SheetFindInput, readonly SheetFindMatch[]>Reads matching occurrences from current Sheet state.
- variableFindSheetMatchPageQuerysource ↗
-
FindSheetMatchPageQuery: SheetQueryDefinition<SheetFindPageInput, SheetFindPage>Reads a bounded window and total count without retaining all matches.
- variableMAX_SHEET_FIND_PAGE_SIZEsource ↗
-
MAX_SHEET_FIND_PAGE_SIZE: 200Bounds the memory used by a single Sheet search page.
- variableReadSheetFindRevisionQuerysource ↗
-
ReadSheetFindRevisionQuery: SheetQueryDefinition<void, number>Reads the revision used to invalidate cached result windows.
- variableReplaceAllSheetMatchesCommandsource ↗
-
ReplaceAllSheetMatchesCommand: SheetCommandDefinition<SheetReplaceInput, SheetCommandResult>Replaces all matching occurrences in one Sheet transaction.
- variableReplaceSheetMatchCommandsource ↗
-
ReplaceSheetMatchCommand: SheetCommandDefinition<SheetReplaceOneInput, SheetCommandResult>Replaces one selected occurrence in a Sheet transaction.
- variableSheetFindContentsource ↗
-
SheetFindContent: { Formula: "formula"; Value: "value" }The source searched in a cell.
- variableSheetFindOrdersource ↗
-
SheetFindOrder: { Columns: "columns"; Rows: "rows" }Row-major or column-major traversal of matching cells.
- variableSheetFindReplaceErrorCodesource ↗
-
SheetFindReplaceErrorCode: { CrossBlockReplacement: "SHEET_FIND_CROSS_BLOCK_REPLACEMENT"; InvalidPage: "SHEET_FIND_INVALID_PAGE"; InvalidRange: "SHEET_FIND_INVALID_RANGE"; InvalidRichText: "SHEET_FIND_INVALID_RICH_TEXT"; StaleResults: "SHEET_FIND_STALE_RESULTS" }Stable failure categories for Sheet find and replace.
- functionfindSheetMatchessource ↗
-
findSheetMatches(input: SheetFindInput, source: SheetFindSource): SheetFindMatch[]Collects all occurrences for callers that need the complete result.
input: SheetFindInputsource: SheetFindSource
- functionfindSheetMatchPagesource ↗
-
findSheetMatchPage(input: SheetFindPageInput, source: SheetFindSource): SheetFindPageFinds a bounded window while still reporting the complete match count.
input: SheetFindPageInputsource: SheetFindSource
- functionregisterSheetFindReplaceCommandssource ↗
-
registerSheetFindReplaceCommands(commands: SheetCommandBus, source: SheetFindReplaceSource): voidPublishes single and bulk replace commands for a Sheet plugin.
commands: SheetCommandBussource: SheetFindReplaceSource
- functionregisterSheetFindReplaceQueriessource ↗
-
registerSheetFindReplaceQueries(queries: SheetQueryRegistry, source: SheetFindReplaceSource): voidPublishes the typed find query for a Sheet plugin.
queries: SheetQueryRegistrysource: SheetFindReplaceSource
- functionreplaceSheetMatchessource ↗
-
replaceSheetMatches(input: SheetReplaceInput | SheetReplaceOneInput, source: SheetFindReplaceSource, one: boolean): UpdateCellOTOperation<CellMatrixElement | null>[]Builds one operation per changed cell for a single undoable transaction.
input: SheetReplaceInput | SheetReplaceOneInputsource: SheetFindReplaceSourceone: boolean
No public exports match that search.