Fix tag-cloud component for Livewire compatibility

Summary

Fix tag-cloud component to work properly in Livewire contexts.

Changes

  1. Use anchor tags instead of spans — TagCanvas library only reads <a> tags inside the <ul>. When withLinks is false, we now use <a href="javascript:void(0)"> instead of <span>.

  2. Fix JavaScript timing — Changed from DOMContentLoaded (which has already fired by the time Livewire renders) to checking document.readyState and running immediately if DOM is ready.

  3. Poll for TagCanvas — Added a retry mechanism that waits for TagCanvas to load if it's not available yet (handles deferred script loading).

Merge request reports

Loading