varvara-js
va-code-block
v0.3.0Published MIT
A Web Component for rendering code blocks with a copy button.
npm i va-code-blockchangelog
v0.3.0
View on GitHubMinor Changes
- 2b62070: Added support for multiple code blocks with a select to switch between languages, a
selectedattribute and achangeevent. - c472643: Added support for reading code from light DOM content (e.g. a
<pre><code>fallback readable without JavaScript) and the language from itslanguage-*class.
- 2b62070: Added support for multiple code blocks with a select to switch between languages, a
v0.2.1
View on GitHubPatch Changes
- f92af94: Fixed CSS at-rule and function tokenization.
- c0f74ea: Created a single shared stylesheet constant instead of recreating it per instance.
v0.2.0
View on GitHubMinor Changes
- e7feb81: Added minimal built-in syntax highlighting for JavaScript/TypeScript, CSS and HTML.
- ca67056: Removed syntax highlighting dependency
- a22c350: Added
partattribute 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
v0.1.1
View on GitHubPatch Changes
- 50cfca6: Added module declaration file to
package.json. - aefa833: Apply
pre-wrapto 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.
- 50cfca6: Added module declaration file to
v0.1.0
View on GitHubMinor Changes
- 5cf5c96: Introduce initial release with core functionality.
