useMask
useMask() provides headless state and actions for mask controls in a property panel.
Usage
ts
import { useMask } from '@open-pencil/vue'
const { active, maskType, setMaskType } = useMask()activeistruewhen exactly one selected node is being used as a mask.maskTypeis the selected node'sALPHA,VECTOR, orLUMINANCEmask type.setMaskType(type)updates the active mask with undo support.
Use the selection.toggleMask editor command to turn masking on or off so toolbar, context-menu, and keyboard behavior stays consistent.