News
varvara-js

va-code-block

v0.3.0Published MIT

A Web Component for rendering code blocks with a copy button.

npm i va-code-block

changelog

  1. v0.3.0

    View on GitHub

    Minor Changes

    • 2b62070: Added support for multiple code blocks with a select to switch between languages, a selected attribute and a change event.
    • c472643: Added support for reading code from light DOM content (e.g. a <pre><code> fallback readable without JavaScript) and the language from its language-* class.
  2. v0.2.1

    View on GitHub

    Patch Changes

    • f92af94: Fixed CSS at-rule and function tokenization.
    • c0f74ea: Created a single shared stylesheet constant instead of recreating it per instance.
  3. v0.2.0

    View on GitHub

    Minor Changes

    • e7feb81: Added minimal built-in syntax highlighting for JavaScript/TypeScript, CSS and HTML.
    • ca67056: Removed syntax highlighting dependency
    • a22c350: Added part attribute to pre element for external styling via ::part() selector.

    Patch Changes

    • 497502a: Improved copy button state handling for consecutive copy actions
    • 0c267c7: Added attribute observation and dynamic updates
    • 3718d93: Added check before defining custom element
    • 21839d1: Updated peer dependency to support TypeScript 6
  4. v0.1.1

    View on GitHub

    Patch Changes

    • 50cfca6: Added module declaration file to package.json.
    • aefa833: Apply pre-wrap to code blocks.
    • fcf030b: Improved installation guide and added link to full documentation.
    • eb07528: Renamed bundle file and updated homepage from package.json.
    • d219d4b: Set default language value to unformatted text.
  5. v0.1.0

    View on GitHub

    Minor Changes

    • 5cf5c96: Introduce initial release with core functionality.
All releases on GitHub
Under construction