SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function contributeSheetCommands

    • The per-sheet command behavior (paired with registerSheetDefinitions). A plain contributor over the Command.CommandContribution authoring facet:

      1. installs the shared transactional middleware (batch + busy + error + repeatable) via use(), so the command callbacks stay pure;
      2. runs the disable reducer — recomputed on every model tick (the container debounce coalesces re-resolution, so the reducer's cheap updateCommands can run per-tick).

      Parameters

      Returns RemoveListener

      The reducer combines the protection reasons (the mutator tag → "sheet protected", plus the rotation commands' extra isContinuousSpan gate) with the selection-shape rules (sort needs a single range; insert/delete by whole-row/column + overlap; merge/header). Both must be computed together per command — within-scope updateCommand overrides, so reasons are combined in one call, not stacked. Returns a disposer that detaches the model + selection listeners.