API reference
@searsuite/sear-plugin-cell-editor
Sheet cell-edit sessions, text input, selection, and embedded-editor coordination.
57 exportsderived from source
- enumSheetCellEditorExitReasonsource ↗
-
enum SheetCellEditorExitReasonEnumerates SheetCellEditorExitReason values.
enum memberCancel Cancel: "cancel"enum memberCommit Commit: "commit"enum memberOutsideClick OutsideClick: "outside-click" - enumSheetCellEditorInteractionNamesource ↗
-
enum SheetCellEditorInteractionNameEnumerates SheetCellEditorInteractionName values.
enum memberSessionEnded SessionEnded: "edit-session-ended"enum memberSessionStarted SessionStarted: "edit-session-started" - enumSheetCellEditorKindsource ↗
-
enum SheetCellEditorKindEnumerates SheetCellEditorKind values.
enum memberCell Cell: "cell" - enumSheetCellEditorPipelineNamesource ↗
-
enum SheetCellEditorPipelineNameObservable pipeline and step names owned by the Cell Editor module.
enum memberCancelEdit CancelEdit: "cell-editor.cancel-edit"enum memberCommitEdit CommitEdit: "cell-editor.commit-edit"enum memberEditExitAndSelect EditExitAndSelect: "cell-editor.exit-and-select"enum memberEndEditSession EndEditSession: "cell-editor.end-edit-session"enum memberEnterEditMode EnterEditMode: "cell-editor.enter-edit-mode"enum memberStartEditSession StartEditSession: "cell-editor.start-edit-session" - enumSheetCellEditorPipelineStepNamesource ↗
-
enum SheetCellEditorPipelineStepNameEnumerates SheetCellEditorPipelineStepName values.
enum memberCommitValue CommitValue: "cell-editor.commit-value"enum memberEndEditSession EndEditSession: "cell-editor.end-edit-session"enum memberExitEditMode ExitEditMode: "cell-editor.exit-edit-mode"enum memberOpenEditor OpenEditor: "cell-editor.open"enum memberSelectCell SelectCell: "cell-editor.select-cell"enum memberStartEditSession StartEditSession: "cell-editor.start-edit-session" - classFormulaReferenceHighlightersource ↗
-
class FormulaReferenceHighlighter extends HighlighterFormula implementation of the editor's generic Highlighter contract.
constructorconstructor FormulaReferenceHighlighter(parser: IFormulaParser, configEngine: ConfigEngine): FormulaReferenceHighlighterCreates a FormulaReferenceHighlighter instance.
parser: IFormulaParserconfigEngine: ConfigEngine
propertysymbolstatic readonly symbol: symbolDI token for resolving FormulaReferenceHighlighter.
methodclear clear(): voidReleases any session-scoped resources. Stateless highlighters need not override this.
methodhighlight highlight(formula: string, context?: HighlightContext): HighlightingReturns highlighted segments for the supplied source range.
formula: stringcontext: HighlightContext
- classFormulaReferencePickServicesource ↗
-
class FormulaReferencePickServiceOptional workbook-owned bridge for references picked on another sheet.
constructorconstructor FormulaReferencePickService(): FormulaReferencePickServicepropertysymbolstatic readonly symbol: typeof symbolmethodcancelPendingPick cancelPendingPick(): voidmethodhasPendingPick hasPendingPick(): booleanmethodpick pick(start: Point, end: Point): voidstart: Pointend: Point
- classHighlightersource ↗
-
class HighlighterExtensible editor highlighting contract.
Implementations translate an editor's current text into generic text styles and optional sheet ranges. They must not mutate the editing document.
constructorconstructor Highlighter(): Highlighterpropertysymbolstatic readonly symbol: symbolDI token for resolving Highlighter.
methodclear clear(): voidReleases any session-scoped resources. Stateless highlighters need not override this.
methodhighlight highlight(text: string, context?: HighlightContext): HighlightingReturns highlighted segments for the supplied source range.
text: stringcontext: HighlightContext
- classSheetCellEditorPluginsource ↗
-
class SheetCellEditorPlugin extends Plugin<SearCoreSheet, CellProperties, EditorState>Coordinates Sheet cell edit sessions, text input, and embedded editors.
constructorconstructor SheetCellEditorPlugin(mergePlugin: SheetCellMergePlugin, selectionPlugin: SheetSelectionPlugin, textInput: TextInput, keyboardRouter: KeyboardRouter, pointerCapture: PointerCapture, cursorRegistry: CursorRegistry, cursorEngine: CursorEngine, platform: Platform, commitStrategies: CellCommitStrategyRegistry, highlighter: Highlighter, coordinates: CoordinateTransformer, interactionReducers: SheetInteractionReducerRegistry, embeddedEditor?: unknown, commands?: SheetCommandBus, formulaSourceProvider?: IFormulaSourceProvider, textShaper?: TextShaper, cellFormatLocaleProvider?: ICellFormatLocaleProvider, queries?: SheetQueryRegistry, formulaParser?: IFormulaParser, inputValidation?: SheetCellInputValidationRegistry): SheetCellEditorPluginCreates a SheetCellEditorPlugin instance.
mergePlugin: SheetCellMergePluginselectionPlugin: SheetSelectionPlugintextInput: TextInputkeyboardRouter: KeyboardRouterpointerCapture: PointerCapturecursorRegistry: CursorRegistrycursorEngine: CursorEngineplatform: PlatformcommitStrategies: CellCommitStrategyRegistryhighlighter: Highlightercoordinates: CoordinateTransformerinteractionReducers: SheetInteractionReducerRegistryembeddedEditor: unknowncommands: SheetCommandBusformulaSourceProvider: IFormulaSourceProvidertextShaper: TextShapercellFormatLocaleProvider: ICellFormatLocaleProviderqueries: SheetQueryRegistryformulaParser: IFormulaParserinputValidation: SheetCellInputValidationRegistry
propertyinterestedIn interestedIn: string[]Declares which Sheet OT action names this plugin is interested in. The engine will only call
applywhen a transaction contains at least one operation matching these action names, unless the transaction is owned by this plugin.['uc', 'rr', 'rc']— only called for UpdateCell, ResizeRow, ResizeCol['*']— called for any transaction (wildcard)[]— only called for this plugin's own transactions
propertydefaultConfigstatic readonly defaultConfig: SheetCellEditorConfigDefault visual configuration for the inline cell editor.
propertypluginKeystatic readonly pluginKey: PluginKeyStable plugin key for SheetCellEditorPlugin.
propertysymbolstatic readonly symbol: symbolDI token for resolving SheetCellEditorPlugin.
methodapply apply(pluginState: EditorState, transaction: Transaction): EditorState | nullApplies a transaction to SheetCellEditorPlugin state.
pluginState: EditorStatetransaction: Transaction
methodbindCore bindCore(core: SearCoreSheet): voidBinds this plugin to the core owned by its editor-local container.
core: SearCoreSheet
methodbindFormulaRegistry bindFormulaRegistry(registry: IFunctionRegistry): voidBinds the editor-local registry after formula services have been assembled.
registry: IFunctionRegistry
methodbindReferencePickService bindReferencePickService(service: FormulaReferencePickService): voidBinds the optional parent-workbook reference picker.
service: FormulaReferencePickService
methodbindRuntimeServices bindRuntimeServices(container: Container): voidExplicitly binds services for isolated plugin tests or custom local assembly.
container: Container
methodcancelEdit cancelEdit(searCore: SearCoreSheet): voidCancels the active cell edit session without committing its draft.
searCore: SearCoreSheet
methodcommitEdit commitEdit(searCore: SearCoreSheet, fillSelection?: boolean): booleanCommits the active cell edit session through its owning command.
searCore: SearCoreSheetfillSelection: boolean
methodgetDocumentSelection getDocumentSelection(): DocSelectionReturns the active document selection for host diagnostics and adapters.
methodgetPluginConfig getPluginConfig(_searCore: SearCoreSheet): nullReturns the plugin config.
_searCore: SearCoreSheet
methodlockCommittedState lockCommittedState(state: EditorState): voidLocks committed editor selection rectangles while staged clones stay writable.
state: EditorState
methodonDblClick onDblClick(searCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): booleanHandles a double-click pointer event.
searCore: SearCoreSheetevent: EventWithOffsetAndTarget<CellProperties>
methodonMouseDown onMouseDown(searCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): boolean | voidHandles the start of a pointer press sequence.
searCore: SearCoreSheetevent: EventWithOffsetAndTarget<CellProperties>
methodonMouseMove onMouseMove(searCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): boolean | voidHandles pointer movement over the host surface.
searCore: SearCoreSheetevent: EventWithOffsetAndTarget<CellProperties>
methodonMouseUp onMouseUp(_searCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): boolean | voidHandles the end of a pointer press sequence.
_searCore: SearCoreSheetevent: EventWithOffsetAndTarget<CellProperties>
methodonTransactionCommitted onTransactionCommitted(transaction: Transaction): voidSynchronizes document selection only after the editor rectangle transaction is committed, so a later failed pipeline step cannot alter the live editor session.
transaction: TransactionSuccessfully committed transaction.
methodregisterCommands registerCommands(commands: SheetCommandBus): voidRegisters the commands.
commands: SheetCommandBus
methodregisterConfig registerConfig(): { config: ConfigUnit<SheetCellEditorConfig>; key: PluginKey }[]Registers visual defaults for the inline cell editor.
methodregisterObservations registerObservations(observations: ObservationRegistry): voidPublishes formula authoring state through the editor's typed observation registry.
observations: ObservationRegistry
methodregisterQueries registerQueries(queries: SheetQueryRegistry): voidRegisters the read-only draft projection used during workbook sheet switching.
queries: SheetQueryRegistry
methodregisterState registerState(): { key: PluginKey; state: EditorState }Registers one or more plugin-owned state records with the host manager.
methodrender render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Renders SheetCellEditorPlugin scene output.
searCore: SearCoreSheetoffset: { x: number; y: number }
methodregisterServicesstatic registerServices(_context: { container: Container }): voidRegisters rich-document node types used by the sheet cell editor.
_context: { container: Container }
Inherited members 22
Inherited from Plugin.
- depth
- documentState
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- onClick
- onInitialDataCell
- onInitialDataComplete
- onResize
- onScroll
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceCellRangeHighlightsource ↗
-
interface CellRangeHighlightA sheet rectangle rendered as part of an editor highlight.
- interfaceEditSessionEndedInteractionSignalsource ↗
-
interface EditSessionEndedInteractionSignal extends SheetInteractionSignalPublic contract for EditSessionEndedInteractionSignal.
- interfaceEditSessionStartedInteractionSignalsource ↗
-
interface EditSessionStartedInteractionSignal extends SheetInteractionSignalPublic contract for EditSessionStartedInteractionSignal.
- interfaceFormulaEditDraftsource ↗
-
interface FormulaEditDraftTransient formula draft retained while a workbook mounts another sheet.
propertyautoClosingParentheses readonly autoClosingParentheses?: readonly number[]propertycell readonly cell: PointpropertyselectionEnd readonly selectionEnd: numberpropertyselectionStart readonly selectionStart: numberpropertytext readonly text: string - interfaceFormulaInputAssistStatesource ↗
-
interface FormulaInputAssistStateCurrent formula-authoring suggestions and caret position in the host view.
propertyanchor readonly anchor: { x: number; y: number } | nullpropertydiagnostic readonly diagnostic: FormulaInputDiagnostic | nullpropertyselectedIndex readonly selectedIndex: numberpropertysignature readonly signature: FormulaSignature | nullpropertysuggestions readonly suggestions: readonly FormulaSuggestion[] - interfaceHighlightContextsource ↗
-
interface HighlightContextGeneric editor state that can influence a highlighter's presentation.
propertycursorOffset cursorOffset?: numberZero-based cursor position in the editor's plain-text content.
- interfaceHighlightingsource ↗
-
interface HighlightingPresentation-only output shared by all editor highlighters.
propertycellRanges cellRanges: SheetReferenceHighlight[]propertytextAttributes textAttributes: TextAttributeRange<Readonly<Record<string, unknown>>>[] - interfaceSheetBeginCellEditInputsource ↗
-
interface SheetBeginCellEditInputPublic input used to enter cell edit mode.
- interfaceSheetCancelCellEditInputsource ↗
-
interface SheetCancelCellEditInputPublic input used to cancel the active edit session.
propertyrestoreOriginalDocument readonly restoreOriginalDocument?: boolean - interfaceSheetCellEditorPointerInputsource ↗
-
interface SheetCellEditorPointerInputPointer selection update inside an active embedded editor.
- interfaceSheetCellEditSelectionInputsource ↗
-
interface SheetCellEditSelectionInputOptional selection change applied while committing an edit session.
- interfaceSheetCommitCellEditInputsource ↗
-
interface SheetCommitCellEditInputPublic input used to commit the active edit session.
propertyfillSelection readonly fillSelection?: booleanApplies the entered value to every cell in the current selected rectangle.
propertynextSelection readonly nextSelection?: SheetCellEditSelectionInputpropertypipelineName readonly pipelineName?: SheetCellEditorPipelineNamepropertyreason readonly reason?: SheetCellEditorExitReason - interfaceSheetDocumentCursorPositionInputsource ↗
-
interface SheetDocumentCursorPositionInputDocument cursor position inside the active cell editor session.
- interfaceSheetDocumentSelectionCommandInputsource ↗
-
interface SheetDocumentSelectionCommandInputDocument selection input expressed as anchor/head coordinates.
- interfaceSheetFormulaBarStatesource ↗
-
interface SheetFormulaBarStateSource text and transient edit selection for the active Sheet cell.
propertycell readonly cell: Point | nullpropertyediting readonly editing: booleanpropertyrange readonly range: { end: Point; start: Point } | nullpropertyselectionEnd readonly selectionEnd: numberpropertyselectionStart readonly selectionStart: numberpropertytext readonly text: string - interfaceSheetFormulaReferenceReplacementInputsource ↗
-
interface SheetFormulaReferenceReplacementInputFormula reference replacement while an edit session is active.
- interfaceSheetInlineStyleCommandInputsource ↗
-
interface SheetInlineStyleCommandInputInline text-style patch applied to the active embedded cell editor.
propertyattrs readonly attrs: Readonly<Record<string, unknown>> - interfaceSheetOpenCellEditorInputsource ↗
-
interface SheetOpenCellEditorInputCell target for opening an embedded edit session.
propertycolumn readonly column: numberpropertyreplaceContent readonly replaceContent?: booleanpropertyrow readonly row: number - interfaceSheetRangeTextStyleInputsource ↗
-
interface SheetRangeTextStyleInputpropertyattrs readonly attrs: Readonly<Record<string, unknown>> - typeSheetDocumentInputCommandInputsource ↗
-
type SheetDocumentInputCommandInput = TextInputEvent | { kind: "delete" } | { direction: DocCursorDirection; kind: "arrow"; shiftKey: boolean } | { kind: "selectAll" } | { kind: "softEnter" } | { ctrlKey?: boolean; key: string; kind: "keyDown"; metaKey?: boolean; shiftKey?: boolean } | { anchor: SheetDocumentCursorPositionInput; head: SheetDocumentCursorPositionInput; kind: "setSelection" }Local document input action run inside the command boundary.
- variableAcceptFormulaSuggestionCommandsource ↗
-
AcceptFormulaSuggestionCommand: SheetCommandDefinition<{ name: string }, SheetCommandResult>Accepts a registered function suggestion without committing the cell edit.
- variableBeginCellEditCommandsource ↗
-
BeginCellEditCommand: SheetCommandDefinition<SheetBeginCellEditInput, SheetCommandResult>Command that enters cell edit mode.
- variableBeginCellEditorDragSelectionCommandsource ↗
-
BeginCellEditorDragSelectionCommand: SheetCommandDefinition<void, SheetCommandResult>Starts the local text-selection drag after the pointer command succeeds.
- variableCancelCellEditCommandsource ↗
-
CancelCellEditCommand: SheetCommandDefinition<void | SheetCancelCellEditInput, SheetCommandResult>Command that cancels the active cell edit session.
- variableCommitCellEditCommandsource ↗
-
CommitCellEditCommand: SheetCommandDefinition<void | SheetCommitCellEditInput, SheetCommandResult>Command that commits the active cell edit session.
- variableCycleFormulaReferenceCommandsource ↗
-
CycleFormulaReferenceCommand: SheetCommandDefinition<void, SheetCommandResult>Cycles the reference at the formula caret through relative and absolute modes.
- variableEndCellEditorDragSelectionCommandsource ↗
-
EndCellEditorDragSelectionCommand: SheetCommandDefinition<{ disposeCapture: boolean }, SheetCommandResult>Ends the local text-selection drag and optionally releases pointer capture.
- variableEndFormulaReferencePickCommandsource ↗
-
EndFormulaReferencePickCommand: SheetCommandDefinition<void, SheetCommandResult>Ends a pointer-based formula reference pick without changing the draft.
- variableFormulaInputAssistObservationsource ↗
-
FormulaInputAssistObservation: StateObservationDefinition<FormulaInputAssistState> - variableHandleCellEditorPointerCommandsource ↗
-
HandleCellEditorPointerCommand: SheetCommandDefinition<SheetCellEditorPointerInput, SheetCommandResult>Updates the embedded editor's cursor or drag selection.
- variableHandleDocumentInputCommandsource ↗
-
HandleDocumentInputCommand: SheetCommandDefinition<SheetDocumentInputCommandInput, SheetCommandResult>Command that executes local document input while editing a cell.
- variableIsCellEditingQuerysource ↗
-
IsCellEditingQuery: SheetQueryDefinition<void, boolean>Reports whether an active cell edit must be committed before a host formatting action.
- variableMoveFormulaSuggestionCommandsource ↗
-
MoveFormulaSuggestionCommand: SheetCommandDefinition<{ direction: -1 | 1 }, SheetCommandResult>Moves the highlighted function suggestion by one item.
- variableOpenCellEditorCommandsource ↗
-
OpenCellEditorCommand: SheetCommandDefinition<SheetOpenCellEditorInput, SheetCommandResult>Command that opens the embedded editor and enters cell edit mode atomically.
- variableReadFormulaEditDraftQuerysource ↗
-
ReadFormulaEditDraftQuery: SheetQueryDefinition<void, FormulaEditDraft | null>Reads the active formula draft without changing the edit session.
- variableReplaceFormulaReferenceCommandsource ↗
-
ReplaceFormulaReferenceCommand: SheetCommandDefinition<SheetFormulaReferenceReplacementInput, SheetCommandResult>Replaces the picked formula reference in the active edit session.
- variableRequestCellEditorRenderCommandsource ↗
-
RequestCellEditorRenderCommand: SheetCommandDefinition<void, SheetCommandResult>Command that requests a render pass for the cell editor overlay.
- variableRestoreFormulaEditDraftCommandsource ↗
-
RestoreFormulaEditDraftCommand: SheetCommandDefinition<{ draft: FormulaEditDraft; reference?: string }, SheetCommandResult>Restores a formula draft after a workbook sheet switch.
- variableSetCellInlineStyleCommandsource ↗
-
SetCellInlineStyleCommand: SheetCommandDefinition<SheetInlineStyleCommandInput, SheetCommandResult>Command used by toolbar integrations to update rich-text inline styles.
- variableSetFormulaBarDraftCommandsource ↗
-
SetFormulaBarDraftCommand: SheetCommandDefinition<{ selectionEnd: number; selectionStart: number; text: string }, SheetCommandResult>Replaces the active edit-session text and synchronizes its caret range.
- variableSetRangeCellTextStyleCommandsource ↗
-
SetRangeCellTextStyleCommand: SheetCommandDefinition<SheetRangeTextStyleInput, SheetCommandResult>Applies text styles to the complete content of selected text cells.
- variableSheetFormulaBarObservationsource ↗
-
SheetFormulaBarObservation: StateObservationDefinition<SheetFormulaBarState> - variableStartFormulaBarEditCommandsource ↗
-
StartFormulaBarEditCommand: SheetCommandDefinition<void, SheetCommandResult>Opens the current cell's edit session for an external formula input surface.
- variableUpdateCellEditorDocumentSelectionCommandsource ↗
-
UpdateCellEditorDocumentSelectionCommand: SheetCommandDefinition<SheetDocumentSelectionCommandInput, SheetCommandResult>Command that updates the rich-document selection inside the cell editor.
- variableUpdateFormulaAssistAnchorCommandsource ↗
-
UpdateFormulaAssistAnchorCommand: SheetCommandDefinition<{ x: number; y: number }, SheetCommandResult>Updates the formula-assist anchor after editor layout changes.
- functionformatPickedReferencesource ↗
-
formatPickedReference(start: Point, end: Point, sheetName?: string): stringFormats a selected grid rectangle as an A1 reference.
start: Pointend: PointsheetName: string
- functiongetCellEditableValuesource ↗
-
getCellEditableValue(cell: CellMatrixElement | null | undefined, coordinate?: { col: number; row: number }, formulaSourceProvider?: IFormulaSourceProvider | null): unknownReturns the persisted source value that belongs in the editor.
Formula results are derived, local cache data used only for display. Editing must always start from the synchronised formula source instead.
cell: CellMatrixElement | null | undefinedcoordinate: { col: number; row: number }formulaSourceProvider: IFormulaSourceProvider | null
- functionregisterSheetCellEditorInteractionReducerssource ↗
-
registerSheetCellEditorInteractionReducers(registry: SheetInteractionReducerRegistry): voidRegisters Cell Editor's local interaction projections once per DI container.
registry: SheetInteractionReducerRegistry
No public exports match that search.