Fix declaration tags in server rendering

Corrected how declaration tags are transformed during server-side rendering by ensuring the state parameter is properly passed to the visit function. This fixes an issue where declaration tags weren't being processed correctly on the server.