API reference
@searsuite/sear-plugin-dropdown
Optional dropdown cell interactions over validation-owned rules.
21 exportsderived from source
- classDropdownErrorsource ↗
-
class DropdownError extends SearErrorStructured feature diagnostic.
constructorconstructor DropdownError(code: DropdownErrorCode, message: string, details?: SearErrorDetails): DropdownErrorCreates a public dropdown diagnostic.
code: DropdownErrorCodemessage: stringdetails: SearErrorDetails
Inherited members 10
Inherited from SearError.
- classSheetDropdownPluginsource ↗
-
class SheetDropdownPlugin extends Plugin<unknown, CellProperties, null>Stateless dropdown interaction; rules and values retain their existing document owners.
constructorconstructor SheetDropdownPlugin(options: SheetDropdownOptions): SheetDropdownPluginReceives owner-scoped projections and semantic transaction factories.
options: SheetDropdownOptions
propertydepth readonly depth: -24Handles arrows before ordinary selection.
propertywarnOnDuplicateDepth readonly warnOnDuplicateDepth: falseSeveral stateless interaction extensions may share depth.
propertysymbolstatic readonly symbol: typeof symbolEditor-local service token.
methodapply apply(): nullMutations belong to validation and cell owners.
methoddestroy destroy(): voidReleases transient host subscriptions.
methodgetPluginConfig getPluginConfig(): nullNo independent render configuration.
methodonMouseDown onMouseDown(_core: unknown, event: EventWithOffsetAndTarget<CellProperties>): boolean | voidActivates the trailing cell arrow through the public command bus.
_core: unknownevent: EventWithOffsetAndTarget<CellProperties>
methodonMouseUp onMouseUp(_core: unknown, event: EventWithOffsetAndTarget<CellProperties>): boolean | voidKeeps an arrow release from returning focus to the cell text editor.
_core: unknownevent: EventWithOffsetAndTarget<CellProperties>
methodregisterCellVisualReaders registerCellVisualReaders(registry: SheetCellVisualReaderRegistry): voidAdds viewport-bounded arrows and option color layers without taking fill ownership.
registry: SheetCellVisualReaderRegistry
methodregisterCommands registerCommands(commands: SheetCommandBus): voidRegisters value changes and a transient picker request command.
commands: SheetCommandBus
methodregisterObservations registerObservations(registry: ObservationRegistry): voidHost listener failures are isolated by the editor observation registry.
registry: ObservationRegistry
methodregisterQueries registerQueries(queries: SheetQueryRegistry): voidPublishes a typed, current-cell query.
queries: SheetQueryRegistry
methodregisterState registerState(): { dataEngine: { enabled: boolean }; key: PluginKey; state: null }No duplicate document field is created.
methodrender render(): nullCell visual readers supply all adornments.
Inherited members 26
Inherited from Plugin.
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseMove
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceDropdownCellInputsource ↗
-
interface DropdownCellInputAbsolute target cell; all picker reads are editor-local.
- interfaceDropdownCellSnapshotsource ↗
-
interface DropdownCellSnapshot extends DropdownCellInputImmutable current rule and cell projection.
propertyinputMessage readonly inputMessage?: stringSelection prompt from the validation owner.
propertymultiple readonly multiple: booleanWhether choices accumulate.
propertyoptions readonly options: readonly DataValidationOption[]Ordered, distinct current choices.
propertyruleId readonly ruleId: stringStable validation owner id.
propertyselected readonly selected: readonly string[]Current selected labels, including values absent from the rule.
propertyshowArrow readonly showArrow: booleanWhether the cell shows its arrow.
- interfacePickDropdownOptionInputsource ↗
-
interface PickDropdownOptionInput extends DropdownCellInputTarget and choice to set, or toggle in multiple-selection mode.
- interfaceSheetDropdownOptionssource ↗
-
interface SheetDropdownOptionsDependencies supplied by the composition root; persistent data stays with its original owners.
propertyqueries readonly queries: SheetQueryRegistryEditor-local query bus for validation-owner projections.
propertyvalidation readonly validation: SheetCellInputValidationRegistryShared edit validation, including overlapping rules.
methodbeforeOpen beforeOpen(): booleanCommits active editing before pointer activation; false leaves the edit active.
methodcreateValueTransaction createValueTransaction(row: number, column: number, text: string | null): TransactionPlans a text or empty replacement as an ordinary cell-owner transaction.
row: numbercolumn: numbertext: string | null
methodforEachSourceValue forEachSourceValue(start: readonly [number, number], end: readonly [number, number], visit: (value: unknown): void): voidVisits nonempty source values in provider order, including formula projections.
start: readonly [number, number]end: readonly [number, number]visit: (value: unknown): void
methodreadShape readShape(): readonly [number, number]Reads dimensions for coordinate validation.
methodreadText readText(row: number, column: number): stringReads display text, including formula results and structured cells.
row: numbercolumn: number
- typeDropdownErrorCodesource ↗
-
type DropdownErrorCode = typeof DropdownErrorCode[keyof typeof DropdownErrorCode]One public dropdown error code.
- variableClearDropdownValueCommandsource ↗
-
ClearDropdownValueCommand: SheetCommandDefinition<DropdownCellInput, SheetCommandResult>Clears the cell value while retaining validation rules.
- variableDropdownErrorCodesource ↗
-
DropdownErrorCode: { Conflict: "DROPDOWN_CONFLICT"; Invalid: "DROPDOWN_INVALID"; Limit: "DROPDOWN_LIMIT"; Stale: "DROPDOWN_STALE" }Stable dropdown diagnostic codes.
- variableDropdownLimitssource ↗
-
DropdownLimits: { Options: 1000; SourceValues: 10000 }Shared option and source traversal budgets.
- variableDropdownPickerRequestsource ↗
-
DropdownPickerRequest: EventObservationDefinition<DropdownCellInput>Transient host request; no document or remount session state is stored.
- variableOpenDropdownPickerCommandsource ↗
-
OpenDropdownPickerCommand: SheetCommandDefinition<DropdownCellInput, SheetCommandResult>Requests the host picker for one current dropdown cell.
- variablePickDropdownOptionCommandsource ↗
-
PickDropdownOptionCommand: SheetCommandDefinition<PickDropdownOptionInput, SheetCommandResult>Picks one valid option through a cell-owner transaction.
- variableReadDropdownCellQuerysource ↗
-
ReadDropdownCellQuery: SheetQueryDefinition<DropdownCellInput, DropdownCellSnapshot | null>Reads the current dropdown without exposing a feature matrix.
- functionassertDropdownCellsource ↗
-
assertDropdownCell(input: DropdownCellInput, shape: readonly number[]): voidValidates a cell before any source traversal or mutation.
input: DropdownCellInputshape: readonly number[]
- functionplanDropdownValuesource ↗
-
planDropdownValue(state: DropdownCellSnapshot | null, input: PickDropdownOptionInput): string | nullComputes a selection without mutating state; stale or removed choices fail explicitly.
state: DropdownCellSnapshot | nullinput: PickDropdownOptionInput
- functionreadDropdownCellsource ↗
-
readDropdownCell(input: DropdownCellInput, options: SheetDropdownOptions): DropdownCellSnapshot | nullResolves the last covering dropdown rule and bounded, distinct choices.
input: DropdownCellInputoptions: SheetDropdownOptions
- variableDropdownModesource ↗
-
DropdownMode: { Multiple: "multiple"; Single: "single" }Selection modes for dropdown validation.
- interfaceDropdownOptionsource ↗
-
interface DropdownOptionOne displayable dropdown choice and its optional color.
- functionformatDropdownSelectionsource ↗
-
formatDropdownSelection(values: readonly string[]): stringSerializes labels without losing embedded commas, quotes or surrounding spaces.
values: readonly string[]
- functionparseDropdownSelectionsource ↗
-
parseDropdownSelection(text: string): string[]Reads comma-separated labels with doubled-quote escaping; malformed input remains a single literal.
text: string
No public exports match that search.