def generate_sortable_init_script( handle_class:str='drag-handle', # CSS class for drag handle elements animation_ms:int=150, # Drag animation duration in milliseconds)->Script: # Script element with Sortable.js initialization
Generate htmx.onLoad script that initializes Sortable.js on .sortable elements.
Includes the disable-on-drag/re-enable-on-swap pattern to prevent double-firing during HTMX response processing.