Add syntax highlighting and light/dark themes to twui CodeBlock
- Highlight string children with refractor (Prism) when `language` is set, rendered as React token spans; add ini/bash/json/yaml/ts support - Add `theme` prop (auto | light | dark); auto follows the `.dark` class. Palettes are `--twui-code-*` CSS variables (GitHub Light/Dark, all tokens WCAG AA) so custom themes need no component changes - Fix layout: real padding, singleBlock copy button no longer covers the code, clipped rounded corners, wrapperProps.style honoured, long tokens wrap - MDX helpers take `codeTheme` and no longer force a black background - Highlight WireGuard config blocks as ini Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in: