The current anchor scope, or null before any activation.
The region's floor scope (always present, below every layer).
Add a layer's scope at priority z and re-chain. Returns an unregister that removes it and
re-chains the rest (restoring whatever was below). The caller owns the scope's own teardown
(contribution.remove() / scope.dispose()); this only manages stack membership.
Fires when the anchor changes — and, for region trackers, when the region attaches/detaches.
The z-ordered layer→scope registry — the anchor source for a region whose behavior is composed from stacked layers (selection, clipboard, format painter, the cell editor, …). Each command-bearing layer
registers its CommandScope at a z; this chains them (via CommandScope.setParent) into a stack ordered by z — higher z → deeper → wins — atop the region'sbase, and reports the top as getAnchor. The unchanged CommandScope.resolve (which walks_parentfrom the anchor) then resolves top-of-stack first: a stacked layer overrides a command by stacking, not by focus, and unstacking it restores the layer/base below.This is what makes a feature a composable layer — one that both draws and injects commands — and it is the same mechanism whether the layer is ours or a third party's.
LayerActivationimplements ActivationTracker, so it drops intoCommandResolver/ FocusActivation (as an AnchorSource, read live) with no other changes. It has no DOM element of its own — the region owns focus/keys (a pane maps itsStageelement to this stack; see FocusActivation).Remarks
Ties (equal z) keep insertion order. Reusing the same scope twice is not supported (register each layer's scope once). The base is never removed; it's the region's always-present floor.