API reference
@searsuite/sear-plugin-sheet-doc-adapter
The default Doc-backed rich-text editor adapter for Sheet cells.
17 exportsderived from source
- classSearCoreEditorAdaptersource ↗
-
class SearCoreEditorAdapter extends SheetEmbeddedEditorSheet adapter that owns one lightweight SearCoreDoc for all embedded cells.
constructorconstructor SearCoreEditorAdapter(options?: SearCoreEditorAdapterOptions): SearCoreEditorAdapteroptions: SearCoreEditorAdapterOptions
propertyformatting readonly formatting: { apply: (document: readonly Schema[], format: Readonly<Record<string, unknown>>): Schema[]; capture: (document: readonly Schema[]): Readonly<Record<string, 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
- classSheetCellContextPluginsource ↗
-
class SheetCellContextPlugin extends SheetEmbeddedEditorPluginAdapts Sheet cell geometry and pointer coordinates for embedded sessions.
constructorconstructor SheetCellContextPlugin(): SheetCellContextPluginpropertykey readonly key: "sheet.cell-context"Stable identity used to reject duplicate registrations.
methodinitialize initialize(context: SheetEmbeddedEditorPluginContext): voidCalled once when the adapter is initialized.
context: SheetEmbeddedEditorPluginContext
methodtoLocalPoint toLocalPoint(context: SheetEmbeddedEditorContext, point: SheetEditorPoint): SheetEditorPointcontext: SheetEmbeddedEditorContextpoint: SheetEditorPoint
methodtoSheetPoint toSheetPoint(context: SheetEmbeddedEditorContext, point: SheetEditorPoint): SheetEditorPointcontext: SheetEmbeddedEditorContextpoint: SheetEditorPoint
- classSheetClipboardPluginsource ↗
-
class SheetClipboardPlugin extends SheetEmbeddedEditorPluginSheet clipboard codec for the shared rich-document snapshot protocol.
constructorconstructor SheetClipboardPlugin(): SheetClipboardPluginpropertykey readonly key: "sheet.clipboard"Stable identity used to reject duplicate registrations.
methoddeserialize deserialize(value: string): SheetDocumentvalue: string
methodserialize serialize(document: SheetDocument): stringdocument: SheetDocument
- classSheetDocIntegrationPluginsource ↗
-
class SheetDocIntegrationPlugin extends SheetEmbeddedEditorPluginExtension point for Sheet-to-Doc integration policies.
constructorconstructor SheetDocIntegrationPlugin(): SheetDocIntegrationPluginpropertykey readonly key: "sheet.doc-integration"Stable identity used to reject duplicate registrations.
- classSheetEmbeddedEditorPluginRegistrysource ↗
-
class SheetEmbeddedEditorPluginRegistryOrdered registry used by the lightweight Sheet embedded editor.
constructorconstructor SheetEmbeddedEditorPluginRegistry(): SheetEmbeddedEditorPluginRegistrymethoddispose dispose(ownerToken?: object): voidownerToken: object
methodenforceWriteBoundary enforceWriteBoundary(assertWrite: (): void, teardownToken: object): voidRestricts plugin changes after the embedded editor joins a Sheet command bus.
assertWrite: (): voidteardownToken: object
methodget get(key: string): SheetEmbeddedEditorPlugin | undefinedkey: string
methodgetAll getAll(): readonly SheetEmbeddedEditorPlugin[]methodinitialize initialize(context: SheetEmbeddedEditorPluginContext): voidcontext: SheetEmbeddedEditorPluginContext
methodnotifyCancel notifyCancel(context: SheetEmbeddedEditorPluginContext): voidcontext: SheetEmbeddedEditorPluginContext
methodnotifyCommit notifyCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): voiddocument: SheetDocumentcontext: SheetEmbeddedEditorPluginContext
methodnotifyRender notifyRender(update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): voidupdate: SheetRenderUpdatecontext: SheetEmbeddedEditorPluginContext
methodregister register(plugin: SheetEmbeddedEditorPlugin): voidplugin: SheetEmbeddedEditorPlugin
methodtransformCommit transformCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): SheetDocument | nulldocument: SheetDocumentcontext: SheetEmbeddedEditorPluginContext
methodtransformInlineStyle transformInlineStyle(update: SheetInlineStyleUpdate, context: SheetEmbeddedEditorPluginContext): SheetInlineStyleUpdate | nullupdate: SheetInlineStyleUpdatecontext: SheetEmbeddedEditorPluginContext
methodtransformInput transformInput(input: SheetEditInput, context: SheetEmbeddedEditorPluginContext): SheetEditInput | nullinput: SheetEditInputcontext: SheetEmbeddedEditorPluginContext
methodunregister unregister(key: string): voidkey: string
- classSheetFormulaReferencePluginsource ↗
-
class SheetFormulaReferencePlugin extends SheetEmbeddedEditorPluginFinds formula-like references for Sheet overlays without changing document data.
constructorconstructor SheetFormulaReferencePlugin(): SheetFormulaReferencePluginpropertykey readonly key: "sheet.formula-reference"Stable identity used to reject duplicate registrations.
methoddispose dispose(): voidCalled before the adapter releases this plugin.
methodgetReferences getReferences(): readonly string[]methodinitialize initialize(context: SheetEmbeddedEditorPluginContext): voidCalled once when the adapter is initialized.
context: SheetEmbeddedEditorPluginContext
methodonRender onRender(_update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): voidCalled after a render pass has completed.
_update: SheetRenderUpdatecontext: SheetEmbeddedEditorPluginContext
- classSheetOverflowPluginsource ↗
-
class SheetOverflowPlugin extends SheetEmbeddedEditorPluginKeeps overflow sizing as a Sheet concern and requests geometry redraws.
constructorconstructor SheetOverflowPlugin(): SheetOverflowPluginpropertykey readonly key: "sheet.overflow"Stable identity used to reject duplicate registrations.
methoddispose dispose(): voidCalled before the adapter releases this plugin.
methodgetContentSize getContentSize(): { height: number; width: number } | nullmethodonCommit onCommit(_document: SheetDocument, _context: SheetEmbeddedEditorPluginContext): voidCalled after Sheet has committed the edited document.
_document: SheetDocument_context: SheetEmbeddedEditorPluginContext
methodonRender onRender(update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): voidCalled after a render pass has completed.
update: SheetRenderUpdatecontext: SheetEmbeddedEditorPluginContext
- classSheetShortcutPluginsource ↗
-
class SheetShortcutPlugin extends SheetEmbeddedEditorPluginOptional key mapping hook for Sheet hosts that add cell-navigation shortcuts.
constructorconstructor SheetShortcutPlugin(shortcuts?: Readonly<Record<string, SheetEditInput>>): SheetShortcutPluginshortcuts: Readonly<Record<string, SheetEditInput>>
propertykey readonly key: "sheet.shortcuts"Stable identity used to reject duplicate registrations.
methodtransformInput transformInput(input: SheetEditInput, _context: SheetEmbeddedEditorPluginContext): SheetEditInputAllows a plugin to normalize or consume Sheet keyboard/text input.
input: SheetEditInput_context: SheetEmbeddedEditorPluginContext
- interfaceEmbeddedDocConfigsource ↗
-
interface EmbeddedDocConfigConfiguration for the Doc instance embedded inside a Sheet cell.
propertyfontFamily readonly fontFamily: stringDefault font family and fallback list used by the active embedded document editor.
propertyfontSize readonly fontSize: numberDefault font size used by the active embedded document editor.
propertypadding readonly padding: numberPadding between the cell edge and embedded document text.
- interfaceSearCoreEditorAdapterOptionssource ↗
-
interface SearCoreEditorAdapterOptionsConfiguration for the Sheet-specific SearCore document adapter.
propertyembeddedDocConfig readonly embeddedDocConfig?: Partial<EmbeddedDocConfig>Configuration scoped to the Doc embedded inside a Sheet cell.
propertyplugins readonly plugins?: readonly SheetEmbeddedEditorPlugin | SheetEmbeddedEditorPluginImplementation[]Optional Sheet-only plugins. Defaults to the built-in adapter plugins.
- interfaceSheetEmbeddedEditorPluginsource ↗
-
interface SheetEmbeddedEditorPluginExtension point for behavior that belongs to the Sheet embedding rather than the reusable Doc runtime. Plugins are deliberately expressed in contract types so they can be replaced without changing Sheet or Doc packages.
propertykey readonly key: stringStable identity used to reject duplicate registrations.
methoddispose dispose(): voidCalled before the adapter releases this plugin.
methodinitialize initialize(context: SheetEmbeddedEditorPluginContext): voidCalled once when the adapter is initialized.
context: SheetEmbeddedEditorPluginContext
methodonCancel onCancel(context: SheetEmbeddedEditorPluginContext): voidCalled after an edit is cancelled.
context: SheetEmbeddedEditorPluginContext
methodonCommit onCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): voidCalled after Sheet has committed the edited document.
document: SheetDocumentcontext: SheetEmbeddedEditorPluginContext
methodonRender onRender(update: SheetRenderUpdate, context: SheetEmbeddedEditorPluginContext): voidCalled after a render pass has completed.
update: SheetRenderUpdatecontext: SheetEmbeddedEditorPluginContext
methodtransformCommit transformCommit(document: SheetDocument, context: SheetEmbeddedEditorPluginContext): void | SheetDocument | nullAllows a Sheet plugin to normalize the snapshot at the commit boundary.
document: SheetDocumentcontext: SheetEmbeddedEditorPluginContext
methodtransformInlineStyle transformInlineStyle(update: SheetInlineStyleUpdate, context: SheetEmbeddedEditorPluginContext): void | SheetInlineStyleUpdate | nullAllows a plugin to normalize an inline style update before Doc input runs.
update: SheetInlineStyleUpdatecontext: SheetEmbeddedEditorPluginContext
methodtransformInput transformInput(input: SheetEditInput, context: SheetEmbeddedEditorPluginContext): void | SheetEditInput | nullAllows a plugin to normalize or consume Sheet keyboard/text input.
input: SheetEditInputcontext: SheetEmbeddedEditorPluginContext
- interfaceSheetEmbeddedEditorPluginContextsource ↗
-
interface SheetEmbeddedEditorPluginContextContext delivered to Sheet-specific embedded-editor plugins.
- interfaceSheetEmbeddedEditorPluginImplementationsource ↗
-
interface SheetEmbeddedEditorPluginImplementationConstructor form accepted by adapter configuration for stateless plugins.
constructorconstructor SheetEmbeddedEditorPluginImplementation(): SheetEmbeddedEditorPlugin - interfaceSheetEmbeddedInlineStyleObservationControllersource ↗
-
interface SheetEmbeddedInlineStyleObservationController - variabledefaultEmbeddedDocConfigsource ↗
-
defaultEmbeddedDocConfig: EmbeddedDocConfigBuilt-in defaults for a Doc instance embedded inside a Sheet cell.
- functioncreateSheetEmbeddedSearCoreEditorsource ↗
-
createSheetEmbeddedSearCoreEditor(options?: SearCoreEditorAdapterOptions): SearCoreEditorAdapterCreates the lightweight SearCore editor used by Sheet embedded cells.
options: SearCoreEditorAdapterOptions
- functionregisterSheetEmbeddedInlineStyleObservationsource ↗
-
registerSheetEmbeddedInlineStyleObservation(observations: ObservationRegistry, input: DocInputPlugin, inlineStyles: RichTextInlineStyleRegistry, isEditing: (): boolean, readTypingStyle?: (): Readonly<Record<string, unknown>>): SheetEmbeddedInlineStyleObservationControllerRegisters the selection-derived inline-style state with an embedded editor.
observations: ObservationRegistryinput: DocInputPlugininlineStyles: RichTextInlineStyleRegistryisEditing: (): booleanreadTypingStyle: (): Readonly<Record<string, unknown>>
No public exports match that search.