Given that $\hat d$ is a unit vector satisfying the equations
\begin{align}
u &= 0.5 + \frac{\text{arctan2}(d_z, d_x)}{2\pi} \quad \text{and}
\\
v &= 0.5 - \frac{\arcsin(d_y)}{\pi},
\end{align}
we have
\begin{align}
\text{arctan2}(d_z, d_x) &= 2\pi(u - 0.5) \quad \text{and}
\\
\arcsin(d_y) &= \pi(0.5 - v)
\end{align}
where $u,v \in [0,1]$.
The $d_y$ coordinate is easily dealt with:
$$d_y = \sin(\pi(0.5 - v)).$$
The $\text{arctan2}$ function is a little harder to invert because we have only
one output parameter for two input parameters. But the input to the function
can be known up to some positive factor $r > 0$:
\begin{align}
d_z & = r \cos(2\pi(u - 0.5)) \quad \text{and}
\\
d_x & = r \sin(2\pi(u - 0.5)).
\end{align}
(That assumes $\text{arctan2}(\cos\theta, \sin\theta) = \theta$
for $-\pi < \theta < \pi$; if this is the
version of $\text{arctan2}$ such that
$\text{arctan2}(\sin\theta, \cos\theta) = \theta$,
which is more usual in software libraries,
then swap the sin and cos functions in the formulas above.)
With the added constraint that $d_x^2 + d_y^2 + d_z^2 = 1$,
we have $r^2 + \sin^2(\pi(0.5 - v))$ and therefore $r = \cos(\pi(0.5 - v))$.
Putting all of this together,
\begin{align}
d_x & = \cos(\pi(0.5 - v)) \sin(2\pi(u - 0.5)), \\
d_y & = \sin(\pi(0.5 - v)), & \text{and} \\
d_z & = \cos(\pi(0.5 - v)) \cos(2\pi(u - 0.5)).
\end{align}