Wrap a string to fit within the specified column width, preserving ANSI escape codes.
This function is designed to be compatible with the popular "wrap-ansi" NPM package.
Features:
- Preserves ANSI escape codes (colors, styles) across line breaks
- Supports SGR codes (colors, bold, italic, etc.) and OSC 8 hyperlinks
- Respects Unicode display widths (full-width characters, emoji)
- Word wrapping at word boundaries (configurable)