@aparte/plugin-shiki 0.19.2 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,YAAY,EAAC,MAAM,cAAc,CAAC;AACrE;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACjC,sEAAsE;IACtE,kBAAkB,IAAI,MAAM,EAAE,CAAC;IAC/B,mGAAmG;IACnG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAAC;CACjE;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,4FAA4F;AAC5F,MAAM,MAAM,kBAAkB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,cAAc,CAAC;IAAC,YAAY,EAAE,KAAK,CAAA;CAAE,CAAC;AAEpE,MAAM,WAAW,wBAAwB;IACrC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;CACnC;AAED,oEAAoE;AACpE,eAAO,MAAM,SAAS,aAAoD,CAAC;AAE3E,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAE9F;AAID;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAiB5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,iCAAiC,CAC7C,WAAW,EAAE,oBAAoB,EACjC,OAAO,GAAE,wBAA6B,EACtC,MAAM,GAAE,YAAiC,GAC1C,IAAI,CAYN"}
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,YAAY,EAAC,MAAM,cAAc,CAAC;AACrE;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACjC,sEAAsE;IACtE,kBAAkB,IAAI,MAAM,EAAE,CAAC;IAC/B,mGAAmG;IACnG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAAC;CACjE;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,4FAA4F;AAC5F,MAAM,MAAM,kBAAkB,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,cAAc,CAAC;IAAC,YAAY,EAAE,KAAK,CAAA;CAAE,CAAC;AAEpE,MAAM,WAAW,wBAAwB;IACrC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;CACnC;AAED,oEAAoE;AACpE,eAAO,MAAM,SAAS,aAAoD,CAAC;AAE3E,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAE9F;AAID;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CA4B5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,iCAAiC,CAC7C,WAAW,EAAE,oBAAoB,EACjC,OAAO,GAAE,wBAA6B,EACtC,MAAM,GAAE,YAAiC,GAC1C,IAAI,CAYN"}
package/dist/core.js CHANGED
@@ -8,8 +8,10 @@ function ensureThemePairStyles() {
8
8
  if (typeof document === "undefined" || document.getElementById(PAIR_STYLE_ID)) return;
9
9
  const style = document.createElement("style");
10
10
  style.id = PAIR_STYLE_ID;
11
- const dark = ".shiki{color:var(--shiki-dark);background-color:var(--shiki-dark-bg)}.shiki span{color:var(--shiki-dark)}";
12
- style.textContent = '.shiki{color:var(--shiki-light);background-color:var(--shiki-light-bg)}.shiki span{color:var(--shiki-light)}[data-aparte-theme="dark"] ' + dark.replace(".shiki span", '[data-aparte-theme="dark"] .shiki span') + '@media (prefers-color-scheme: dark){:root:not([data-aparte-theme="light"]) ' + dark.replace(".shiki span", ':root:not([data-aparte-theme="light"]) .shiki span') + "}";
11
+ const on = "--aparte-shiki-dark-on";
12
+ const fg = `var(${on}) var(--shiki-dark)`;
13
+ const bg = `var(${on}) var(--shiki-dark-bg)`;
14
+ style.textContent = `@media (prefers-color-scheme: dark){:root:not([data-aparte-theme]){${on}: ;}}[data-aparte-theme="dark"]{${on}: ;}[data-aparte-theme="light"]{${on}:initial;}.shiki{--aparte-shiki-fg:${fg};--aparte-shiki-bg:${bg};color:var(--aparte-shiki-fg,var(--shiki-light));background-color:var(--aparte-shiki-bg,var(--shiki-light-bg))}.shiki span{--aparte-shiki-fg:${fg};color:var(--aparte-shiki-fg,var(--shiki-light))}`;
13
15
  document.head.appendChild(style);
14
16
  }
15
17
  function setupShikiProviderFromHighlighter(highlighter, options = {}, config = aparteGlobalConfig) {
package/dist/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sources":["../src/core.ts"],"sourcesContent":["import { aparteGlobalConfig , type AparteConfig} from '@aparte/core';\n/**\n * The slice of a shiki highlighter this plugin actually uses — declared here rather\n * than borrowed from `HighlighterCore`, so this module needs no import from shiki at\n * all, not even a type. A real `HighlighterCore` satisfies it (asserted at compile\n * time in the tests), and so does a wrapper of your own.\n */\nexport interface ShikiHighlighterLike {\n /** The grammars this highlighter carries — read once, then cached. */\n getLoadedLanguages(): string[];\n /** Render `code` as highlighted HTML with a loaded grammar and one theme, or a light/dark pair. */\n codeToHtml(code: string, options: ShikiRenderOptions): string;\n}\n\n/**\n * A theme for each of the two colour schemes core switches between. A type literal\n * rather than an interface: shiki's `themes` option is a string-keyed record, and only\n * a literal type is implicitly assignable to one.\n */\nexport type ShikiThemePair = { light: string; dark: string };\n\n/** What either entry hands to `codeToHtml` — shiki's own option names, nothing invented. */\nexport type ShikiRenderOptions =\n | { lang: string; theme: string }\n | { lang: string; themes: ShikiThemePair; defaultColor: false };\n\nexport interface ShikiCoreProviderOptions {\n /**\n * Theme to render with — the name of a theme your highlighter was built with — or a\n * `{ light, dark }` pair of them, which follows core's `[data-aparte-theme=\"dark\"]`\n * switch. Default `'github-dark'`.\n */\n theme?: string | ShikiThemePair;\n}\n\n/** Languages that mean \"don't highlight\", plus the empty string. */\nexport const PLAINTEXT = new Set(['text', 'plaintext', 'txt', 'ansi', '']);\n\n/** One theme renders with `theme`; a pair renders both colours per token and no default. */\nexport function renderOptions(theme: string | ShikiThemePair, lang: string): ShikiRenderOptions {\n return typeof theme === 'string' ? { lang, theme } : { lang, themes: theme, defaultColor: false };\n}\n\nconst PAIR_STYLE_ID = 'aparte-shiki-theme-pair';\n\n/**\n * The stylesheet a theme pair needs, added to the document once.\n *\n * With `defaultColor: false` shiki writes both colours on every token as CSS variables\n * (`--shiki-light`, `--shiki-dark`, plus `-bg` on the block) and sets no colour of its\n * own, so someone has to read the right one. That someone is not core — core knows\n * nothing about shiki's variables — and not the consumer either, who asked for a pair\n * precisely so the block would follow the theme by itself. The switch is core's public\n * theme contract, `[data-aparte-theme=\"dark\"]`, documented in theme.css.\n */\nexport function ensureThemePairStyles(): void {\n if (typeof document === 'undefined' || document.getElementById(PAIR_STYLE_ID)) return;\n const style = document.createElement('style');\n style.id = PAIR_STYLE_ID;\n // Three states, the same three core's theme.css answers: an explicit `dark`, an\n // explicit `light`, and no attribute at all — where the OS decides. The dark half\n // used to key on the attribute alone, so a page in system dark (the default of every\n // page that sets nothing) rendered the LIGHT theme's white block on a dark bubble.\n const dark = '.shiki{color:var(--shiki-dark);background-color:var(--shiki-dark-bg)}'\n + '.shiki span{color:var(--shiki-dark)}';\n style.textContent =\n '.shiki{color:var(--shiki-light);background-color:var(--shiki-light-bg)}'\n + '.shiki span{color:var(--shiki-light)}'\n + '[data-aparte-theme=\"dark\"] ' + dark.replace('.shiki span', '[data-aparte-theme=\"dark\"] .shiki span')\n + '@media (prefers-color-scheme: dark){:root:not([data-aparte-theme=\"light\"]) '\n + dark.replace('.shiki span', ':root:not([data-aparte-theme=\"light\"]) .shiki span') + '}';\n document.head.appendChild(style);\n}\n\n/**\n * Register a highlighter **you** built as aparté's highlight provider.\n *\n * Why this exists — measured, on a build whose only import was the plugin:\n *\n * | entry point | files emitted | weight |\n * | -------------------------------------------- | ------------- | ------ |\n * | `@aparte/plugin-shiki` (shiki's full bundle) | 302 | 11 MB |\n * | this one, with three grammars | 1 | 560 kB |\n *\n * The convenience entry imports `shiki`, whose bundle maps **every** known language\n * to a dynamic import, so a bundler emits one chunk per grammar —\n * `emacs-lisp` (780 kB), `wasm`, `wolfram` and 300 others — even for an app that\n * renders twenty. No runtime option can undo that: a static import is a static\n * import (verified — restricting `langs` still emits all 302). Controlling\n * distribution weight means not importing that bundle at all, which is what\n * importing THIS module instead achieves.\n *\n * ```ts\n * import { createHighlighterCore } from 'shiki/core';\n * import { createJavaScriptRegexEngine } from 'shiki/engine/javascript';\n * import ts from '@shikijs/langs/typescript';\n * import githubDark from '@shikijs/themes/github-dark';\n * import { setupShikiProviderFromHighlighter } from '@aparte/plugin-shiki/core';\n *\n * setupShikiProviderFromHighlighter(\n * await createHighlighterCore({\n * themes: [githubDark],\n * langs: [ts],\n * engine: createJavaScriptRegexEngine(),\n * }),\n * );\n * ```\n *\n * Your highlighter's grammars are fixed, so a language it does not carry renders as\n * plain text rather than throwing — same degradation as the convenience entry, minus\n * the on-demand load it cannot do.\n *\n * Framework-agnostic, and needs no `AparteClient`. Call once at startup.\n */\nexport function setupShikiProviderFromHighlighter(\n highlighter: ShikiHighlighterLike,\n options: ShikiCoreProviderOptions = {},\n config: AparteConfig = aparteGlobalConfig,\n): void {\n const theme = options.theme ?? 'github-dark';\n if (typeof theme !== 'string') ensureThemePairStyles();\n let loaded: Set<string> | null = null;\n\n config.setHighlightProvider((code, lang) => {\n const requested = (lang || 'text').toLowerCase();\n // Cached after the first call: the grammar set of a core highlighter is fixed.\n loaded ??= new Set(highlighter.getLoadedLanguages());\n const language = PLAINTEXT.has(requested) || !loaded.has(requested) ? 'text' : requested;\n return highlighter.codeToHtml(code, renderOptions(theme, language));\n });\n}\n"],"names":[],"mappings":";AAoCO,MAAM,gCAAgB,IAAI,CAAC,QAAQ,aAAa,OAAO,QAAQ,EAAE,CAAC;AAGlE,SAAS,cAAc,OAAgC,MAAkC;AAC5F,SAAO,OAAO,UAAU,WAAW,EAAE,MAAM,MAAA,IAAU,EAAE,MAAM,QAAQ,OAAO,cAAc,MAAA;AAC9F;AAEA,MAAM,gBAAgB;AAYf,SAAS,wBAA8B;AAC1C,MAAI,OAAO,aAAa,eAAe,SAAS,eAAe,aAAa,EAAG;AAC/E,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,KAAK;AAKX,QAAM,OAAO;AAEb,QAAM,cACF,4IAEkC,KAAK,QAAQ,eAAe,wCAAwC,IACpG,gFACA,KAAK,QAAQ,eAAe,oDAAoD,IAAI;AAC1F,WAAS,KAAK,YAAY,KAAK;AACnC;AA0CO,SAAS,kCACZ,aACA,UAAoC,CAAA,GACpC,SAAuB,oBACnB;AACJ,QAAM,QAAQ,QAAQ,SAAS;AAC/B,MAAI,OAAO,UAAU,SAAU,uBAAA;AAC/B,MAAI,SAA6B;AAEjC,SAAO,qBAAqB,CAAC,MAAM,SAAS;AACxC,UAAM,aAAa,QAAQ,QAAQ,YAAA;AAEnC,eAAW,IAAI,IAAI,YAAY,mBAAA,CAAoB;AACnD,UAAM,WAAW,UAAU,IAAI,SAAS,KAAK,CAAC,OAAO,IAAI,SAAS,IAAI,SAAS;AAC/E,WAAO,YAAY,WAAW,MAAM,cAAc,OAAO,QAAQ,CAAC;AAAA,EACtE,CAAC;AACL;"}
1
+ {"version":3,"file":"core.js","sources":["../src/core.ts"],"sourcesContent":["import { aparteGlobalConfig , type AparteConfig} from '@aparte/core';\n/**\n * The slice of a shiki highlighter this plugin actually uses — declared here rather\n * than borrowed from `HighlighterCore`, so this module needs no import from shiki at\n * all, not even a type. A real `HighlighterCore` satisfies it (asserted at compile\n * time in the tests), and so does a wrapper of your own.\n */\nexport interface ShikiHighlighterLike {\n /** The grammars this highlighter carries — read once, then cached. */\n getLoadedLanguages(): string[];\n /** Render `code` as highlighted HTML with a loaded grammar and one theme, or a light/dark pair. */\n codeToHtml(code: string, options: ShikiRenderOptions): string;\n}\n\n/**\n * A theme for each of the two colour schemes core switches between. A type literal\n * rather than an interface: shiki's `themes` option is a string-keyed record, and only\n * a literal type is implicitly assignable to one.\n */\nexport type ShikiThemePair = { light: string; dark: string };\n\n/** What either entry hands to `codeToHtml` — shiki's own option names, nothing invented. */\nexport type ShikiRenderOptions =\n | { lang: string; theme: string }\n | { lang: string; themes: ShikiThemePair; defaultColor: false };\n\nexport interface ShikiCoreProviderOptions {\n /**\n * Theme to render with — the name of a theme your highlighter was built with — or a\n * `{ light, dark }` pair of them, which follows core's `[data-aparte-theme=\"dark\"]`\n * switch. Default `'github-dark'`.\n */\n theme?: string | ShikiThemePair;\n}\n\n/** Languages that mean \"don't highlight\", plus the empty string. */\nexport const PLAINTEXT = new Set(['text', 'plaintext', 'txt', 'ansi', '']);\n\n/** One theme renders with `theme`; a pair renders both colours per token and no default. */\nexport function renderOptions(theme: string | ShikiThemePair, lang: string): ShikiRenderOptions {\n return typeof theme === 'string' ? { lang, theme } : { lang, themes: theme, defaultColor: false };\n}\n\nconst PAIR_STYLE_ID = 'aparte-shiki-theme-pair';\n\n/**\n * The stylesheet a theme pair needs, added to the document once.\n *\n * With `defaultColor: false` shiki writes both colours on every token as CSS variables\n * (`--shiki-light`, `--shiki-dark`, plus `-bg` on the block) and sets no colour of its\n * own, so someone has to read the right one. That someone is not core — core knows\n * nothing about shiki's variables — and not the consumer either, who asked for a pair\n * precisely so the block would follow the theme by itself. The switch is core's public\n * theme contract, `[data-aparte-theme=\"dark\"]`, documented in theme.css.\n */\nexport function ensureThemePairStyles(): void {\n if (typeof document === 'undefined' || document.getElementById(PAIR_STYLE_ID)) return;\n const style = document.createElement('style');\n style.id = PAIR_STYLE_ID;\n // Three states, the same three core's theme.css answers: an explicit `dark`, an\n // explicit `light`, and no attribute at all — where the OS decides. And the NEAREST\n // attribute decides, not the page's: a chat forced light inside a dark page gets light\n // code. Both through one inherited switch of aparté's own name, which every attributed\n // element sets for its subtree:\n //\n // on = a space → `var(on) var(--shiki-dark)` is the dark colour\n // off = `initial` (invalid) → the whole value is invalid, the fallback (light) applies\n //\n // Not `color-scheme`, which `light-dark()` would read: a host page sets that too —\n // Angular Material writes `html { color-scheme: light dark }`, over the attribute the\n // Angular wrapper puts on `<html>` — and the code would follow the host, not the chat.\n // A custom attribute value sets nothing, and follows what is above it, as core's palette\n // does.\n const on = '--aparte-shiki-dark-on';\n const fg = `var(${on}) var(--shiki-dark)`;\n const bg = `var(${on}) var(--shiki-dark-bg)`;\n style.textContent =\n `@media (prefers-color-scheme: dark){:root:not([data-aparte-theme]){${on}: ;}}`\n + `[data-aparte-theme=\"dark\"]{${on}: ;}`\n + `[data-aparte-theme=\"light\"]{${on}:initial;}`\n + `.shiki{--aparte-shiki-fg:${fg};--aparte-shiki-bg:${bg};color:var(--aparte-shiki-fg,var(--shiki-light));background-color:var(--aparte-shiki-bg,var(--shiki-light-bg))}`\n + `.shiki span{--aparte-shiki-fg:${fg};color:var(--aparte-shiki-fg,var(--shiki-light))}`;\n document.head.appendChild(style);\n}\n\n/**\n * Register a highlighter **you** built as aparté's highlight provider.\n *\n * Why this exists — measured, on a build whose only import was the plugin:\n *\n * | entry point | files emitted | weight |\n * | -------------------------------------------- | ------------- | ------ |\n * | `@aparte/plugin-shiki` (shiki's full bundle) | 302 | 11 MB |\n * | this one, with three grammars | 1 | 560 kB |\n *\n * The convenience entry imports `shiki`, whose bundle maps **every** known language\n * to a dynamic import, so a bundler emits one chunk per grammar —\n * `emacs-lisp` (780 kB), `wasm`, `wolfram` and 300 others — even for an app that\n * renders twenty. No runtime option can undo that: a static import is a static\n * import (verified — restricting `langs` still emits all 302). Controlling\n * distribution weight means not importing that bundle at all, which is what\n * importing THIS module instead achieves.\n *\n * ```ts\n * import { createHighlighterCore } from 'shiki/core';\n * import { createJavaScriptRegexEngine } from 'shiki/engine/javascript';\n * import ts from '@shikijs/langs/typescript';\n * import githubDark from '@shikijs/themes/github-dark';\n * import { setupShikiProviderFromHighlighter } from '@aparte/plugin-shiki/core';\n *\n * setupShikiProviderFromHighlighter(\n * await createHighlighterCore({\n * themes: [githubDark],\n * langs: [ts],\n * engine: createJavaScriptRegexEngine(),\n * }),\n * );\n * ```\n *\n * Your highlighter's grammars are fixed, so a language it does not carry renders as\n * plain text rather than throwing — same degradation as the convenience entry, minus\n * the on-demand load it cannot do.\n *\n * Framework-agnostic, and needs no `AparteClient`. Call once at startup.\n */\nexport function setupShikiProviderFromHighlighter(\n highlighter: ShikiHighlighterLike,\n options: ShikiCoreProviderOptions = {},\n config: AparteConfig = aparteGlobalConfig,\n): void {\n const theme = options.theme ?? 'github-dark';\n if (typeof theme !== 'string') ensureThemePairStyles();\n let loaded: Set<string> | null = null;\n\n config.setHighlightProvider((code, lang) => {\n const requested = (lang || 'text').toLowerCase();\n // Cached after the first call: the grammar set of a core highlighter is fixed.\n loaded ??= new Set(highlighter.getLoadedLanguages());\n const language = PLAINTEXT.has(requested) || !loaded.has(requested) ? 'text' : requested;\n return highlighter.codeToHtml(code, renderOptions(theme, language));\n });\n}\n"],"names":[],"mappings":";AAoCO,MAAM,gCAAgB,IAAI,CAAC,QAAQ,aAAa,OAAO,QAAQ,EAAE,CAAC;AAGlE,SAAS,cAAc,OAAgC,MAAkC;AAC5F,SAAO,OAAO,UAAU,WAAW,EAAE,MAAM,MAAA,IAAU,EAAE,MAAM,QAAQ,OAAO,cAAc,MAAA;AAC9F;AAEA,MAAM,gBAAgB;AAYf,SAAS,wBAA8B;AAC1C,MAAI,OAAO,aAAa,eAAe,SAAS,eAAe,aAAa,EAAG;AAC/E,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,KAAK;AAeX,QAAM,KAAK;AACX,QAAM,KAAK,OAAO,EAAE;AACpB,QAAM,KAAK,OAAO,EAAE;AACpB,QAAM,cACF,sEAAsE,EAAE,mCACxC,EAAE,mCACD,EAAE,sCACL,EAAE,sBAAsB,EAAE,gJACrB,EAAE;AACzC,WAAS,KAAK,YAAY,KAAK;AACnC;AA0CO,SAAS,kCACZ,aACA,UAAoC,CAAA,GACpC,SAAuB,oBACnB;AACJ,QAAM,QAAQ,QAAQ,SAAS;AAC/B,MAAI,OAAO,UAAU,SAAU,uBAAA;AAC/B,MAAI,SAA6B;AAEjC,SAAO,qBAAqB,CAAC,MAAM,SAAS;AACxC,UAAM,aAAa,QAAQ,QAAQ,YAAA;AAEnC,eAAW,IAAI,IAAI,YAAY,mBAAA,CAAoB;AACnD,UAAM,WAAW,UAAU,IAAI,SAAS,KAAK,CAAC,OAAO,IAAI,SAAS,IAAI,SAAS;AAC/E,WAAO,YAAY,WAAW,MAAM,cAAc,OAAO,QAAQ,CAAC;AAAA,EACtE,CAAC;AACL;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aparte/plugin-shiki",
3
- "version": "0.19.2",
3
+ "version": "0.20.0",
4
4
  "homepage": "https://apartejs.dev/plugins/shiki/",
5
5
  "description": "Syntax highlighting for aparté via shiki — register it as the highlight provider (single lazily-created highlighter).",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "node": ">=18"
32
32
  },
33
33
  "peerDependencies": {
34
- "@aparte/core": ">=0.19.2 <1.0.0",
34
+ "@aparte/core": ">=0.20.0 <1.0.0",
35
35
  "shiki": "^4.0.0"
36
36
  },
37
37
  "devDependencies": {
@@ -40,7 +40,7 @@
40
40
  "shiki": "^4.0.0",
41
41
  "typescript": "^5.4.0",
42
42
  "vite": "^6.0.0",
43
- "@aparte/core": "0.19.2"
43
+ "@aparte/core": "0.20.0"
44
44
  },
45
45
  "keywords": [
46
46
  "aparte",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "scripts": {
62
62
  "dev": "vite",
63
- "build": "vite build && tsc -b --emitDeclarationOnly --force",
63
+ "build": "vite build && tsc -b --emitDeclarationOnly --force && node ../../../scripts/stamp-dist.mjs",
64
64
  "preview": "vite preview",
65
65
  "test": "vitest",
66
66
  "test:run": "vitest run",