  The neutrino-driven wind cooling phase of proto-neutron stars (PNSs) follows
successful supernovae. Wind models without magnetic fields or rotation fail to
achieve the necessary conditions for production of the third $r$-process peak,
but robustly produce a weak $r$-process in neutron-rich winds. Using 2D
magnetohydrodynamic simulations with magnetar-strength magnetic fields and
rotation, we show that the PNS rotation rate significantly affects the
thermodynamic conditions of the wind. We show that high entropy material is
quasi-periodically ejected from the closed zone of the PNS magnetosphere with
the required thermodynamic conditions to produce heavy elements. We show that
maximum entropy $S$ of the material ejected depends systematically on the
magnetar spin period $P_{\star}$ and scales as $S \propto P_{\star}^{-5/6}$ for
sufficiently rapid rotation. We present results from simulations at a constant
neutrino luminosity representative of $\sim 1-2$ s after the onset of cooling
for $P_{\star}$ ranging from 5 ms to 200 ms and a few simulations with evolving
neutrino luminosity where we follow the evolution of the magnetar wind until
$10-14$ s after the onset of cooling. We estimate at magnetar polar magnetic
field strength $B_0=3\times 10^{15}$ G, $10^{15}$ G, and $5\times 10^{14}$ G
that neutron-rich magnetar winds can respectively produce at least $\sim
2-5\times 10^{-5}$ M$_{\odot}$, $\sim 3-4\times 10^{-6}$ M$_{\odot}$, and $\sim
2.5\times 10^{-8}$ M$_{\odot}$ of material with the required parameters for
synthesis of the third $r-$process peak, within $1-2$ s, 10 s, and 14 s in that
order after the onset of cooling. We show that proton-rich magnetar winds can
have favorable conditions for production of $p-$nuclei, even at a modest
$B_0=5\times 10^{14}$ G.
