Releases: ProfPowell/code-block
Releases · ProfPowell/code-block
v2.3.0
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
```
Package Adjustment
Whoops big oversight the dist wasn't sent!
Grouping and more!
The latest release uses highlight.js and introduces various features for showing multiple files and sharing the code.
Fix Initial Release
Tagged a bit early, let's fix it
Initial release
Initial release of a simple code-block vanilla web component