What's New
Focus Mode
- New
focus-modeattribute dims non-highlighted lines to draw attention to specific code - Customizable with
--cb-focus-dim-opacityand--cb-focus-blurCSS custom properties - Works in combination with
highlight-linesattribute
Expanded Language Support
- Added Python syntax highlighting
- Added TypeScript syntax highlighting
- Added Bash/Shell syntax highlighting
Testing
- Comprehensive unit test suite with 41 tests covering all features
- Tests for: basic functionality, line numbers, highlighting, focus mode, themes, collapsible blocks, downloads, sharing, diff support, code-block-group, and more
Documentation
- Updated demos page with Focus Mode examples
- Side-by-side comparisons showing Focus Mode effect
- All language examples working correctly
Installation
```bash
npm install @profpowell/code-block
```
Or via CDN:
```html
```