diff --git a/astro.config.ts b/astro.config.ts index 81a12b89e8317..59c63519cccd0 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -8,7 +8,6 @@ import { devServerFileWatcher } from './config/integrations/dev-server-file-watc import { sitemap } from './config/integrations/sitemap'; import { makeLocalesConfig } from './config/locales'; import { starlightPluginLlmsTxt } from './config/plugins/llms-txt'; -import { starlightPluginAutolinkHeadings } from './config/plugins/rehype-autolink'; import { rehypeTasklistEnhancer } from './config/plugins/rehype-tasklist-enhancer'; import { remarkFallbackLang } from './config/plugins/remark-fallback-lang'; @@ -33,13 +32,11 @@ export default defineConfig({ }, components: { EditLink: './src/components/starlight/EditLink.astro', - Head: './src/components/starlight/Head.astro', Hero: './src/components/starlight/Hero.astro', MarkdownContent: './src/components/starlight/MarkdownContent.astro', MobileTableOfContents: './src/components/starlight/MobileTableOfContents.astro', TableOfContents: './src/components/starlight/TableOfContents.astro', PageSidebar: './src/components/starlight/PageSidebar.astro', - Pagination: './src/components/starlight/Pagination.astro', Footer: './src/components/starlight/Footer.astro', SiteTitle: './src/components/starlight/SiteTitle.astro', Search: './src/components/starlight/Search.astro', @@ -47,16 +44,17 @@ export default defineConfig({ MobileMenuFooter: './src/components/starlight/MobileMenuFooter.astro', PageTitle: './src/components/starlight/PageTitle.astro', }, + routeMiddleware: './src/routeData.ts', editLink: { baseUrl: 'https://github.com/withastro/docs/edit/main', }, defaultLocale: 'en', locales: makeLocalesConfig(), sidebar, - social: { - github: 'https://github.com/withastro/astro', - discord: 'https://astro.build/chat', - }, + social: [ + { icon: 'github', label: 'GitHub', href: 'https://github.com/withastro/astro' }, + { icon: 'discord', label: 'Discord', href: 'https://astro.build/chat' }, + ], pagefind: false, head: [ // Add ICO favicon fallback for Safari. @@ -70,7 +68,7 @@ export default defineConfig({ }, ], disable404Route: true, - plugins: [starlightPluginAutolinkHeadings(), starlightPluginLlmsTxt()], + plugins: [starlightPluginLlmsTxt()], }), sitemap(), ], diff --git a/config/plugins/rehype-autolink.ts b/config/plugins/rehype-autolink.ts deleted file mode 100644 index 6a0f6fc06fff2..0000000000000 --- a/config/plugins/rehype-autolink.ts +++ /dev/null @@ -1,121 +0,0 @@ -import type { StarlightPlugin } from '@astrojs/starlight/types'; -import type { AstroIntegration } from 'astro'; -import type { Root } from 'hast'; -import { toString } from 'hast-util-to-string'; -import { h } from 'hastscript'; -import { escape } from 'html-escaper'; -import { resolve as nodeResolve } from 'node:path'; -import rehypeAutolinkHeadings, { type Options as AutolinkOptions } from 'rehype-autolink-headings'; -import type { Transformer } from 'unified'; -import { visit } from 'unist-util-visit'; -import { createTranslationSystemFromFs } from '../../node_modules/@astrojs/starlight/utils/translations-fs'; -import { getLanguageCodeFromPathname, mdFilePathToUrl } from './remark-fallback-lang'; - -const AnchorLinkIcon = h( - 'span', - { ariaHidden: 'true', class: 'anchor-icon' }, - h( - 'svg', - { width: 16, height: 16, viewBox: '0 0 24 24' }, - h('path', { - fill: 'currentcolor', - d: 'm12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z', - }) - ) -); - -/** - * Configuration for the `rehype-autolink-headings` plugin. - * This set-up was informed by https://amberwilson.co.uk/blog/are-your-anchor-links-accessible/ - */ -const makeAutolinkConfig = ( - useTranslationsForLang: ReturnType -): AutolinkOptions => { - const t = useTranslationsForLang('en'); - return { - properties: { class: 'anchor-link' }, - behavior: 'after', - group: ({ tagName }) => h('div', { tabIndex: -1, class: `heading-wrapper level-${tagName}` }), - content: (heading) => [ - AnchorLinkIcon, - h( - 'span', - { 'is:raw': true, class: 'sr-only' }, - `${t('a11y.sectionLink')} ${escape(toString(heading))}` - ), - ], - }; -}; - -/** - * Rehype plugin to translate the headings' anchors according to the currently selected language. - */ -function rehypei18nAutolinkHeadings( - useTranslationsForLang: ReturnType -) { - const pageSourceDir = nodeResolve('./src/content/docs'); - const baseUrl = 'https://docs.astro.build/'; - - const transformer: Transformer = (tree, file) => { - const pageUrl = mdFilePathToUrl(file.path, pageSourceDir, baseUrl); - const pageLang = getLanguageCodeFromPathname(pageUrl.pathname); - const englishText = useTranslationsForLang('en')('a11y.sectionLink'); - - // Find anchor links - visit(tree, 'element', (node) => { - if (node.tagName === 'a' && node.properties?.class === 'anchor-link') { - // Find a11y text labels - visit(node, 'text', (text) => { - const heading = text.value.replace(englishText!, ''); - const t = useTranslationsForLang(pageLang); - const title = t('a11y.sectionLink') || englishText; - - text.value = title + heading; - }); - } - }); - }; - - return function attacher() { - return transformer; - }; -} - -type TranslationSystemLocales = Parameters[0]['locales']; - -export const starlightPluginAutolinkHeadings = () => - ({ - name: 'starlight-plugin-autolink-headings' as const, - hooks: { - setup({ config, astroConfig, addIntegration }) { - // TODO: Replace this hack with Starlight’s own translation system once it’s exposed here. - const useTranslationsForLang = createTranslationSystemFromFs( - { - defaultLocale: { lang: 'en', locale: 'en', dir: 'ltr', label: 'English' }, - // In theory user-configured locales might not include `dir` properties (or be undefined). - // But we provide `locales` and always set `dir` currently. - locales: config.locales as TranslationSystemLocales, - }, - astroConfig, - {} - ); - /** Integration to add the required rehype plugins. */ - const astroIntegrationAutolinkHeadings: AstroIntegration = { - name: 'astro-integration-autolink-headings', - hooks: { - 'astro:config:setup'({ updateConfig }) { - updateConfig({ - markdown: { - rehypePlugins: [ - [rehypeAutolinkHeadings, makeAutolinkConfig(useTranslationsForLang)], - rehypei18nAutolinkHeadings(useTranslationsForLang), - ], - }, - }); - }, - }, - }; - addIntegration(astroIntegrationAutolinkHeadings); - }, - }, - }) satisfies StarlightPlugin; diff --git a/config/plugins/remark-fallback-lang.ts b/config/plugins/remark-fallback-lang.ts index 9ba175e758ce5..21b1de2c18393 100644 --- a/config/plugins/remark-fallback-lang.ts +++ b/config/plugins/remark-fallback-lang.ts @@ -41,14 +41,14 @@ export function remarkFallbackLang(): Plugin<[], Root> { }; } -export function mdFilePathToUrl(mdFilePath: string, pageSourceDir: string, baseUrl: string) { +function mdFilePathToUrl(mdFilePath: string, pageSourceDir: string, baseUrl: string) { const pathBelowRoot = path.relative(pageSourceDir, mdFilePath); const pathname = pathBelowRoot.replace(/\\/g, '/').replace(/\.mdx?$/i, '/'); return new URL(pathname, baseUrl); } -export function getLanguageCodeFromPathname(pathname: string) { +function getLanguageCodeFromPathname(pathname: string) { // Assuming that `pathname` always starts with a `/`, retrieve the first path part, // which is usually the language code const firstPathPart = pathname.split('/')[1]; @@ -70,7 +70,7 @@ export function getLanguageCodeFromPathname(pathname: string) { * * If no existing file is found, returns `undefined`. */ -export function tryFindSourceFileForPathname(pathname: string, pageSourceDir: string) { +function tryFindSourceFileForPathname(pathname: string, pageSourceDir: string) { const possibleSourceFilePaths = [ path.join(pageSourceDir, pathname, '.') + '.md', path.join(pageSourceDir, pathname, 'index.md'), diff --git a/package.json b/package.json index 5d02dfeccec3e..e08caa778c35b 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "@eslint/js": "^9.17.0", "@types/canvas-confetti": "^1.6.0", "@types/hast": "^3.0.4", - "@types/html-escaper": "^3.0.2", "@types/mdast": "^4.0.4", "@types/node": "^20.17.10", "@typescript-eslint/parser": "^8.19.1", @@ -45,9 +44,7 @@ "fast-glob": "^3.3.3", "globals": "^15.14.0", "hast-util-select": "^6.0.3", - "hast-util-to-string": "^3.0.1", "hastscript": "^9.0.0", - "html-escaper": "^3.0.3", "htmlparser2": "^9.1.0", "kleur": "^4.1.5", "mdast-util-to-string": "^4.0.0", @@ -64,12 +61,11 @@ "dependencies": { "@astrojs/check": "^0.9.4", "@astrojs/sitemap": "^3.3.0", - "@astrojs/starlight": "^0.31.1", - "@expressive-code/plugin-collapsible-sections": "^0.40.2", + "@astrojs/starlight": "^0.34.4", + "@expressive-code/plugin-collapsible-sections": "^0.41.2", "@lunariajs/core": "https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@4c8b9b0", "canvas-confetti": "^1.6.0", "jsdoc-api": "^9.3.4", - "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", "remark-gfm": "^4.0.1", "remark-smartypants": "^2.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fec528f5ae1c0..837ce197f0c9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,11 +15,11 @@ importers: specifier: ^3.3.0 version: 3.3.0 '@astrojs/starlight': - specifier: ^0.31.1 - version: 0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) + specifier: ^0.34.4 + version: 0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) '@expressive-code/plugin-collapsible-sections': - specifier: ^0.40.2 - version: 0.40.2 + specifier: ^0.41.2 + version: 0.41.2 '@lunariajs/core': specifier: https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@4c8b9b0 version: https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@4c8b9b0 @@ -29,9 +29,6 @@ importers: jsdoc-api: specifier: ^9.3.4 version: 9.3.4 - rehype-autolink-headings: - specifier: ^7.1.0 - version: 7.1.0 rehype-slug: specifier: ^6.0.0 version: 6.0.0 @@ -46,7 +43,7 @@ importers: version: 0.33.5 starlight-llms-txt: specifier: ^0.5.1 - version: 0.5.1(@astrojs/starlight@0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) + version: 0.5.1(@astrojs/starlight@0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) devDependencies: '@11ty/eleventy-fetch': specifier: ^5.0.1 @@ -69,9 +66,6 @@ importers: '@types/hast': specifier: ^3.0.4 version: 3.0.4 - '@types/html-escaper': - specifier: ^3.0.2 - version: 3.0.2 '@types/mdast': specifier: ^4.0.4 version: 4.0.4 @@ -117,15 +111,9 @@ importers: hast-util-select: specifier: ^6.0.3 version: 6.0.3 - hast-util-to-string: - specifier: ^3.0.1 - version: 3.0.1 hastscript: specifier: ^9.0.0 version: 9.0.0 - html-escaper: - specifier: ^3.0.3 - version: 3.0.3 htmlparser2: specifier: ^9.1.0 version: 9.1.0 @@ -296,23 +284,36 @@ packages: '@astrojs/markdown-remark@6.3.1': resolution: {integrity: sha512-c5F5gGrkczUaTVgmMW9g1YMJGzOtRvjjhw6IfGuxarM6ct09MpwysP10US729dy07gg8y+ofVifezvP3BNsWZg==} + '@astrojs/markdown-remark@6.3.2': + resolution: {integrity: sha512-bO35JbWpVvyKRl7cmSJD822e8YA8ThR/YbUsciWNA7yTcqpIAL2hJDToWP5KcZBWxGT6IOdOkHSXARSNZc4l/Q==} + '@astrojs/mdx@4.0.8': resolution: {integrity: sha512-/aiLr2yQ55W9AbpyOgfMtFXk7g2t7XoWdC2Avps/NqxAx4aYONDLneX43D79QwgqdjFhin7o3cIPp/vVppMbaA==} engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0} peerDependencies: astro: ^5.0.0 + '@astrojs/mdx@4.3.0': + resolution: {integrity: sha512-OGX2KvPeBzjSSKhkCqrUoDMyzFcjKt5nTE5SFw3RdoLf0nrhyCXBQcCyclzWy1+P+XpOamn+p+hm1EhpCRyPxw==} + engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0} + peerDependencies: + astro: ^5.0.0 + '@astrojs/prism@3.2.0': resolution: {integrity: sha512-GilTHKGCW6HMq7y3BUv9Ac7GMe/MO9gi9GW62GzKtth0SwukCu/qp2wLiGpEujhY+VVhaG9v7kv/5vFzvf4NYw==} engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0} + '@astrojs/prism@3.3.0': + resolution: {integrity: sha512-q8VwfU/fDZNoDOf+r7jUnMC2//H2l0TuQ6FkGJL8vD8nw/q5KiL3DS1KKBI3QhI9UQhpJ5dc7AtqfbXWuOgLCQ==} + engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0} + '@astrojs/sitemap@3.3.0': resolution: {integrity: sha512-nYE4lKQtk+Kbrw/w0G0TTgT724co0jUsU4tPlHY9au5HmTBKbwiCLwO/15b1/y13aZ4Kr9ZbMeMHlXuwn0ty4Q==} - '@astrojs/starlight@0.31.1': - resolution: {integrity: sha512-VIVkHugwgtEqJPiRH8+ouP0UqUfdmpBO9C64R+6QaQ2qmADNkI/BA3/YAJHTBZYlMQQGEEuLJwD9qpaUovi52Q==} + '@astrojs/starlight@0.34.4': + resolution: {integrity: sha512-NfQ6S2OaDG8aaiE+evVxSMpgqMkXPLa/yCpzG340EX2pRzFxPeTSvpei3Uz9KouevXRCctjHSItKjuZP+2syrQ==} peerDependencies: - astro: ^5.1.5 + astro: ^5.5.0 '@astrojs/telemetry@3.2.0': resolution: {integrity: sha512-wxhSKRfKugLwLlr4OFfcqovk+LIFtKwLyGPqMsv+9/ibqqnW3Gv7tBhtKEb0gAyUAC4G9BTVQeQahqnQAhd6IQ==} @@ -586,20 +587,20 @@ packages: resolution: {integrity: sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@expressive-code/core@0.40.2': - resolution: {integrity: sha512-gXY3v7jbgz6nWKvRpoDxK4AHUPkZRuJsM79vHX/5uhV9/qX6Qnctp/U/dMHog/LCVXcuOps+5nRmf1uxQVPb3w==} + '@expressive-code/core@0.41.2': + resolution: {integrity: sha512-AJW5Tp9czbLqKMzwudL9Rv4js9afXBxkSGLmCNPq1iRgAYcx9NkTPJiSNCesjKRWoVC328AdSu6fqrD22zDgDg==} - '@expressive-code/plugin-collapsible-sections@0.40.2': - resolution: {integrity: sha512-EtfuluXKk3CdFMAeCJoDsUJo/s+Yh9b+kX0hNHeFlZ/W2/H8FmdZ9Pu+Qel41vw4yP6AyiQpsamquO7bzlakug==} + '@expressive-code/plugin-collapsible-sections@0.41.2': + resolution: {integrity: sha512-gyg864xlkLFYLDlOoO5wyZVmuFOc2vi6b/tJjEfXDj/xc8//ttuRLZ0EjuLIkch1hEhEQc9XF6agmiNYUCzeww==} - '@expressive-code/plugin-frames@0.40.2': - resolution: {integrity: sha512-aLw5IlDlZWb10Jo/TTDCVsmJhKfZ7FJI83Zo9VDrV0OBlmHAg7klZqw68VDz7FlftIBVAmMby53/MNXPnMjTSQ==} + '@expressive-code/plugin-frames@0.41.2': + resolution: {integrity: sha512-pfy0hkJI4nbaONjmksFDcuHmIuyPTFmi1JpABe4q2ajskiJtfBf+WDAL2pg595R9JNoPrrH5+aT9lbkx2noicw==} - '@expressive-code/plugin-shiki@0.40.2': - resolution: {integrity: sha512-t2HMR5BO6GdDW1c1ISBTk66xO503e/Z8ecZdNcr6E4NpUfvY+MRje+LtrcvbBqMwWBBO8RpVKcam/Uy+1GxwKQ==} + '@expressive-code/plugin-shiki@0.41.2': + resolution: {integrity: sha512-xD4zwqAkDccXqye+235BH5bN038jYiSMLfUrCOmMlzxPDGWdxJDk5z4uUB/aLfivEF2tXyO2zyaarL3Oqht0fQ==} - '@expressive-code/plugin-text-markers@0.40.2': - resolution: {integrity: sha512-/XoLjD67K9nfM4TgDlXAExzMJp6ewFKxNpfUw4F7q5Ecy+IU3/9zQQG/O70Zy+RxYTwKGw2MA9kd7yelsxnSmw==} + '@expressive-code/plugin-text-markers@0.41.2': + resolution: {integrity: sha512-JFWBz2qYxxJOJkkWf96LpeolbnOqJY95TvwYc0hXIHf9oSWV0h0SY268w/5N3EtQaD9KktzDE+VIVwb9jdb3nw==} '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} @@ -911,36 +912,54 @@ packages: '@shikijs/core@3.2.1': resolution: {integrity: sha512-FhsdxMWYu/C11sFisEp7FMGBtX/OSSbnXZDMBhGuUDBNTdsoZlMSgQv5f90rwvzWAdWIW6VobD+G3IrazxA6dQ==} + '@shikijs/core@3.6.0': + resolution: {integrity: sha512-9By7Xb3olEX0o6UeJyPLI1PE1scC4d3wcVepvtv2xbuN9/IThYN4Wcwh24rcFeASzPam11MCq8yQpwwzCgSBRw==} + '@shikijs/engine-javascript@1.29.2': resolution: {integrity: sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==} '@shikijs/engine-javascript@3.2.1': resolution: {integrity: sha512-eMdcUzN3FMQYxOmRf2rmU8frikzoSHbQDFH2hIuXsrMO+IBOCI9BeeRkCiBkcLDHeRKbOCtYMJK3D6U32ooU9Q==} + '@shikijs/engine-javascript@3.6.0': + resolution: {integrity: sha512-7YnLhZG/TU05IHMG14QaLvTW/9WiK8SEYafceccHUSXs2Qr5vJibUwsDfXDLmRi0zHdzsxrGKpSX6hnqe0k8nA==} + '@shikijs/engine-oniguruma@1.29.2': resolution: {integrity: sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==} '@shikijs/engine-oniguruma@3.2.1': resolution: {integrity: sha512-wZZAkayEn6qu2+YjenEoFqj0OyQI64EWsNR6/71d1EkG4sxEOFooowKivsWPpaWNBu3sxAG+zPz5kzBL/SsreQ==} + '@shikijs/engine-oniguruma@3.6.0': + resolution: {integrity: sha512-nmOhIZ9yT3Grd+2plmW/d8+vZ2pcQmo/UnVwXMUXAKTXdi+LK0S08Ancrz5tQQPkxvjBalpMW2aKvwXfelauvA==} + '@shikijs/langs@1.29.2': resolution: {integrity: sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==} '@shikijs/langs@3.2.1': resolution: {integrity: sha512-If0iDHYRSGbihiA8+7uRsgb1er1Yj11pwpX1c6HLYnizDsKAw5iaT3JXj5ZpaimXSWky/IhxTm7C6nkiYVym+A==} + '@shikijs/langs@3.6.0': + resolution: {integrity: sha512-IdZkQJaLBu1LCYCwkr30hNuSDfllOT8RWYVZK1tD2J03DkiagYKRxj/pDSl8Didml3xxuyzUjgtioInwEQM/TA==} + '@shikijs/themes@1.29.2': resolution: {integrity: sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==} '@shikijs/themes@3.2.1': resolution: {integrity: sha512-k5DKJUT8IldBvAm8WcrDT5+7GA7se6lLksR+2E3SvyqGTyFMzU2F9Gb7rmD+t+Pga1MKrYFxDIeyWjMZWM6uBQ==} + '@shikijs/themes@3.6.0': + resolution: {integrity: sha512-Fq2j4nWr1DF4drvmhqKq8x5vVQ27VncF8XZMBuHuQMZvUSS3NBgpqfwz/FoGe36+W6PvniZ1yDlg2d4kmYDU6w==} + '@shikijs/types@1.29.2': resolution: {integrity: sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==} '@shikijs/types@3.2.1': resolution: {integrity: sha512-/NTWAk4KE2M8uac0RhOsIhYQf4pdU0OywQuYDGIGAJ6Mjunxl2cGiuLkvu4HLCMn+OTTLRWkjZITp+aYJv60yA==} + '@shikijs/types@3.6.0': + resolution: {integrity: sha512-cLWFiToxYu0aAzJqhXTQsFiJRTFDAGl93IrMSBNaGSzs7ixkLfdG6pH11HipuWFGW5vyx4X47W8HDQ7eSrmBUg==} + '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} @@ -968,9 +987,6 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/html-escaper@3.0.2': - resolution: {integrity: sha512-A8vk09eyYzk8J/lFO4OUMKCmRN0rRzfZf4n3Olwapgox/PtTiU8zPYlL1UEkJ/WeHvV6v9Xnj3o/705PKz9r4Q==} - '@types/js-yaml@4.0.9': resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} @@ -1177,8 +1193,8 @@ packages: resolution: {integrity: sha512-JepyLROIad6f44uyqMF6HKE2QbunNzp3mYKRcPoDGt0QkxXmH222FAFC64WTyQu2Kg8NNEXHTN/sWuUId9sSxw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - astro-expressive-code@0.40.2: - resolution: {integrity: sha512-yJMQId0yXSAbW9I6yqvJ3FcjKzJ8zRL7elbJbllkv1ZJPlsI0NI83Pxn1YL1IapEM347EvOOkSW2GL+2+NO61w==} + astro-expressive-code@0.41.2: + resolution: {integrity: sha512-HN0jWTnhr7mIV/2e6uu4PPRNNo/k4UEgTLZqbp3MrHU+caCARveG2yZxaZVBmxyiVdYqW5Pd3u3n2zjnshixbw==} peerDependencies: astro: ^4.0.0-beta || ^5.0.0-beta || ^3.3.0 @@ -1710,8 +1726,8 @@ packages: eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - expressive-code@0.40.2: - resolution: {integrity: sha512-1zIda2rB0qiDZACawzw2rbdBQiWHBT56uBctS+ezFe5XMAaFaHLnnSYND/Kd+dVzO9HfCXRDpzH3d+3fvOWRcw==} + expressive-code@0.41.2: + resolution: {integrity: sha512-aLZiZaqorRtNExtGpUjK9zFH9aTpWeoTXMyLo4b4IcuXfPqtLPPxhRm/QlPb8QqIcMMXnSiGRHSFpQfX0m7HJw==} extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} @@ -2061,6 +2077,10 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + klona@2.0.6: + resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} + engines: {node: '>= 8'} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -2345,6 +2365,9 @@ packages: ofetch@1.4.1: resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} + oniguruma-parser@0.12.1: + resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==} + oniguruma-parser@0.5.4: resolution: {integrity: sha512-yNxcQ8sKvURiTwP0mV6bLQCYE7NKfKRRWunhbZnXgxSmB1OXa1lHrN3o4DZd+0Si0kU5blidK7BcROO8qv5TZA==} @@ -2354,6 +2377,9 @@ packages: oniguruma-to-es@4.1.0: resolution: {integrity: sha512-SNwG909cSLo4vPyyPbU/VJkEc9WOXqu2ycBlfd1UCXLqk1IijcQktSBb2yRQ2UFPsDhpkaf+C1dtT3PkLK/yWA==} + oniguruma-to-es@4.3.3: + resolution: {integrity: sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -2485,6 +2511,10 @@ packages: resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} engines: {node: '>=6'} + prismjs@1.30.0: + resolution: {integrity: sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==} + engines: {node: '>=6'} + prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -2547,11 +2577,8 @@ packages: regex@6.0.1: resolution: {integrity: sha512-uorlqlzAKjKQZ5P+kTJr3eeJGSVroLKoHmquUj4zHWuR+hEyNqlXsSKlYYF5F4NI6nl7tWCs0apKJ0lmfsXAPA==} - rehype-autolink-headings@7.1.0: - resolution: {integrity: sha512-rItO/pSdvnvsP4QRB1pmPiNHUskikqtPojZKJPPPAVx9Hj8i8TwMBhofrrAYRhYOOBZH9tgmG5lPqDLuIWPWmw==} - - rehype-expressive-code@0.40.2: - resolution: {integrity: sha512-+kn+AMGCrGzvtH8Q5lC6Y5lnmTV/r33fdmi5QU/IH1KPHKobKr5UnLwJuqHv5jBTSN/0v2wLDS7RTM73FVzqmQ==} + rehype-expressive-code@0.41.2: + resolution: {integrity: sha512-vHYfWO9WxAw6kHHctddOt+P4266BtyT1mrOIuxJD+1ELuvuJAa5uBIhYt0OVMyOhlvf57hzWOXJkHnMhpaHyxw==} rehype-format@5.0.0: resolution: {integrity: sha512-kM4II8krCHmUhxrlvzFSptvaWh280Fr7UGNJU5DCMuvmAwGCNmGfi9CvFAQK6JDjsNoRMWQStglK3zKJH685Wg==} @@ -2595,6 +2622,9 @@ packages: remark-rehype@11.1.1: resolution: {integrity: sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ==} + remark-rehype@11.1.2: + resolution: {integrity: sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==} + remark-smartypants@2.1.0: resolution: {integrity: sha512-qoF6Vz3BjU2tP6OfZqHOvCU0ACmu/6jhGaINSQRI9mM7wCxNQTKB3JUAN4SVoN2ybElEDTxBIABRep7e569iJw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2707,6 +2737,9 @@ packages: shiki@3.2.1: resolution: {integrity: sha512-VML/2o1/KGYkEf/stJJ+s9Ypn7jUKQPomGLGYso4JJFMFxVDyPNsjsI3MB3KLjlMOeH44gyaPdXC6rik2WXvUQ==} + shiki@3.6.0: + resolution: {integrity: sha512-tKn/Y0MGBTffQoklaATXmTqDU02zx8NYBGQ+F6gy87/YjKbizcLd+Cybh/0ZtOBX9r1NEnAy/GTRDKtOsc1L9w==} + simple-git@3.27.0: resolution: {integrity: sha512-ivHoFS9Yi9GY49ogc6/YAi3Fl9ROnF4VyubNylgCkA+RVqLaKWnDSzXOVzya8csELIaWaYNutsEuAhZrtOjozA==} @@ -2869,6 +2902,9 @@ packages: ultrahtml@1.5.3: resolution: {integrity: sha512-GykOvZwgDWZlTQMtp5jrD4BVL+gNn2NVlVafjcFUJ7taY20tqYdwdoWBFy6GBJsNTZe1GkGPkSl5knQAjtgceg==} + ultrahtml@1.6.0: + resolution: {integrity: sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw==} + ultramatter@0.0.4: resolution: {integrity: sha512-1f/hO3mR+/Hgue4eInOF/Qm/wzDqwhYha4DxM0hre9YIUyso3fE2XtrAU6B4njLqTC8CM49EZaYgsVSa+dXHGw==} @@ -3518,6 +3554,32 @@ snapshots: transitivePeerDependencies: - supports-color + '@astrojs/markdown-remark@6.3.2': + dependencies: + '@astrojs/internal-helpers': 0.6.1 + '@astrojs/prism': 3.3.0 + github-slugger: 2.0.0 + hast-util-from-html: 2.0.3 + hast-util-to-text: 4.0.2 + import-meta-resolve: 4.1.0 + js-yaml: 4.1.0 + mdast-util-definitions: 6.0.0 + rehype-raw: 7.0.0 + rehype-stringify: 10.0.1 + remark-gfm: 4.0.1 + remark-parse: 11.0.0 + remark-rehype: 11.1.2 + remark-smartypants: 3.0.2 + shiki: 3.6.0 + smol-toml: 1.3.1 + unified: 11.0.5 + unist-util-remove-position: 5.0.0 + unist-util-visit: 5.0.0 + unist-util-visit-parents: 6.0.1 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + '@astrojs/mdx@4.0.8(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))': dependencies: '@astrojs/markdown-remark': 6.1.0 @@ -3537,26 +3599,50 @@ snapshots: transitivePeerDependencies: - supports-color + '@astrojs/mdx@4.3.0(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))': + dependencies: + '@astrojs/markdown-remark': 6.3.2 + '@mdx-js/mdx': 3.1.0(acorn@8.14.1) + acorn: 8.14.1 + astro: 5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1) + es-module-lexer: 1.6.0 + estree-util-visit: 2.0.0 + hast-util-to-html: 9.0.5 + kleur: 4.1.5 + rehype-raw: 7.0.0 + remark-gfm: 4.0.1 + remark-smartypants: 3.0.2 + source-map: 0.7.4 + unist-util-visit: 5.0.0 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + '@astrojs/prism@3.2.0': dependencies: prismjs: 1.29.0 + '@astrojs/prism@3.3.0': + dependencies: + prismjs: 1.30.0 + '@astrojs/sitemap@3.3.0': dependencies: sitemap: 8.0.0 stream-replace-string: 2.0.0 zod: 3.24.2 - '@astrojs/starlight@0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))': + '@astrojs/starlight@0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))': dependencies: - '@astrojs/mdx': 4.0.8(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) + '@astrojs/markdown-remark': 6.3.2 + '@astrojs/mdx': 4.3.0(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) '@astrojs/sitemap': 3.3.0 '@pagefind/default-ui': 1.3.0 '@types/hast': 3.0.4 '@types/js-yaml': 4.0.9 '@types/mdast': 4.0.4 astro: 5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1) - astro-expressive-code: 0.40.2(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) + astro-expressive-code: 0.41.2(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) bcp-47: 2.1.0 hast-util-from-html: 2.0.3 hast-util-select: 6.0.3 @@ -3564,6 +3650,7 @@ snapshots: hastscript: 9.0.0 i18next: 23.16.4 js-yaml: 4.1.0 + klona: 2.0.6 mdast-util-directive: 3.0.0 mdast-util-to-markdown: 2.1.0 mdast-util-to-string: 4.0.0 @@ -3571,6 +3658,7 @@ snapshots: rehype: 13.0.2 rehype-format: 5.0.0 remark-directive: 3.0.0 + ultrahtml: 1.6.0 unified: 11.0.5 unist-util-visit: 5.0.0 vfile: 6.0.3 @@ -3785,7 +3873,7 @@ snapshots: dependencies: levn: 0.4.1 - '@expressive-code/core@0.40.2': + '@expressive-code/core@0.41.2': dependencies: '@ctrl/tinycolor': 4.1.0 hast-util-select: 6.0.3 @@ -3797,22 +3885,22 @@ snapshots: unist-util-visit: 5.0.0 unist-util-visit-parents: 6.0.1 - '@expressive-code/plugin-collapsible-sections@0.40.2': + '@expressive-code/plugin-collapsible-sections@0.41.2': dependencies: - '@expressive-code/core': 0.40.2 + '@expressive-code/core': 0.41.2 - '@expressive-code/plugin-frames@0.40.2': + '@expressive-code/plugin-frames@0.41.2': dependencies: - '@expressive-code/core': 0.40.2 + '@expressive-code/core': 0.41.2 - '@expressive-code/plugin-shiki@0.40.2': + '@expressive-code/plugin-shiki@0.41.2': dependencies: - '@expressive-code/core': 0.40.2 - shiki: 1.29.2 + '@expressive-code/core': 0.41.2 + shiki: 3.6.0 - '@expressive-code/plugin-text-markers@0.40.2': + '@expressive-code/plugin-text-markers@0.41.2': dependencies: - '@expressive-code/core': 0.40.2 + '@expressive-code/core': 0.41.2 '@humanfs/core@0.19.1': {} @@ -4081,6 +4169,13 @@ snapshots: '@types/hast': 3.0.4 hast-util-to-html: 9.0.5 + '@shikijs/core@3.6.0': + dependencies: + '@shikijs/types': 3.6.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + '@shikijs/engine-javascript@1.29.2': dependencies: '@shikijs/types': 1.29.2 @@ -4093,6 +4188,12 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 oniguruma-to-es: 4.1.0 + '@shikijs/engine-javascript@3.6.0': + dependencies: + '@shikijs/types': 3.6.0 + '@shikijs/vscode-textmate': 10.0.2 + oniguruma-to-es: 4.3.3 + '@shikijs/engine-oniguruma@1.29.2': dependencies: '@shikijs/types': 1.29.2 @@ -4103,6 +4204,11 @@ snapshots: '@shikijs/types': 3.2.1 '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/engine-oniguruma@3.6.0': + dependencies: + '@shikijs/types': 3.6.0 + '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/langs@1.29.2': dependencies: '@shikijs/types': 1.29.2 @@ -4111,6 +4217,10 @@ snapshots: dependencies: '@shikijs/types': 3.2.1 + '@shikijs/langs@3.6.0': + dependencies: + '@shikijs/types': 3.6.0 + '@shikijs/themes@1.29.2': dependencies: '@shikijs/types': 1.29.2 @@ -4119,6 +4229,10 @@ snapshots: dependencies: '@shikijs/types': 3.2.1 + '@shikijs/themes@3.6.0': + dependencies: + '@shikijs/types': 3.6.0 + '@shikijs/types@1.29.2': dependencies: '@shikijs/vscode-textmate': 10.0.2 @@ -4129,6 +4243,11 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 + '@shikijs/types@3.6.0': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + '@shikijs/vscode-textmate@10.0.2': {} '@types/acorn@4.0.6': @@ -4155,8 +4274,6 @@ snapshots: dependencies: '@types/unist': 3.0.2 - '@types/html-escaper@3.0.2': {} - '@types/js-yaml@4.0.9': {} '@types/json-schema@7.0.15': {} @@ -4431,10 +4548,10 @@ snapshots: transitivePeerDependencies: - supports-color - astro-expressive-code@0.40.2(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)): + astro-expressive-code@0.41.2(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)): dependencies: astro: 5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1) - rehype-expressive-code: 0.40.2 + rehype-expressive-code: 0.41.2 astro-og-canvas@0.7.0(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)): dependencies: @@ -5047,12 +5164,12 @@ snapshots: eventemitter3@5.0.1: {} - expressive-code@0.40.2: + expressive-code@0.41.2: dependencies: - '@expressive-code/core': 0.40.2 - '@expressive-code/plugin-frames': 0.40.2 - '@expressive-code/plugin-shiki': 0.40.2 - '@expressive-code/plugin-text-markers': 0.40.2 + '@expressive-code/core': 0.41.2 + '@expressive-code/plugin-frames': 0.41.2 + '@expressive-code/plugin-shiki': 0.41.2 + '@expressive-code/plugin-text-markers': 0.41.2 extend@3.0.2: {} @@ -5507,6 +5624,8 @@ snapshots: kleur@4.1.5: {} + klona@2.0.6: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -6070,6 +6189,8 @@ snapshots: node-fetch-native: 1.6.6 ufo: 1.5.4 + oniguruma-parser@0.12.1: {} + oniguruma-parser@0.5.4: {} oniguruma-to-es@2.3.0: @@ -6085,6 +6206,12 @@ snapshots: regex: 6.0.1 regex-recursion: 6.0.2 + oniguruma-to-es@4.3.3: + dependencies: + oniguruma-parser: 0.12.1 + regex: 6.0.1 + regex-recursion: 6.0.2 + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -6226,6 +6353,8 @@ snapshots: prismjs@1.29.0: {} + prismjs@1.30.0: {} + prompts@2.4.2: dependencies: kleur: 3.0.3 @@ -6301,18 +6430,9 @@ snapshots: dependencies: regex-utilities: 2.3.0 - rehype-autolink-headings@7.1.0: - dependencies: - '@types/hast': 3.0.4 - '@ungap/structured-clone': 1.2.0 - hast-util-heading-rank: 3.0.0 - hast-util-is-element: 3.0.0 - unified: 11.0.5 - unist-util-visit: 5.0.0 - - rehype-expressive-code@0.40.2: + rehype-expressive-code@0.41.2: dependencies: - expressive-code: 0.40.2 + expressive-code: 0.41.2 rehype-format@5.0.0: dependencies: @@ -6426,6 +6546,14 @@ snapshots: unified: 11.0.5 vfile: 6.0.3 + remark-rehype@11.1.2: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + mdast-util-to-hast: 13.0.2 + unified: 11.0.5 + vfile: 6.0.3 + remark-smartypants@2.1.0: dependencies: retext: 8.1.0 @@ -6617,6 +6745,17 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 + shiki@3.6.0: + dependencies: + '@shikijs/core': 3.6.0 + '@shikijs/engine-javascript': 3.6.0 + '@shikijs/engine-oniguruma': 3.6.0 + '@shikijs/langs': 3.6.0 + '@shikijs/themes': 3.6.0 + '@shikijs/types': 3.6.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + simple-git@3.27.0: dependencies: '@kwsites/file-exists': 1.1.1 @@ -6646,10 +6785,10 @@ snapshots: space-separated-tokens@2.0.2: {} - starlight-llms-txt@0.5.1(@astrojs/starlight@0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)): + starlight-llms-txt@0.5.1(@astrojs/starlight@0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)): dependencies: '@astrojs/mdx': 4.0.8(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) - '@astrojs/starlight': 0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) + '@astrojs/starlight': 0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)) '@types/hast': 3.0.4 '@types/micromatch': 4.0.9 astro: 5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1) @@ -6778,6 +6917,8 @@ snapshots: ultrahtml@1.5.3: {} + ultrahtml@1.6.0: {} + ultramatter@0.0.4: {} uncrypto@0.1.3: {} diff --git a/src/components/Landing/Discord.astro b/src/components/Landing/Discord.astro index 43a122129f07f..9238e4e5129f1 100644 --- a/src/components/Landing/Discord.astro +++ b/src/components/Landing/Discord.astro @@ -16,7 +16,7 @@ const { title, cta } = Astro.props; diff --git a/src/components/starlight/Footer.astro b/src/components/starlight/Footer.astro index 330b75f3ad5f0..8a978a0353e80 100644 --- a/src/components/starlight/Footer.astro +++ b/src/components/starlight/Footer.astro @@ -1,6 +1,5 @@ --- import DefaultFooter from '@astrojs/starlight/components/Footer.astro'; -import type { Props } from '@astrojs/starlight/props'; import FooterLinks from '../FooterLinks.astro'; import { Ad } from '../RightSidebar/ad'; --- @@ -8,7 +7,7 @@ import { Ad } from '../RightSidebar/ad';
- + diff --git a/src/components/starlight/MobileMenuFooter.astro b/src/components/starlight/MobileMenuFooter.astro index 3f0cefc00ab19..f3a2e6904ba5a 100644 --- a/src/components/starlight/MobileMenuFooter.astro +++ b/src/components/starlight/MobileMenuFooter.astro @@ -1,12 +1,11 @@ --- -import type { Props } from '@astrojs/starlight/props'; import Default from '@astrojs/starlight/components/MobileMenuFooter.astro'; import Sponsors from '../LeftSidebar/Sponsors.astro'; ---
- +
diff --git a/src/components/starlight/PageSidebar.astro b/src/components/starlight/PageSidebar.astro index 818337fb22919..37684f6676dc7 100644 --- a/src/components/starlight/PageSidebar.astro +++ b/src/components/starlight/PageSidebar.astro @@ -1,5 +1,4 @@ --- -import type { Props } from '@astrojs/starlight/props'; import MobileTableOfContents from './MobileTableOfContents.astro'; import TableOfContents from './TableOfContents.astro'; @@ -9,14 +8,14 @@ const Banner = Ad; --- { - Astro.props.toc && ( + Astro.locals.starlightRoute.toc && ( <>
- +
) : ( - + ) diff --git a/src/components/starlight/Pagination.astro b/src/components/starlight/Pagination.astro deleted file mode 100644 index 8d98bdbbb9a2e..0000000000000 --- a/src/components/starlight/Pagination.astro +++ /dev/null @@ -1,42 +0,0 @@ ---- -import Default from '@astrojs/starlight/components/Pagination.astro'; -import type { Props } from '@astrojs/starlight/props'; -import { tutorialPages as pages } from '~/content'; -import { getTutorialPages } from '../../util/getTutorialPages'; -import { getLangFromSlug, stripLangFromSlug } from '~/util/path-utils'; - -const { entry, id, pagination } = Astro.props; - -const lang = getLangFromSlug(id); -let { prev, next } = pagination; - -const tutorialPages = getTutorialPages(pages, lang.toLowerCase()); - -if (Astro.props.entry.id.split('/')[1] === 'tutorial') { - const i = tutorialPages.findIndex((p) => p.id === entry.id); - if (tutorialPages[i - 1]) { - const prevPage = tutorialPages[i - 1]; - - // @ts-expect-error type is incorrect? - prev = { - href: `/${lang}/${stripLangFromSlug(prevPage.id)}/`, - isCurrent: false, - label: prevPage.data.title, - type: 'link', - }; - } - if (tutorialPages[i + 1]) { - const nextPage = tutorialPages[i + 1]; - - // @ts-expect-error type is incorrect? - next = { - href: `/${lang}/${stripLangFromSlug(nextPage.id)}/`, - isCurrent: false, - label: nextPage.data.title, - type: 'link', - }; - } -} ---- - - diff --git a/src/components/starlight/Sidebar.astro b/src/components/starlight/Sidebar.astro index 0b87770e87738..4e77da7e33855 100644 --- a/src/components/starlight/Sidebar.astro +++ b/src/components/starlight/Sidebar.astro @@ -2,8 +2,7 @@ import { Icon } from '@astrojs/starlight/components'; import SidebarPersister from '@astrojs/starlight/components/SidebarPersister.astro'; import SidebarSublist from '@astrojs/starlight/components/SidebarSublist.astro'; -import type { Props } from '@astrojs/starlight/props'; -import type { SidebarEntry } from 'node_modules/@astrojs/starlight/utils/navigation'; +import type { StarlightRouteData } from '@astrojs/starlight/route-data'; import { stripLeadingAndTrailingSlashes } from 'node_modules/@astrojs/starlight/utils/path'; import { allPages } from '~/content'; import { isSubPage } from '~/util/isSubPage'; @@ -14,11 +13,12 @@ import TabListItem from '../tabs/TabListItem.astro'; import TabPanel from '../tabs/TabPanel.astro'; import MobileMenuFooter from './MobileMenuFooter.astro'; -const { sidebar, id } = Astro.props; +const { sidebar, id } = Astro.locals.starlightRoute; // Recursively tweaks properties of sidebar entries. // - Adds a fallback class to entries in the sidebar that don’t exist in the current language. // - Marks pages as “current” if they parents of pages that don’t appear in the sidebar. +type SidebarEntry = StarlightRouteData['sidebar'][number]; function markEntries(i: SidebarEntry) { if (i.type === 'group') { i.entries.forEach(markEntries); @@ -58,7 +58,7 @@ const isCurrent = (sidebar: SidebarEntry[]): boolean => .some((entry) => entry === true); --- - + { @@ -80,7 +80,7 @@ const isCurrent = (sidebar: SidebarEntry[]): boolean =>
- +