Skip to content

Releases: metonym/svelte-highlight

v7.7.0

15 Jul 15:52
Compare
Choose a tag to compare

Features

v7.6.1

16 May 02:49
Compare
Choose a tag to compare

Fixes

  • avoid self-closing tag in LineNumbers to address Svelte 5 warning (02341fc, #342)

v7.6.0

06 Feb 06:07
Compare
Choose a tag to compare

Features

  • add --langtag-top, --langtag-right style props

The Highlight components support style props to customize the langtag, if displayed.

The default value for --langtag-top and --langtag-right is 0.

<HighlightAuto
  {code}
  langtag
  --langtag-top="0.5rem"
  --langtag-right="0.5rem"
  --langtag-background="linear-gradient(135deg, #2996cf, 80%, white)"
  --langtag-color="#fff"
  --langtag-border-radius="6px"
  --langtag-padding="0.5rem"
/>

v7.5.0

02 Feb 04:56
Compare
Choose a tag to compare

Features

  • add --langtag-padding style prop

The Highlight components support style props to customize the langtag, if displayed.

The default value for --langtag-padding is "1em".

<HighlightAuto
  {code}
  langtag
  --langtag-background="linear-gradient(135deg, #2996cf, 80%, white)"
  --langtag-color="#fff"
  --langtag-border-radius="6px"
  --langtag-padding="0.5rem"
/>

v7.4.8

05 Jan 05:20
Compare
Choose a tag to compare

Fixes

  • add missing exports to allow importing from svelte-highlight/styles and svelte-highlight/languages (#316, 12e7830)

This fix supports the following import variations:

// Base import for styles/languages
import { _default } from "svelte-highlight/styles";
import { _1c } from "svelte-highlight/languages";

// Explicit index
import { _default } from "svelte-highlight/styles/index";
import { typescript } from "svelte-highlight/languages/index";

// Explicit extension
import lang from "svelte-highlight/languages/1c.js"
import style from "svelte-highlight/styles/3024.js";

v7.4.7

28 Dec 18:10
Compare
Choose a tag to compare

Fixes

  • use declare const for languages and styles type definitions (#314, bd956d6)

v7.4.6

17 Dec 00:57
Compare
Choose a tag to compare

Fixes

  • fix ./*.svelte mapping; use import specifier instead of svelte

v7.4.5

17 Dec 00:43
Compare
Choose a tag to compare

Fixes

  • map ./*.svelte files correctly in package.json exports

v7.4.4

17 Dec 00:43
Compare
Choose a tag to compare

Fixes

  • add types to exports map in package.json
  • optimize generated CSS using cssnano

v7.4.3

16 Dec 19:00
Compare
Choose a tag to compare

Fixes

  • add svelte entry point to exports map in package.json to address Vite development warning (#308, 321e518)