Fix tag-cloud component for Livewire compatibility
Summary
Fix tag-cloud component to work properly in Livewire contexts.
Changes
-
Use anchor tags instead of spans — TagCanvas library only reads
<a>tags inside the<ul>. WhenwithLinksis false, we now use<a href="javascript:void(0)">instead of<span>. -
Fix JavaScript timing — Changed from
DOMContentLoaded(which has already fired by the time Livewire renders) to checkingdocument.readyStateand running immediately if DOM is ready. -
Poll for TagCanvas — Added a retry mechanism that waits for TagCanvas to load if it's not available yet (handles deferred script loading).