← All packages

@searsuite/sear-sheet-editor-contract

Document and positions

interfaceSheetDocumentAccessor

Reads a cell document and commits a new document through the Sheet boundary.

interfaceSheetEditorGeometry

Cell geometry supplied by Sheet. The editor uses these functions for hit testing and drawing without knowing how the Sheet viewport is implemented.

interfaceSheetEditorPoint

A point in Sheet or editor-local coordinates.

interfaceSheetEditorRect

A rectangle in Sheet or editor-local coordinates.

interfaceSheetPointerHit

Result of pointer hit testing against the embedded document.

interfaceSheetPointerInput
interface SheetPointerInput extends SheetInputModifiers

Pointer input normalized by the Sheet host.

Inherited members 4

Inherited from SheetInputModifiers.

interfaceSheetTextPosition

A position in the rich document represented by a node path and text offset.

typeSheetDocument
type SheetDocument = readonly SheetDocumentNode[]

A rich-document snapshot owned by the Sheet cell boundary.

typeSheetDocumentNode
type SheetDocumentNode = Schema

A document node exchanged between a Sheet cell and an embedded editor.

Input and selection

interfaceSheetCompositionInput

IME composition lifecycle input delivered by the Sheet input adapter.

interfaceSheetCompositionState

Current IME composition state in editor-local coordinates.

interfaceSheetCursorState

A cursor rectangle in editor-local coordinates.

interfaceSheetDeleteInput

Text deletion delivered by the Sheet input adapter.

interfaceSheetEmbeddedInlineStyleStatus

Whether one inline style can be applied, is active, and has a common value.

propertyreadonly active: boolean
propertyreadonly enabled: boolean
propertyreadonly value: unknown

The common selected value, or null when unset or mixed.

interfaceSheetInlineStyleUpdate

An inline style patch applied to the active text selection.

interfaceSheetInputModifiers

Modifier keys normalized by the Sheet host.

interfaceSheetKeyInput
interface SheetKeyInput extends SheetInputModifiers

Keyboard input that the embedded editor may consume for navigation or editing.

Inherited members 4

Inherited from SheetInputModifiers.

interfaceSheetTextInput

Text insertion delivered by the Sheet input adapter.

interfaceSheetTextSelection

A text selection represented by anchor and head positions.

typeSheetEditInput
type SheetEditInput = SheetTextInput | SheetDeleteInput | SheetCompositionInput | SheetKeyInput

Input accepted by an active Sheet edit session.

typeSheetEmbeddedInlineStyleState
type SheetEmbeddedInlineStyleState = Readonly<Record<string, SheetEmbeddedInlineStyleStatus>>

Inline-style state exposed by a Sheet embedded editor while editing a cell.

Keys are plugin-owned persisted style keys (for example, bold or fontSize). Keeping the state keyed by the stable style key lets third-party inline-style extensions participate without changing this contract.

variableSheetEmbeddedInlineStyleObservation
SheetEmbeddedInlineStyleObservation: StateObservationDefinition<Readonly<Record<string, SheetEmbeddedInlineStyleStatus>>>

Current inline-style availability and activation for the embedded selection.

Render and editor session

The embedded editor reports render updates and session state to its Sheet host. FakeSheetEmbeddedEditor supports consumers that need a test implementation.

interfaceSheetEmbeddedEditor
interface SheetEmbeddedEditor SheetEmbeddedEditor: unknown

Stable Sheet-facing embedded editor contract. Implementations own rich-text layout, painting, selection, cursor and IME behavior behind this boundary.

propertyreadonly formatting?: { apply: unknown; capture: unknown }

Pure formatting projection; applying it returns a new snapshot without changing editor state.

propertyreadonly observations: ObservationRegistry

Typed editor-local state and event observations exposed to the host.

methodbindTeardownToken(token: object): void

Restricts runtime teardown to the owning Sheet editor when supported.

methodcreateEditSession(context: SheetEmbeddedEditorContext): SheetEditSession
methodcreateRenderSession(context: SheetEmbeddedEditorContext): SheetRenderSession
methoddispose(ownerToken?: object): void
methodinitialize(context: SheetEmbeddedEditorContext): void
variablesymbol
symbol: symbol
classFakeSheetEmbeddedEditor
class FakeSheetEmbeddedEditor extends SheetEmbeddedEditor

Small deterministic editor used by Sheet tests. It intentionally models only the contract boundary, making no assumptions about a concrete Doc runtime.

interfaceSheetEditRenderOptions

Per-frame options for painting an active Sheet edit session.

propertyreadonly cursorVisible?: boolean

Whether the caret should be painted during this frame.

interfaceSheetEmbeddedEditorContext

Context in which a Sheet cell editor renders and edits one cell document.

propertyreadonly defaultFontFamily?: string

Host-selected default font family for read-only Sheet cell rendering.

propertyreadonly defaultFontSize?: number

Host-selected default font size for read-only Sheet cell rendering.

propertyreadonly documentAccessor: SheetDocumentAccessor
propertyreadonly geometry: SheetEditorGeometry
propertyreadonly invalidate?: (invalidation: SheetEditorInvalidation): void
propertyreadonly isCommandExecuting?: (): boolean

Present in assembled Sheets to require command dispatch for edit-session mutations.

propertyreadonly renderContext: RenderContext
interfaceSheetRenderSession

A retained render session for one Sheet cell document.