API reference
@searsuite/sear-sheet-editor-contract
Sheet-facing embedded rich-text editor contracts and test fakes without Doc-runtime dependencies.
31 exportsderived from source
- namespaceSheetEmbeddedEditorsource ↗
-
SheetEmbeddedEditor: unknownStatic DI token for the Sheet-facing editor abstraction.
variablesymbol symbol: symbol - classFakeSheetEmbeddedEditorsource ↗
-
class FakeSheetEmbeddedEditor extends SheetEmbeddedEditorSmall deterministic editor used by Sheet tests. It intentionally models only the contract boundary, making no assumptions about a concrete Doc runtime.
constructorconstructor FakeSheetEmbeddedEditor(): FakeSheetEmbeddedEditorpropertycancelCount cancelCount: numberpropertycommittedDocuments readonly committedDocuments: Schema[][]propertydisposeCount disposeCount: numberpropertyeditContexts readonly editContexts: SheetEmbeddedEditorContext[]propertyinitializeCount initializeCount: numberpropertyinputs readonly inputs: SheetEditInput[]propertyobservations readonly observations: ObservationRegistryTyped editor-local state and event observations exposed to the host.
propertyrenderContexts readonly renderContexts: SheetEmbeddedEditorContext[]propertyrenderSessions readonly renderSessions: FakeRenderSession[]methodbindTeardownToken bindTeardownToken(token: object): voidRestricts runtime teardown to the owning Sheet editor when supported.
token: object
methodcreateEditSession createEditSession(context: SheetEmbeddedEditorContext): SheetEditSessioncontext: SheetEmbeddedEditorContext
methodcreateRenderSession createRenderSession(context: SheetEmbeddedEditorContext): SheetRenderSessioncontext: SheetEmbeddedEditorContext
methoddispose dispose(ownerToken?: object): voidownerToken: object
methodinitialize initialize(context: SheetEmbeddedEditorContext): voidcontext: SheetEmbeddedEditorContext
- interfaceSheetCompositionInputsource ↗
-
interface SheetCompositionInputIME composition lifecycle input delivered by the Sheet input adapter.
- interfaceSheetCompositionStatesource ↗
-
interface SheetCompositionStateCurrent IME composition state in editor-local coordinates.
- interfaceSheetCursorStatesource ↗
-
interface SheetCursorStateA cursor rectangle in editor-local coordinates.
- interfaceSheetDeleteInputsource ↗
-
interface SheetDeleteInputText deletion delivered by the Sheet input adapter.
- interfaceSheetDocumentAccessorsource ↗
-
interface SheetDocumentAccessorReads a cell document and commits a new document through the Sheet boundary.
- interfaceSheetEditorGeometrysource ↗
-
interface SheetEditorGeometryCell geometry supplied by Sheet. The editor uses these functions for hit testing and drawing without knowing how the Sheet viewport is implemented.
propertycellRect readonly cellRect: SheetEditorRectpropertyclipRect readonly clipRect?: SheetEditorRectpropertycontainsPoint readonly containsPoint?: (point: SheetEditorPoint): booleanpropertytoLocalPoint readonly toLocalPoint: (point: SheetEditorPoint): SheetEditorPointpropertytoSheetPoint readonly toSheetPoint: (point: SheetEditorPoint): SheetEditorPoint - interfaceSheetEditorInvalidationsource ↗
-
interface SheetEditorInvalidationA rectangle or semantic reason that should be redrawn by Sheet.
- interfaceSheetEditorPointsource ↗
-
interface SheetEditorPointA point in Sheet or editor-local coordinates.
- interfaceSheetEditorRectsource ↗
-
interface SheetEditorRectA rectangle in Sheet or editor-local coordinates.
- interfaceSheetEditRenderOptionssource ↗
-
interface SheetEditRenderOptionsPer-frame options for painting an active Sheet edit session.
propertycursorVisible readonly cursorVisible?: booleanWhether the caret should be painted during this frame.
- interfaceSheetEditSessionsource ↗
-
interface SheetEditSessionAn active editing session for one Sheet cell document.
methodcancel cancel(): voidmethodcommit commit(): readonly Schema[]methoddispose dispose(): voidmethodgetComposition getComposition(): SheetCompositionState | nullmethodgetCursor getCursor(): SheetCursorState | nullmethodgetDocument getDocument(): readonly Schema[]methodgetSelection getSelection(): SheetTextSelection | nullmethodhandleInput handleInput(input: SheetEditInput): SheetRenderUpdateinput: SheetEditInput
methodhandlePointer handlePointer(input: SheetPointerInput): SheetRenderUpdateinput: SheetPointerInput
methodrender render(renderContext?: RenderContext, options?: SheetEditRenderOptions): SheetRenderUpdatePaints the current edited document, selection, cursor and composition.
renderContext: RenderContextoptions: SheetEditRenderOptions
methodsetInlineStyle setInlineStyle(update: SheetInlineStyleUpdate): SheetRenderUpdateupdate: SheetInlineStyleUpdate
methodsetSelection setSelection(selection: SheetTextSelection): SheetRenderUpdateselection: SheetTextSelection
- interfaceSheetEmbeddedEditorsource ↗
-
interface SheetEmbeddedEditorStable Sheet-facing embedded editor contract. Implementations own rich-text layout, painting, selection, cursor and IME behavior behind this boundary.
propertyformatting readonly formatting?: { apply: unknown; capture: unknown }Pure formatting projection; applying it returns a new snapshot without changing editor state.
propertyobservations readonly observations: ObservationRegistryTyped editor-local state and event observations exposed to the host.
methodbindTeardownToken bindTeardownToken(token: object): voidRestricts runtime teardown to the owning Sheet editor when supported.
token: object
methodcreateEditSession createEditSession(context: SheetEmbeddedEditorContext): SheetEditSessioncontext: SheetEmbeddedEditorContext
methodcreateRenderSession createRenderSession(context: SheetEmbeddedEditorContext): SheetRenderSessioncontext: SheetEmbeddedEditorContext
methoddispose dispose(ownerToken?: object): voidownerToken: object
methodinitialize initialize(context: SheetEmbeddedEditorContext): voidcontext: SheetEmbeddedEditorContext
- interfaceSheetEmbeddedEditorContextsource ↗
-
interface SheetEmbeddedEditorContextContext in which a Sheet cell editor renders and edits one cell document.
propertydefaultFontFamily readonly defaultFontFamily?: stringHost-selected default font family for read-only Sheet cell rendering.
propertydefaultFontSize readonly defaultFontSize?: numberHost-selected default font size for read-only Sheet cell rendering.
propertydocumentAccessor readonly documentAccessor: SheetDocumentAccessorpropertygeometry readonly geometry: SheetEditorGeometrypropertyinvalidate readonly invalidate?: (invalidation: SheetEditorInvalidation): voidpropertyisCommandExecuting readonly isCommandExecuting?: (): booleanPresent in assembled Sheets to require command dispatch for edit-session mutations.
propertyrenderContext readonly renderContext: RenderContext - interfaceSheetEmbeddedInlineStyleStatussource ↗
-
interface SheetEmbeddedInlineStyleStatusWhether one inline style can be applied, is active, and has a common value.
- interfaceSheetInlineStyleUpdatesource ↗
-
interface SheetInlineStyleUpdateAn inline style patch applied to the active text selection.
propertyattrs readonly attrs: Readonly<Record<string, unknown>> - interfaceSheetInputModifierssource ↗
-
interface SheetInputModifiersModifier keys normalized by the Sheet host.
- interfaceSheetKeyInputsource ↗
-
interface SheetKeyInput extends SheetInputModifiersKeyboard input that the embedded editor may consume for navigation or editing.
- interfaceSheetPointerHitsource ↗
-
interface SheetPointerHitResult of pointer hit testing against the embedded document.
- interfaceSheetPointerInputsource ↗
-
interface SheetPointerInput extends SheetInputModifiersPointer input normalized by the Sheet host.
propertybuttons readonly buttons?: numberpropertyclickCount readonly clickCount?: numberpropertypoint readonly point: SheetEditorPointpropertytype readonly type: "pointerDown" | "pointerMove" | "pointerUp" - interfaceSheetRenderSessionsource ↗
-
interface SheetRenderSessionA retained render session for one Sheet cell document.
- interfaceSheetRenderUpdatesource ↗
-
interface SheetRenderUpdateState returned after a render or edit operation.
propertycomposition readonly composition?: SheetCompositionStatepropertycontentSize readonly contentSize?: { height: number; width: number }propertycursor readonly cursor?: SheetCursorStatepropertyinvalidation readonly invalidation?: SheetEditorInvalidationpropertyneedsRedraw readonly needsRedraw: booleanpropertyselection readonly selection?: SheetTextSelection - interfaceSheetTextInputsource ↗
-
interface SheetTextInputText insertion delivered by the Sheet input adapter.
- interfaceSheetTextPositionsource ↗
-
interface SheetTextPositionA position in the rich document represented by a node path and text offset.
- interfaceSheetTextSelectionsource ↗
-
interface SheetTextSelectionA text selection represented by anchor and head positions.
- typeSheetDocumentsource ↗
-
type SheetDocument = readonly SheetDocumentNode[]A rich-document snapshot owned by the Sheet cell boundary.
- typeSheetDocumentNodesource ↗
-
type SheetDocumentNode = SchemaA document node exchanged between a Sheet cell and an embedded editor.
- typeSheetEditInputsource ↗
-
type SheetEditInput = SheetTextInput | SheetDeleteInput | SheetCompositionInput | SheetKeyInputInput accepted by an active Sheet edit session.
- typeSheetEmbeddedInlineStyleStatesource ↗
-
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,
boldorfontSize). Keeping the state keyed by the stable style key lets third-party inline-style extensions participate without changing this contract. - variableSheetEmbeddedInlineStyleObservationsource ↗
-
SheetEmbeddedInlineStyleObservation: StateObservationDefinition<Readonly<Record<string, SheetEmbeddedInlineStyleStatus>>>Current inline-style availability and activation for the embedded selection.
No public exports match that search.