Skip to content

Releases: ProfPowell/code-block

v2.3.0

19 Jan 22:50

Choose a tag to compare

What's New

Focus Mode

  • New focus-mode attribute dims non-highlighted lines to draw attention to specific code
  • Customizable with --cb-focus-dim-opacity and --cb-focus-blur CSS custom properties
  • Works in combination with highlight-lines attribute

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

<script type="module" src="https://unpkg.com/@profpowell/code-block"></script>

```

Package Adjustment

28 Nov 23:43

Choose a tag to compare

Whoops big oversight the dist wasn't sent!

Grouping and more!

28 Nov 23:17

Choose a tag to compare

The latest release uses highlight.js and introduces various features for showing multiple files and sharing the code.

Fix Initial Release

27 Nov 02:17
4fb2340

Choose a tag to compare

Tagged a bit early, let's fix it

Initial release

27 Nov 02:03
990526b

Choose a tag to compare

Initial release of a simple code-block vanilla web component