← All packages

@searsuite/sear-plugin-format-painter

Sheet format painting through state-owner contributions.

Paint a range

classSheetFormatPainterPlugin
class SheetFormatPainterPlugin extends Plugin<unknown, CellProperties, null>

Owns only a local captured-format session; document formats remain with their owners.

constructorSheetFormatPainterPlugin(options: SheetFormatPainterOptions): SheetFormatPainterPlugin
propertyreadonly warnOnDuplicateDepth: false

Whether PluginManager should warn when another ordered plugin shares this depth.

propertyreadonly symbol: typeof symbolstatic
methodapply(_state: null, _transaction: Transaction): null

Applies a transaction to plugin-owned state and returns the next state.

methoddestroy(): void
methodgetPluginConfig(): null

Returns this plugin's runtime configuration view for the current core.

methodregisterCommands(commands: SheetCommandBus): void
methodregisterObservations(observations: ObservationRegistry): void
methodregisterState(): { dataEngine: { enabled: boolean }; key: PluginKey; state: null }

Registers one or more plugin-owned state records with the host manager.

methodrender(): null

Produces scene nodes owned by this plugin for the current core state.

Inherited members 29

Inherited from Plugin.

typeFormatPainterMode
type FormatPainterMode = typeof FormatPainterMode[keyof typeof FormatPainterMode] FormatPainterMode: { Once: "once"; Persistent: "persistent" }

Canonical activation modes shared by commands and hosts.

variableApplyFormatPainterCommand
ApplyFormatPainterCommand: SheetCommandDefinition<{ destination: SheetMoveRange }, SheetCommandResult>
variableCancelFormatPainterCommand
CancelFormatPainterCommand: SheetCommandDefinition<void, SheetCommandResult>
variableFormatPainterObservation
FormatPainterObservation: StateObservationDefinition<FormatPainterState>
variableStartFormatPainterCommand
StartFormatPainterCommand: SheetCommandDefinition<StartFormatPainterInput, SheetCommandResult>

Transfer formats

functioncreateMatrixFormatTransfer
createMatrixFormatTransfer<Value>(id: string, target: PluginKey, readMatrix: (): SheetFormatMatrix<Value>): Required<SheetFormatTransferContribution>

Captures sparse persisted formats and tiles them over an inclusive target.

typeSheetFormatRange
type SheetFormatRange = SheetMoveRange

Inclusive range shared by format-transfer owners and hosts.

interfaceSheetFormatTransferContribution

Optional state-owner contribution to format painting.

propertyreadonly id: string
methodcapture(source: SheetMoveRange): SheetFormatTransferSnapshot
methodclear(range: SheetMoveRange): readonly SheetFormatTransferPlan[]

Plans removal of this owner's explicit formats without changing cell content.

methodplanCaptured(portable: unknown, destination: SheetMoveRange): readonly SheetFormatTransferPlan[]

Plans a captured source pattern using this owner's current target state.

interfaceSheetFormatTransferPlan

One owner's isolated plan; only the owner interprets its operations.

interfaceSheetFormatTransferSnapshot

Captured format data, independent of subsequent source changes.