setContextualToolbarAllowedPositions

Restricts the docks the user may drag any contextual toolbar to — the Compose counterpart of the View ToolbarCoordinatorLayout.LayoutParams.allowedPositions a host set on the annotation toolbar. Applied to the bar shown now and to every bar shown later, so it survives mode changes; null (the default) clears the restriction.

The host can only narrow: a bar's own ContextualToolbarState.allowedPositions (the content editing bar only docks on top) is intersected with positions, and an empty intersection keeps the bar's own set so no bar becomes undockable. A shown bar whose position falls outside the result moves to the first allowed dock.