@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.
constructor SheetFormatPainterPlugin(options: SheetFormatPainterOptions): SheetFormatPainterPluginproperty readonly warnOnDuplicateDepth: falseWhether PluginManager should warn when another ordered plugin shares this depth.
property readonly symbol: typeof symbolstaticmethod apply(_state: null, _transaction: Transaction): nullApplies a transaction to plugin-owned state and returns the next state.
method destroy(): voidmethod getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method registerCommands(commands: SheetCommandBus): voidmethod registerObservations(observations: ObservationRegistry): voidmethod registerState(): { dataEngine: { enabled: boolean }; key: PluginKey; state: null }Registers one or more plugin-owned state records with the host manager.
method render(): nullProduces scene nodes owned by this plugin for the current core state.
Inherited members 29
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetFormatPainterSession
-
Local brush state borrowed by Sheet editors mounted within one Workbook.
constructor SheetFormatPainterSession(): SheetFormatPainterSessionproperty readonly symbol: typeof symbolstaticmembersnapshot snapshot: unknownmemberstate state: unknownmethod clear(): voidmethod start(formats: SheetFormatTransferRegistry, snapshot: SheetFormatTransferSnapshot, state: FormatPainterState): voidmethod visibleState(formats: SheetFormatTransferRegistry): FormatPainterState - interfaceFormatPainterState
- interfaceSheetFormatPainterOptions
-
Dependencies supplied by the owning composition root, with no global state.
- interfaceStartFormatPainterInput
-
property readonly mode?: FormatPainterModeproperty readonly source: SheetMoveRange - 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 = SheetMoveRangeInclusive range shared by format-transfer owners and hosts.
- interfaceSheetFormatTransferContribution
-
Optional state-owner contribution to format painting.
property readonly id: stringmethod capture(source: SheetMoveRange): SheetFormatTransferSnapshotmethod clear(range: SheetMoveRange): readonly SheetFormatTransferPlan[]Plans removal of this owner's explicit formats without changing cell content.
method planCaptured(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.
property readonly operations: readonly Operation[]property readonly target: PluginKey - classSheetFormatTransferRegistry
-
Editor-local composition of state-owner format transfers.
constructor SheetFormatTransferRegistry(): SheetFormatTransferRegistryproperty readonly symbol: typeof symbolstaticmethod capture(source: SheetMoveRange): SheetFormatTransferSnapshotmethod capturePortable(source: SheetMoveRange): readonly SheetPortableFormatTransfer[]method clear(range: SheetMoveRange): readonly SheetFormatTransferPlan[]Plans all format owners against the same unchanged pre-clear state.
method destroy(): voidmethod planPortable(captured: readonly SheetPortableFormatTransfer[], destination: SheetMoveRange): readonly SheetFormatTransferPlan[]method register(owner: SheetFormatTransferContribution): (): void - interfaceSheetFormatTransferSnapshot
-
Captured format data, independent of subsequent source changes.
property readonly portable?: unknownCaptured owner data that can be planned against another Sheet instance.
method plan(destination: SheetMoveRange, targetRegistry?: SheetFormatTransferRegistry): readonly SheetFormatTransferPlan[]
No matching API entries.