From 6e7cbaab6a8b93e68ca6d1312338eb8ed783e3d1 Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 2 Sep 2024 02:38:24 -0700 Subject: [PATCH] feat: ability to disable line number for individual blocks --- .vscode/settings.json | 2 + docs/astro.config.ts | 7 +- docs/package.json | 1 + docs/src/components/package-manager.astro | 137 +++++- docs/src/content/docs/index.mdx | 88 ++-- docs/src/content/docs/plugins/copy-button.mdx | 53 +-- .../src/content/docs/plugins/line-numbers.mdx | 111 ++--- docs/src/styles/index.css | 21 +- examples/cdn/index.html | 2 +- examples/next/package.json | 2 +- examples/next/src/app/code.tsx | 2 +- examples/sveltekit/src/lib/markdown.ts | 10 +- .../transformers/examples/line-numbers.ts | 30 ++ packages/transformers/jsr.json | 1 - packages/transformers/package.json | 14 +- packages/transformers/src/line-numbers.ts | 105 ++--- packages/transformers/tsup.config.ts | 1 + pnpm-lock.yaml | 391 +++++++++--------- 18 files changed, 517 insertions(+), 461 deletions(-) create mode 100644 packages/transformers/examples/line-numbers.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 55d310b..784ec35 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -61,12 +61,14 @@ }, "files.exclude": { ".zed": true, + "**/build": true, ".gitignore": true, "**/LICENSE": true, "**/dist/**": true, "**/.turbo/**": true, "**/.astro/**": true, "pnpm-lock.yaml": true, + "**/.svelte-kit": true, "**/*.timestamp-*": true }, "[markdown]": { diff --git a/docs/astro.config.ts b/docs/astro.config.ts index 67611a0..46715e0 100644 --- a/docs/astro.config.ts +++ b/docs/astro.config.ts @@ -25,6 +25,7 @@ import { defineConfig } from 'astro/config'; import remarkSmartypants from 'remark-smartypants'; import { rehypeHeadingIds } from '@astrojs/markdown-remark'; import rehypeAutolinkHeadings from 'rehype-autolink-headings'; +import starlightLinksValidator from 'starlight-links-validator'; import { transformerTwoslash, rendererRich } from '@shikijs/twoslash'; import moonlightTheme from './public/theme/moonlight-ii.json' with { type: 'json', @@ -60,7 +61,7 @@ export default defineConfig({ visibility: 'always', feedbackDuration: 2_500, }), - transformerLineNumbers({ autoApply: true }), + transformerLineNumbers({ autoApply: false }), transformerNotationDiff(), transformerNotationFocus(), transformerMetaHighlight(), @@ -89,7 +90,7 @@ export default defineConfig({ './src/styles/tailwind.css', './node_modules/@shikijs/twoslash/style-rich.css', ], - plugins: [], + plugins: [starlightLinksValidator()], head: [ { tag: 'script', @@ -104,8 +105,8 @@ export default defineConfig({ { label: 'Plugins', autogenerate: { - directory: 'plugins', collapsed: false, + directory: 'plugins', }, }, { diff --git a/docs/package.json b/docs/package.json index f79620c..a271400 100644 --- a/docs/package.json +++ b/docs/package.json @@ -27,6 +27,7 @@ "remark-toc": "^9.0.0", "sharp": "^0.33.5", "shiki": "^1.16.1", + "starlight-links-validator": "^0.11.0", "tailwindcss": "^3.4.10" }, "devDependencies": { diff --git a/docs/src/components/package-manager.astro b/docs/src/components/package-manager.astro index cc01cd4..b889f91 100644 --- a/docs/src/components/package-manager.astro +++ b/docs/src/components/package-manager.astro @@ -1,41 +1,134 @@ --- -import { Code } from 'astro/components'; import type { ComponentProps } from 'astro/types'; import { Tabs, TabItem } from '@astrojs/starlight/components'; import type { NoRepetition } from '../lib/utilities/types.ts'; +import { transformerCopyButton } from '@rehype-pretty/transformers'; +import { + type RawTheme, + createJavaScriptRegexEngine, + createHighlighter, +} from 'shiki'; +import moonlightTheme from '../../public/theme/moonlight-ii.json' with { + type: 'json', +}; + +const packageManager = ['pnpm', 'bun', 'npm', 'yarn', 'jsr', 'ni'] as const; +type PackageManager = (typeof packageManager)[number]; type TabItemProps = ComponentProps; interface Props { - packageManagers: NoRepetition<'pnpm' | 'bun' | 'npm' | 'yarn' | 'ni' | 'jsr'>; + dev?: boolean; + packageId: string; + packageManagers: NoRepetition; + type?: 'add' | 'create' | 'exec' | 'run' | 'remove'; } -const packageManagers = Astro.props.packageManagers ?? [ - 'pnpm', - 'bun', - 'npm', - 'yarn', - 'jsr', -]; -const iconMap: Record = { - bun: 'bun', - pnpm: 'pnpm', - npm: 'seti:npm', - yarn: 'seti:yarn', - ni: 'seti:shell', - jsr: 'seti:shell', -}; +const { + dev, + packageId, + type = 'add', + // @ts-expect-error + packageManagers = packageManager, +} = Astro.props; + +const javascriptEngine = createJavaScriptRegexEngine(); +const shiki = await createHighlighter({ + langs: ['sh'], + engine: javascriptEngine, + themes: [moonlightTheme as unknown as RawTheme], +}); +const managers = [ + { + name: 'bun', + icon: 'bun', + code: shiki.codeToHtml(`bun add ${packageId}`, { + lang: 'sh', + theme: moonlightTheme as unknown as RawTheme, + + transformers: [ + transformerCopyButton({ + visibility: 'always', + feedbackDuration: 3_000, + }), + ], + }), + }, + { + name: 'pnpm', + icon: 'pnpm', + code: shiki.codeToHtml(`pnpm add ${packageId}`, { + lang: 'sh', + theme: moonlightTheme as unknown as RawTheme, + transformers: [ + transformerCopyButton({ + visibility: 'always', + feedbackDuration: 3_000, + }), + ], + }), + }, + { + name: 'npm', + icon: 'seti:npm', + code: shiki.codeToHtml(`npm install ${packageId}`, { + lang: 'sh', + theme: moonlightTheme as unknown as RawTheme, + transformers: [ + transformerCopyButton({ + visibility: 'always', + feedbackDuration: 3_000, + }), + ], + }), + }, + { + name: 'yarn', + icon: 'seti:yarn', + code: shiki.codeToHtml(`yarn add ${packageId}`, { + lang: 'sh', + theme: moonlightTheme as unknown as RawTheme, + transformers: [ + transformerCopyButton({ + visibility: 'always', + feedbackDuration: 3_000, + }), + ], + }), + }, + { + name: 'jsr', + icon: 'seti:shell', + code: shiki.codeToHtml(`npx jsr add ${packageId}`, { + lang: 'sh', + theme: moonlightTheme as unknown as RawTheme, + transformers: [ + transformerCopyButton({ + visibility: 'always', + feedbackDuration: 3_000, + }), + ], + }), + }, +] satisfies Array<{ + code: string; + name: PackageManager; + icon: TabItemProps['icon']; +}>; --- { - // @ts-expect-error - packageManagers.map(pkgManager => ( - - + managers.map(manager => ( + +
)) } - + diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index acba218..e2d563a 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -3,10 +3,9 @@ title: Rehype Pretty Code description: Beautiful code blocks for Markdown or MDX powered by the Shiki syntax highlighter. template: doc --- -import { Tabs, TabItem } from '@astrojs/starlight/components'; +import PackageManager from '#components/package-manager.astro'; -[`rehype-pretty-code`](https://github.com/rehype-pretty/rehype-pretty-code) is a Rehype plugin -powered by the [`shiki`](https://github.com/shikijs/shiki) syntax highlighter that provides beautiful code blocks for Markdown or MDX. It works on both the server at build-time (avoiding runtime syntax highlighting) and on the client for dynamic highlighting. +[`rehype-pretty-code`](https://github.com/rehype-pretty/rehype-pretty-code) is a Rehype plugin powered by the [`shiki`](https://github.com/shikijs/shiki) syntax highlighter that provides beautiful code blocks for Markdown or MDX. It works on both the server at build-time (avoiding runtime syntax highlighting) and on the client for dynamic highlighting. ## Editor-Grade Highlighting @@ -18,7 +17,7 @@ of its themes ecosystem - use any VSCode theme you want! Draw attention to a particular line of code. -```js {4} showLineNumbers +```ts {4} showLineNumbers import { useFloating } from "@floating-ui/react"; function MyComponent() { @@ -37,7 +36,7 @@ function MyComponent() { Draw attention to a particular word or series of characters. -```js /floatingStyles/ +```ts /floatingStyles/ import { useFloating } from "@floating-ui/react"; function MyComponent() { @@ -93,36 +92,11 @@ Inline ANSI: `> Local: http://localhost:3000/{:ansi}` Install via your terminal: - - - - ```sh - npm install rehype-pretty-code shiki - ``` - - - - - ```sh - pnpm add rehype-pretty-code shiki - ``` - - - - - ```sh - bun add rehype-pretty-code shiki - ``` - - - - - ```sh - yarn add rehype-pretty-code shiki - ``` - - - + This package is ESM-only and currently supports `shiki{:.string}` `^1.0.0{:.string}`. @@ -135,7 +109,7 @@ This package is ESM-only and currently supports `shiki{:.string}` The following works both on the server and on the client. -```js /rehypePrettyCode/ +```ts /rehypePrettyCode/ import { unified } from "unified"; import remarkParse from "remark-parse"; import remarkRehype from "remark-rehype"; @@ -165,7 +139,7 @@ Ensure your `unified{:.string}` version is compatible. The following example shows how to use this package with Next.js. -```js title="next.config.mjs" +```ts title="next.config.mjs" import fs from "node:fs"; import nextMDX from "@next/mdx"; import rehypePrettyCode from "rehype-pretty-code"; @@ -253,7 +227,7 @@ The default theme is `github-dark-dimmed{:.string}`. Shiki has a bunch of [pre-packaged themes](https://shiki.style/themes#themes), which can be specified as a plain string: -```js +```ts const options = { theme: "one-dark-pro", }; @@ -304,7 +278,7 @@ const options = { Or you can also specify default languages for inline code and code blocks separately: -```js +```ts const options = { defaultLang: { block: "plaintext", @@ -321,7 +295,7 @@ extend the behavior of this plugin. The [`@shikijs/transformers`](https://npm.im/@shikijs/transformers) package provides some useful transformers. -```js +```ts import { transformerNotationDiff } from '@shikijs/transformers'; const options = { @@ -349,7 +323,7 @@ Code blocks are configured via the meta string on the top codeblock fence. Place a numeric range inside `{}`. ````md -```js {1-3,4} +```ts {1-3,4} ``` ```` @@ -363,7 +337,7 @@ Place an id after `#` after the `{}`. This allows you to color or style lines differently based on their id. ````md -```js {1,2}#a {3,4}#b +```ts {1,2}#a {3,4}#b ``` ```` @@ -376,7 +350,7 @@ differently based on their id. You can use either `/`: ````md -```js /carrot/ +```ts /carrot/ ``` ```` @@ -384,7 +358,7 @@ You can use either `/`: Or `"` as a delimiter: ````md -```js "carrot" +```ts "carrot" ``` ```` @@ -392,7 +366,7 @@ Or `"` as a delimiter: Different segments of chars can also be highlighted: ````md -```js /carrot/ /apple/ +```ts /carrot/ /apple/ ``` ```` @@ -404,7 +378,7 @@ To highlight only the third to fifth instances of `carrot`, a numeric range can be placed after the last `/`. ````md -```js /carrot/3-5 +```ts /carrot/3-5 ``` ```` @@ -413,7 +387,7 @@ Highlight only the third to fifth instances of `carrot` and any instances of `apple`. ````md -```js /carrot/3-5 /apple/ +```ts /carrot/3-5 /apple/ ``` ```` @@ -424,13 +398,13 @@ Place an id after `#` after the chars. This allows you to color chars differently based on their id. ````md -```js /age/#v /name/#v /setAge/#s /setName/#s /50/#i /"Taylor"/#i +```ts /age/#v /name/#v /setAge/#s /setName/#s /50/#i /"Taylor"/#i const [age, setAge] = useState(50); const [name, setName] = useState("Taylor"); ``` ```` -```js /age/#v /name/#v /setAge/#s /setName/#s /50/#i /"Taylor"/#i +```ts /age/#v /name/#v /setAge/#s /setName/#s /50/#i /"Taylor"/#i const [age, setAge] = useState(50); const [name, setName] = useState("Taylor"); ``` @@ -459,7 +433,7 @@ The name of the function is `getStringLength{:.entity.name.function}`. You can create a map of tokens to shorten this usage throughout your docs: -```js +```ts const options = { tokensMap: { fn: "entity.name.function", @@ -476,7 +450,7 @@ The name of the function is `getStringLength{:.fn}`. Add a file title to your code block, with text inside double quotes (`""`): ````md -```js title="..." +```ts title="..." ``` ```` @@ -486,7 +460,7 @@ Add a file title to your code block, with text inside double quotes (`""`): Add a caption underneath your code block, with text inside double quotes (`""`): ````md -```js caption="..." +```ts caption="..." ``` ```` @@ -528,7 +502,7 @@ code[data-line-numbers-max-digits="4"] > [data-line]::before { If you want to conditionally show them, use `showLineNumbers`: ````md -```js showLineNumbers +```ts showLineNumbers ``` ```` @@ -540,7 +514,7 @@ If you want to start line numbers at a specific number, use `showLineNumbers{number}`: ````md -```js showLineNumbers{number} +```ts showLineNumbers{number} ``` ```` @@ -550,7 +524,7 @@ If you want to start line numbers at a specific number, use Pass your themes to `theme{:.meta.object-literal.key}`, where the keys represent the color mode: -```js +```ts const options = { theme: { dark: "github-dark-dimmed", @@ -636,7 +610,7 @@ const options = { The [usage](#usage) works directly in React Server Components. Here's an example: -```jsx title="code.tsx" +```tsx title="code.tsx" import * as React from "react"; import { unified } from "unified"; import remarkParse from "remark-parse"; @@ -671,7 +645,7 @@ async function highlightCode(code: string) { Then, import the RSC into a page or another component: -```jsx src/app/rsc/page.tsx +```tsx src/app/rsc/page.tsx import * as React from "react"; import { Code } from "./code.tsx"; diff --git a/docs/src/content/docs/plugins/copy-button.mdx b/docs/src/content/docs/plugins/copy-button.mdx index 6ede33e..9f42d57 100644 --- a/docs/src/content/docs/plugins/copy-button.mdx +++ b/docs/src/content/docs/plugins/copy-button.mdx @@ -1,43 +1,24 @@ --- title: Copy Button description: A shiki transformer that adds a copy button to code blocks -sidebar: - badge: - text: experimental - variant: caution --- -import { Aside } from '@astrojs/starlight/components'; -import { Tabs, TabItem } from '@astrojs/starlight/components'; +import { Aside, Badge } from '@astrojs/starlight/components'; +import PackageManager from '#components/package-manager.astro'; + + ## Installation - - - ```sh - pnpm add @rehype-pretty/transformers - ``` - - - ```sh - npm install @rehype-pretty/transformers - ``` - - - ```sh - bun add @rehype-pretty/transformers - ``` - - - ```sh - npx jsr add @rehype-pretty/transformers - ``` - - - ```sh - yarn add @rehype-pretty/transformers - ``` - - + ## Usage @@ -95,9 +76,3 @@ You can use this as a [`shiki` transformer](https://shiki.style/guide/transforme ] }) ``` - - diff --git a/docs/src/content/docs/plugins/line-numbers.mdx b/docs/src/content/docs/plugins/line-numbers.mdx index ba15087..8b22a93 100644 --- a/docs/src/content/docs/plugins/line-numbers.mdx +++ b/docs/src/content/docs/plugins/line-numbers.mdx @@ -1,43 +1,24 @@ --- title: Line Numbers description: A shiki transformer that adds line numbers to code blocks -sidebar: - badge: - text: experimental - variant: caution --- -import { Aside } from '@astrojs/starlight/components'; -import { Tabs, TabItem } from '@astrojs/starlight/components'; +import { Aside, Badge } from '@astrojs/starlight/components'; +import PackageManager from '#components/package-manager.astro'; + + ## Installation - - - ```sh - pnpm add @rehype-pretty/transformers - ``` - - - ```sh - npm install @rehype-pretty/transformers - ``` - - - ```sh - bun add @rehype-pretty/transformers - ``` - - - ```sh - npx jsr add @rehype-pretty/transformers - ``` - - - ```sh - yarn add @rehype-pretty/transformers - ``` - - + ## Usage @@ -51,44 +32,38 @@ You can use this as a [`shiki` transformer](https://shiki.style/guide/transforme #### with `rehype-pretty-code` - ```ts - import { unified } from 'unified' - import remarkParse from 'remark-parse' - import remarkRehype from 'remark-rehype' - import rehypeStringify from 'rehype-stringify' - import { rehypePrettyCode } from 'rehype-pretty-code' - import { transformerLineNumbers } from '@rehype-pretty/transformers' +```ts +import { unified } from 'unified' +import remarkParse from 'remark-parse' +import remarkRehype from 'remark-rehype' +import rehypeStringify from 'rehype-stringify' +import { rehypePrettyCode } from 'rehype-pretty-code' +import { transformerLineNumbers } from '@rehype-pretty/transformers' - const file = await unified() - .use(remarkParse) - .use(remarkRehype) - .use(rehypePrettyCode, { - transformers: [ - transformerLineNumbers({ autoApply: true }), - ], - }) - .use(rehypeStringify) - .process(`\`\`\`js\nconsole.log('Hello, World!')\n\`\`\``) +const file = await unified() + .use(remarkParse) + .use(remarkRehype) + .use(rehypePrettyCode, { + transformers: [ + transformerLineNumbers({ autoApply: true }), + ], + }) + .use(rehypeStringify) + .process(`\`\`\`js\nconsole.log('Hello, World!')\n\`\`\``) - console.log(String(file)) - ``` +console.log(String(file)) +``` #### with `shiki` - ```ts - import { codeToHtml } from 'shiki' +```ts +import { codeToHtml } from 'shiki' - const code = await codeToHtml('console.log("Hello World")', { - lang: 'ts', - theme: 'vitesse-light', - transformers: [ - transformerLineNumbers({ autoApply: true }), - ] - }) - ``` - - +const code = await codeToHtml('console.log("Hello World")', { + lang: 'ts', + theme: 'vitesse-light', + transformers: [ + transformerLineNumbers({ autoApply: true }), + ] +}) +``` diff --git a/docs/src/styles/index.css b/docs/src/styles/index.css index 7eea6fd..a8c6de7 100644 --- a/docs/src/styles/index.css +++ b/docs/src/styles/index.css @@ -1,6 +1,6 @@ :root { color-scheme: dark; - --sl-sidebar-width: 18rem; + --sl-sidebar-width: 16rem; } .twoslash-popup-docs { @@ -18,10 +18,6 @@ figure { position: relative; } -code { - margin-left: 1rem; -} - .twoslash > * { z-index: 1000 !important; overflow-x: auto !important; @@ -45,21 +41,6 @@ span[data-line]:empty { display: none !important; } -/* pre, code { - counter-reset: step; - counter-increment: step 0; -} - -code > span[data-line]::before { - width: 0.3rem; - color: #6a737d; - text-align: right; - margin-right: 1rem; - display: inline-block; - content: counter(step); - counter-increment: step; -} */ - body { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; diff --git a/examples/cdn/index.html b/examples/cdn/index.html index d4809df..73e0670 100644 --- a/examples/cdn/index.html +++ b/examples/cdn/index.html @@ -28,7 +28,7 @@ import remarkParse from 'https://esm.run/remark-parse' import remarkRehype from 'https://esm.run/remark-rehype' import rehypeStringify from 'https://esm.run/rehype-stringify' - import rehypePrettyCode from 'https://esm.run/rehype-pretty-code' + import { rehypePrettyCode } from 'https://esm.run/rehype-pretty-code' const codeElement = document.querySelector('section#code') diff --git a/examples/next/package.json b/examples/next/package.json index 47ccf8b..ab0a126 100644 --- a/examples/next/package.json +++ b/examples/next/package.json @@ -17,7 +17,7 @@ "@tailwindcss/typography": "^0.5.15", "autoprefixer": "^10.4.20", "next": "15.0.0-rc.0", - "postcss": "^8.4.43", + "postcss": "^8.4.44", "react": "19.0.0-rc-e56f4ae3-20240830", "react-dom": "19.0.0-rc-e56f4ae3-20240830", "rehype-pretty-code": "workspace:*", diff --git a/examples/next/src/app/code.tsx b/examples/next/src/app/code.tsx index 38d54de..91afa97 100644 --- a/examples/next/src/app/code.tsx +++ b/examples/next/src/app/code.tsx @@ -2,7 +2,7 @@ import { unified } from 'unified'; import remarkParse from 'remark-parse'; import remarkRehype from 'remark-rehype'; import rehypeStringify from 'rehype-stringify'; -import rehypePrettyCode from 'rehype-pretty-code'; +import { rehypePrettyCode } from 'rehype-pretty-code'; import { transformerCopyButton } from '@rehype-pretty/transformers'; /** diff --git a/examples/sveltekit/src/lib/markdown.ts b/examples/sveltekit/src/lib/markdown.ts index 4762569..b2ea854 100644 --- a/examples/sveltekit/src/lib/markdown.ts +++ b/examples/sveltekit/src/lib/markdown.ts @@ -1,13 +1,13 @@ +import { + transformerCopyButton, + transformerFoldableLines, +} from '@rehype-pretty/transformers'; import { unified } from 'unified'; import remarkParse from 'remark-parse'; import type { Compatible } from 'vfile'; import remarkRehype from 'remark-rehype'; import rehypeStringify from 'rehype-stringify'; -import rehypePrettyCode from 'rehype-pretty-code'; -import { - transformerCopyButton, - transformerFoldableLines, -} from '@rehype-pretty/transformers'; +import { rehypePrettyCode } from 'rehype-pretty-code'; export const toHTML = (content: Compatible | undefined) => unified() diff --git a/packages/transformers/examples/line-numbers.ts b/packages/transformers/examples/line-numbers.ts new file mode 100644 index 0000000..4505192 --- /dev/null +++ b/packages/transformers/examples/line-numbers.ts @@ -0,0 +1,30 @@ +import { unified } from 'unified'; +import { codeToHtml } from 'shiki'; +import remarkParse from 'remark-parse'; +import remarkRehype from 'remark-rehype'; +import rehypeStringify from 'rehype-stringify'; +import rehypePrettyCode from 'rehype-pretty-code'; +import { transformerLineNumbers } from '../src/line-numbers.ts'; + +/* Usage with `rehype-pretty-code` */ + +const withRehypePrettyCode = await unified() + .use(remarkParse) + .use(remarkRehype) + .use(rehypePrettyCode, { + transformers: [transformerLineNumbers({ autoApply: true })], + }) + .use(rehypeStringify) + .process(`\`\`\`ts\nconsole.log('Hello, World!');\n\`\`\``); + +/* Usage with `shiki` directly */ + +const withShikiDirectly = await codeToHtml('console.log("Hello World")', { + lang: 'ts', + theme: 'vitesse-light', + transformers: [transformerLineNumbers({ autoApply: true })], +}); + +console.info( + JSON.stringify({ withRehypePrettyCode, withShikiDirectly }, undefined, 2), +); diff --git a/packages/transformers/jsr.json b/packages/transformers/jsr.json index f2a4c55..4bf6561 100644 --- a/packages/transformers/jsr.json +++ b/packages/transformers/jsr.json @@ -5,7 +5,6 @@ "exports": "./src/index.ts", "publish": { "include": [ - "LICENSE", "jsr.json", "README.md", "src/**/*.ts" diff --git a/packages/transformers/package.json b/packages/transformers/package.json index 3a30d9d..caea70f 100644 --- a/packages/transformers/package.json +++ b/packages/transformers/package.json @@ -15,7 +15,6 @@ }, "files": [ "dist", - "LICENSE", "README.md", "package.json" ], @@ -28,9 +27,7 @@ "prepublishOnly": "NODE_ENV='production' pnpm build", "check-package": "pnpm dlx publint@latest --strict && attw --pack --ignore-rules cjs-resolves-to-esm no-resolution" }, - "dependencies": { - "@std/html": "npm:@jsr/std__html@1.0.2" - }, + "license": "MIT", "devDependencies": { "@arethetypeswrong/cli": "^0.15.4", "@types/node": "^22.5.2", @@ -39,16 +36,15 @@ "typescript": "^5.5.4" }, "engines": { - "node": ">=18" + "node": ">=20" }, "repository": { "type": "git", - "url": "git+https://github.com/rehype-pretty/rehype-pretty-code.git", - "directory": "packages/transformers" + "directory": "packages/transformers", + "url": "https://github.com/rehype-pretty/rehype-pretty-code.git" }, "author": "https://github.com/o-az", "browserslist": [ "node 20" - ], - "license": "MIT" + ] } diff --git a/packages/transformers/src/line-numbers.ts b/packages/transformers/src/line-numbers.ts index f0b80a9..d9c701f 100644 --- a/packages/transformers/src/line-numbers.ts +++ b/packages/transformers/src/line-numbers.ts @@ -9,20 +9,22 @@ export function transformerLineNumbers( ): ShikiTransformer { return { name: '@rehype-pretty/transformers/line-numbers', - code(hast) { + pre(node) { const metaStrings = this.options.meta?.__raw?.split(' '); const noLineNumbers = metaStrings?.includes('showLineNumbers=false'); if (noLineNumbers) { - hast.properties['data-show-line-numbers'] = 'false'; - return hast; + node.properties['data-show-line-numbers'] = 'false'; + return node; } const showLineNumbers = metaStrings?.includes('showLineNumbers'); if (options.autoApply || showLineNumbers) { - hast.properties['data-show-line-numbers'] = 'true'; + node.properties['data-show-line-numbers'] = 'true'; } + if (!(showLineNumbers || options.autoApply)) return node; + const startLineNumberMeta = metaStrings?.find((s) => s.startsWith('startLineNumber='), ); @@ -31,24 +33,26 @@ export function transformerLineNumbers( (Number(startLineNumberMeta?.split('=')?.at(1)) || 1) - 1; if (startLineNumber) { - hast.properties['data-start-line-number'] = startLineNumber.toString(); + node.properties['data-start-line-number'] = startLineNumber.toString(); } + + return node; }, - pre(hast) { + code(node) { const metaStrings = this.options.meta?.__raw?.split(' '); const noLineNumbers = metaStrings?.includes('showLineNumbers=false'); if (noLineNumbers) { - hast.properties['data-show-line-numbers'] = 'false'; - return hast; + node.properties['data-show-line-numbers'] = 'false'; + return node; } const showLineNumbers = metaStrings?.includes('showLineNumbers'); if (options.autoApply || showLineNumbers) { - hast.properties['data-show-line-numbers'] = 'true'; + node.properties['data-show-line-numbers'] = 'true'; } - if (!(showLineNumbers || options.autoApply)) return hast; + if (!(showLineNumbers || options.autoApply)) return node; const startLineNumberMeta = metaStrings?.find((s) => s.startsWith('startLineNumber='), @@ -58,49 +62,52 @@ export function transformerLineNumbers( (Number(startLineNumberMeta?.split('=')?.at(1)) || 1) - 1; if (startLineNumber) { - hast.properties['data-start-line-number'] = startLineNumber.toString(); + node.properties['data-start-line-number'] = startLineNumber.toString(); } - hast.children.push({ - type: 'element', - tagName: 'style', - properties: {}, - children: [ - { - type: 'text', - value: /* css */ ` - pre[data-show-line-numbers], code[data-show-line-numbers] { - counter-increment: step 0; - font-variant-numeric: tabular-nums; - counter-reset: step 0; - } - - code[data-show-line-numbers] > span[data-line]::before { - color: #6a737d; - text-align: right; - margin-right: 0.75rem; - display: inline-block; - content: counter(step); - counter-increment: step; - font-variant-numeric: tabular-nums; - } - - code[data-show-line-numbers] > span[data-line]:empty::before { - content: none; - } - `.trim(), - }, - ], + return node; + }, + root(node) { + node.children.map((childNode) => { + if (childNode.type === 'element' && childNode.tagName === 'pre') { + childNode.children.push({ + type: 'element', + tagName: 'style', + properties: {}, + children: [{ type: 'text', value: lineNumbersStyle() }], + }); + } }); - if (!noLineNumbers) { - hast.children.push({ - type: 'element', - tagName: 'style', - properties: {}, - children: [], - }); - } + return node; }, }; } + +function lineNumbersStyle() { + return /* css */ ` + pre[data-show-line-numbers='true'], code[data-show-line-numbers='true'] { + counter-increment: step 0; + font-variant-numeric: tabular-nums; + counter-reset: step 0; + } + + code[data-show-line-numbers='true'] > span[data-line]::before { + color: #6a737d; + text-align: right; + margin-right: 0.75rem; + display: inline-block; + content: counter(step); + counter-increment: step; + font-variant-numeric: tabular-nums; + } + + code[data-show-line-numbers='true'] > span[data-line]:empty::before, + span[data-rehype-pretty-code-figure] > code > span[data-line]::before { + content: none; + } +` + .replaceAll(/\n/g, '') + .replaceAll(/\s+/g, ' ') + .trim(); +} diff --git a/packages/transformers/tsup.config.ts b/packages/transformers/tsup.config.ts index 557f29a..422c03f 100644 --- a/packages/transformers/tsup.config.ts +++ b/packages/transformers/tsup.config.ts @@ -13,6 +13,7 @@ export default defineConfig({ entry: { index: './src/index.ts', 'copy-button': './src/copy-button.ts', + 'line-numbers': './src/line-numbers.ts', 'foldable-lines': './src/foldable-lines.ts', }, treeshake: 'recommended', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 05e3e97..211dc12 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -104,6 +104,9 @@ importers: shiki: specifier: ^1.16.1 version: 1.16.1 + starlight-links-validator: + specifier: ^0.11.0 + version: 0.11.0(@astrojs/starlight@0.26.1(astro@4.15.1(@types/node@22.5.2)(lightningcss@1.26.0)(rollup@4.21.2)(terser@5.31.6)(typescript@5.5.4)))(astro@4.15.1(@types/node@22.5.2)(lightningcss@1.26.0)(rollup@4.21.2)(terser@5.31.6)(typescript@5.5.4)) tailwindcss: specifier: ^3.4.10 version: 3.4.10 @@ -182,13 +185,13 @@ importers: version: 0.5.15(tailwindcss@3.4.10) autoprefixer: specifier: ^10.4.20 - version: 10.4.20(postcss@8.4.43) + version: 10.4.20(postcss@8.4.44) next: specifier: 15.0.0-rc.0 version: 15.0.0-rc.0(babel-plugin-react-compiler@0.0.0-experimental-4e0eccf-20240830)(react-dom@19.0.0-rc-e56f4ae3-20240830(react@19.0.0-rc-e56f4ae3-20240830))(react@19.0.0-rc-e56f4ae3-20240830) postcss: - specifier: ^8.4.43 - version: 8.4.43 + specifier: ^8.4.44 + version: 8.4.44 react: specifier: 19.0.0-rc-e56f4ae3-20240830 version: 19.0.0-rc-e56f4ae3-20240830 @@ -231,10 +234,10 @@ importers: version: 0.0.0-experimental-4e0eccf-20240830 eslint-config-next: specifier: 15.0.0-rc.0 - version: 15.0.0-rc.0(eslint@8.57.0)(typescript@5.5.4) + version: 15.0.0-rc.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4) postcss-import: specifier: ^16.1.0 - version: 16.1.0(postcss@8.4.43) + version: 16.1.0(postcss@8.4.44) typescript: specifier: ^5.5.4 version: 5.5.4 @@ -246,7 +249,7 @@ importers: version: link:../../packages/transformers '@tailwindcss/vite': specifier: 4.0.0-alpha.20 - version: 4.0.0-alpha.20(jiti@1.21.6)(postcss@8.4.43)(tsx@4.19.0)(vite@5.4.2(@types/node@22.5.2)(lightningcss@1.26.0)(terser@5.31.6))(yaml@2.5.0) + version: 4.0.0-alpha.20(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(vite@5.4.2(@types/node@22.5.2)(lightningcss@1.26.0)(terser@5.31.6))(yaml@2.5.0) rehype-pretty-code: specifier: workspace:* version: link:../../packages/core @@ -280,7 +283,7 @@ importers: version: 5.0.0-next.242 svelte-check: specifier: ^3.8.6 - version: 3.8.6(@babel/core@7.25.2)(postcss-load-config@4.0.2(postcss@8.4.43))(postcss@8.4.43)(svelte@5.0.0-next.242) + version: 3.8.6(@babel/core@7.25.2)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(yaml@2.5.0))(postcss@8.4.44)(svelte@5.0.0-next.242) tslib: specifier: ^2.7.0 version: 2.7.0 @@ -344,7 +347,7 @@ importers: version: 2.2.0 tsup: specifier: ^8.2.4 - version: 8.2.4(jiti@1.21.6)(postcss@8.4.43)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.0) + version: 8.2.4(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.0) tsx: specifier: ^4.19.0 version: 4.19.0 @@ -359,10 +362,6 @@ importers: version: 2.0.5(@types/node@22.5.2)(@vitest/ui@2.0.5)(lightningcss@1.26.0)(terser@5.31.6) packages/transformers: - dependencies: - '@std/html': - specifier: npm:@jsr/std__html@1.0.2 - version: '@jsr/std__html@1.0.2' devDependencies: '@arethetypeswrong/cli': specifier: ^0.15.4 @@ -372,7 +371,7 @@ importers: version: 22.5.2 tsup: specifier: ^8.2.4 - version: 8.2.4(jiti@1.21.6)(postcss@8.4.43)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.0) + version: 8.2.4(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.0) tsx: specifier: ^4.19.0 version: 4.19.0 @@ -997,13 +996,21 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/config-array@0.18.0': + resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/eslintrc@3.1.0': + resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.9.1': + resolution: {integrity: sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@expressive-code/core@0.35.6': resolution: {integrity: sha512-xGqCkmfkgT7lr/rvmfnYdDSeTdCSp1otAHgoFS6wNEeO7wGDPpxdosVqYiIcQ8CfWUABh/pGqWG90q+MV3824A==} @@ -1017,18 +1024,13 @@ packages: '@expressive-code/plugin-text-markers@0.35.6': resolution: {integrity: sha512-/k9eWVZSCs+uEKHR++22Uu6eIbHWEciVHbIuD8frT8DlqTtHYaaiwHPncO6KFWnGDz5i/gL7oyl6XmOi/E6GVg==} - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} '@img/sharp-darwin-arm64@0.33.5': resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} @@ -1164,9 +1166,6 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@jsr/std__html@1.0.2': - resolution: {integrity: sha512-Bt0PK2zOLfEHulDNK9DgxqeWmY8ZwDnjgYdIdkxuhJrSq1kPyK0tjb2DG/ZAg0MgIqV97mJd7rEdk3OjdzDLOg==, tarball: https://npm.jsr.io/~/11/@jsr/std__html/1.0.2.tgz} - '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} @@ -2107,6 +2106,7 @@ packages: bun@1.1.26: resolution: {integrity: sha512-dWSewAqE7sVbYmflJxgG47dW4vmsbar7VAnQ4ao45y3ulr3n7CwdsMLFnzd28jhPRtF+rsaVK2y4OLIkP3OD4A==} + cpu: [arm64, x64] os: [darwin, linux, win32] hasBin: true @@ -2398,10 +2398,6 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dset@3.1.3: resolution: {integrity: sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==} engines: {node: '>=4'} @@ -2556,25 +2552,34 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.0.2: + resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.9.1: + resolution: {integrity: sha512-dHvhrbfr4xFQ9/dq+jcVneZMyRYLjggWjk6RVsIiHsP8Rz6yZ8LvZ//iU4TrZF+SXWG+JkNF2OyiZRvzgRDqMg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true esm-env@1.0.0: resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + espree@10.1.0: + resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} @@ -2679,9 +2684,9 @@ packages: fflate@0.8.2: resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} @@ -2702,9 +2707,9 @@ packages: find-yarn-workspace-root2@1.2.16: resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -2793,9 +2798,9 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} globalyzer@0.1.0: resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} @@ -2814,9 +2819,6 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - gray-matter@4.0.3: resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} engines: {node: '>=6.0'} @@ -2832,6 +2834,9 @@ packages: hast-util-embedded@3.0.0: resolution: {integrity: sha512-naH8sld4Pe2ep03qqULEtvYr7EjrLK2QHY8KJR6RJkTUjPGObe1vnx585uzem2hGra+s1q08DZZpfgDVYRbaXA==} + hast-util-from-html@2.0.1: + resolution: {integrity: sha512-RXQBLMl9kjKVNkJTIO6bZyb2n+cUH8LFaSSzo82jiLT6Tfc+Pt7VQCS+/h3YwG4jaNE2TA2sdJisGWR+aJrp0g==} + hast-util-from-html@2.0.2: resolution: {integrity: sha512-HwOHwxdt2zC5KQ/CNoybBntRook2zJvfZE/u5/Ap7aLPe22bDqen7KwGkOqOyzL5zIqKwiYX/OTtE0FWgr6XXA==} @@ -2954,6 +2959,10 @@ packages: invariant@2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + is-absolute-url@4.0.1: + resolution: {integrity: sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-alphabetical@2.0.1: resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} @@ -3589,6 +3598,9 @@ packages: ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + muggle-string@0.4.1: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} @@ -3924,8 +3936,8 @@ packages: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} - postcss@8.4.43: - resolution: {integrity: sha512-gJAQVYbh5R3gYm33FijzCZj7CHyQ3hWMgJMprLUlIYqCwTeZhBQ19wp0e9mA25BUbEvY5+EXuuaAjqQsrBxQBQ==} + postcss@8.4.44: + resolution: {integrity: sha512-Aweb9unOEpQ3ezu4Q00DPvvM2ZTUitJdNKeP/+uQgr1IBIqu574IaZoURId7BKtWMREwzKa9OgzPzezWGPWFQw==} engines: {node: ^10 || ^12 || >=14} preferred-pm@3.1.4: @@ -4133,11 +4145,6 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rollup@4.21.2: resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -4295,6 +4302,13 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + starlight-links-validator@0.11.0: + resolution: {integrity: sha512-7mKiP0xAS8ItKy8QAIkmeNYbzI4w0WD0pOYoTPa1xMNbz+qYr/QWT+a40QO/Z2XYJLzzQn47yomupUfI89wheg==} + engines: {node: '>=18.14.1'} + peerDependencies: + '@astrojs/starlight': '>=0.15.0' + astro: '>=4.0.0' + std-env@3.7.0: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} @@ -4663,10 +4677,6 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - type-fest@2.19.0: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} @@ -5262,9 +5272,9 @@ snapshots: '@astrojs/tailwind@5.1.0(astro@4.15.1(@types/node@22.5.2)(lightningcss@1.26.0)(rollup@4.21.2)(terser@5.31.6)(typescript@5.5.4))(tailwindcss@3.4.10)': dependencies: astro: 4.15.1(@types/node@22.5.2)(lightningcss@1.26.0)(rollup@4.21.2)(terser@5.31.6)(typescript@5.5.4) - autoprefixer: 10.4.20(postcss@8.4.43) - postcss: 8.4.43 - postcss-load-config: 4.0.2(postcss@8.4.43) + autoprefixer: 10.4.20(postcss@8.4.44) + postcss: 8.4.44 + postcss-load-config: 4.0.2(postcss@8.4.44) tailwindcss: 3.4.10 transitivePeerDependencies: - ts-node @@ -5796,19 +5806,27 @@ snapshots: '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.9.1(jiti@1.21.6))': dependencies: - eslint: 8.57.0 + eslint: 9.9.1(jiti@1.21.6) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/eslintrc@2.1.4': + '@eslint/config-array@0.18.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.6 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 debug: 4.3.6 - espree: 9.6.1 - globals: 13.24.0 + espree: 10.1.0 + globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -5817,7 +5835,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} + '@eslint/js@9.9.1': {} + + '@eslint/object-schema@2.1.4': {} '@expressive-code/core@0.35.6': dependencies: @@ -5826,8 +5846,8 @@ snapshots: hast-util-to-html: 9.0.2 hast-util-to-text: 4.0.2 hastscript: 9.0.0 - postcss: 8.4.43 - postcss-nested: 6.2.0(postcss@8.4.43) + postcss: 8.4.44 + postcss-nested: 6.2.0(postcss@8.4.44) unist-util-visit: 5.0.0 unist-util-visit-parents: 6.0.1 @@ -5844,17 +5864,9 @@ snapshots: dependencies: '@expressive-code/core': 0.35.6 - '@humanwhocodes/config-array@0.11.14': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.6 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.3.0': {} '@img/sharp-darwin-arm64@0.33.5': optionalDependencies: @@ -5968,8 +5980,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@jsr/std__html@1.0.2': {} - '@manypkg/find-root@1.1.0': dependencies: '@babel/runtime': 7.25.6 @@ -6391,11 +6401,11 @@ snapshots: postcss-selector-parser: 6.0.10 tailwindcss: 3.4.10 - '@tailwindcss/vite@4.0.0-alpha.20(jiti@1.21.6)(postcss@8.4.43)(tsx@4.19.0)(vite@5.4.2(@types/node@22.5.2)(lightningcss@1.26.0)(terser@5.31.6))(yaml@2.5.0)': + '@tailwindcss/vite@4.0.0-alpha.20(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(vite@5.4.2(@types/node@22.5.2)(lightningcss@1.26.0)(terser@5.31.6))(yaml@2.5.0)': dependencies: '@tailwindcss/oxide': 4.0.0-alpha.20 lightningcss: 1.26.0 - postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.43)(tsx@4.19.0)(yaml@2.5.0) + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(yaml@2.5.0) tailwindcss: 4.0.0-alpha.20 vite: 5.4.2(@types/node@22.5.2)(lightningcss@1.26.0)(terser@5.31.6) transitivePeerDependencies: @@ -6492,7 +6502,7 @@ snapshots: '@types/postcss-import@14.0.3': dependencies: - postcss: 8.4.43 + postcss: 8.4.44 '@types/prop-types@15.7.12': {} @@ -6529,14 +6539,14 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 7.2.0 '@typescript-eslint/types': 7.2.0 '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.5.4) '@typescript-eslint/visitor-keys': 7.2.0 debug: 4.3.6 - eslint: 8.57.0 + eslint: 9.9.1(jiti@1.21.6) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -6936,14 +6946,14 @@ snapshots: - terser - typescript - autoprefixer@10.4.20(postcss@8.4.43): + autoprefixer@10.4.20(postcss@8.4.44): dependencies: browserslist: 4.23.3 caniuse-lite: 1.0.30001655 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.1 - postcss: 8.4.43 + postcss: 8.4.44 postcss-value-parser: 4.2.0 axe-core@4.10.0: {} @@ -7219,7 +7229,7 @@ snapshots: debug@3.2.7: dependencies: - ms: 2.1.2 + ms: 2.1.3 debug@4.3.6: dependencies: @@ -7274,10 +7284,6 @@ snapshots: dependencies: esutils: 2.0.3 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - dset@3.1.3: {} eastasianwidth@0.2.0: {} @@ -7382,18 +7388,18 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-next@15.0.0-rc.0(eslint@8.57.0)(typescript@5.5.4): + eslint-config-next@15.0.0-rc.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4): dependencies: '@next/eslint-plugin-next': 15.0.0-rc.0 '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) - eslint: 8.57.0 + '@typescript-eslint/parser': 7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4) + eslint: 9.9.1(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) - eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) - eslint-plugin-react: 7.35.0(eslint@8.57.0) - eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@9.9.1(jiti@1.21.6)) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@9.9.1(jiti@1.21.6)) + eslint-plugin-jsx-a11y: 6.9.0(eslint@9.9.1(jiti@1.21.6)) + eslint-plugin-react: 7.35.0(eslint@9.9.1(jiti@1.21.6)) + eslint-plugin-react-hooks: 4.6.2(eslint@9.9.1(jiti@1.21.6)) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -7409,37 +7415,37 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@9.9.1(jiti@1.21.6)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.3.6 enhanced-resolve: 5.17.1 - eslint: 8.57.0 - eslint-module-utils: 2.8.2(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint: 9.9.1(jiti@1.21.6) + eslint-module-utils: 2.8.2(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@9.9.1(jiti@1.21.6)))(eslint@9.9.1(jiti@1.21.6)) fast-glob: 3.3.2 get-tsconfig: 4.8.0 is-bun-module: 1.1.0 is-glob: 4.0.3 optionalDependencies: - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@9.9.1(jiti@1.21.6)) transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-node - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.2(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.2(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@9.9.1(jiti@1.21.6)))(eslint@9.9.1(jiti@1.21.6)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) - eslint: 8.57.0 + '@typescript-eslint/parser': 7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4) + eslint: 9.9.1(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@9.9.1(jiti@1.21.6)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@9.9.1(jiti@1.21.6)): dependencies: array-includes: '@nolyfill/array-includes@1.0.28' array.prototype.findlastindex: '@nolyfill/array.prototype.findlastindex@1.0.24' @@ -7447,9 +7453,9 @@ snapshots: array.prototype.flatmap: '@nolyfill/array.prototype.flatmap@1.0.28' debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.57.0 + eslint: 9.9.1(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.2(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.2(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@9.9.1(jiti@1.21.6)))(eslint@9.9.1(jiti@1.21.6)) hasown: '@nolyfill/hasown@1.0.29' is-core-module: '@nolyfill/is-core-module@1.0.39' is-glob: 4.0.3 @@ -7460,13 +7466,13 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.2.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0): + eslint-plugin-jsx-a11y@6.9.0(eslint@9.9.1(jiti@1.21.6)): dependencies: aria-query: 5.1.3 array-includes: '@nolyfill/array-includes@1.0.28' @@ -7477,7 +7483,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: '@nolyfill/es-iterator-helpers@1.0.21' - eslint: 8.57.0 + eslint: 9.9.1(jiti@1.21.6) hasown: '@nolyfill/hasown@1.0.29' jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -7486,11 +7492,11 @@ snapshots: safe-regex-test: '@nolyfill/safe-regex-test@1.0.29' string.prototype.includes: '@nolyfill/string.prototype.includes@1.0.28' - eslint-plugin-react-hooks@4.6.2(eslint@8.57.0): + eslint-plugin-react-hooks@4.6.2(eslint@9.9.1(jiti@1.21.6)): dependencies: - eslint: 8.57.0 + eslint: 9.9.1(jiti@1.21.6) - eslint-plugin-react@7.35.0(eslint@8.57.0): + eslint-plugin-react@7.35.0(eslint@9.9.1(jiti@1.21.6)): dependencies: array-includes: '@nolyfill/array-includes@1.0.28' array.prototype.findlast: '@nolyfill/array.prototype.findlast@1.0.24' @@ -7498,7 +7504,7 @@ snapshots: array.prototype.tosorted: '@nolyfill/array.prototype.tosorted@1.0.24' doctrine: 2.1.0 es-iterator-helpers: '@nolyfill/es-iterator-helpers@1.0.21' - eslint: 8.57.0 + eslint: 9.9.1(jiti@1.21.6) estraverse: 5.3.0 hasown: '@nolyfill/hasown@1.0.29' jsx-ast-utils: 3.3.5 @@ -7517,45 +7523,43 @@ snapshots: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@7.2.2: + eslint-scope@8.0.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint@8.57.0: + eslint-visitor-keys@4.0.0: {} + + eslint@9.9.1(jiti@1.21.6): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1(jiti@1.21.6)) '@eslint-community/regexpp': 4.11.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/config-array': 0.18.0 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.9.1 '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6 - doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.0.2 + eslint-visitor-keys: 4.0.0 + espree: 10.1.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -7564,16 +7568,18 @@ snapshots: optionator: 0.9.4 strip-ansi: 6.0.1 text-table: 0.2.0 + optionalDependencies: + jiti: 1.21.6 transitivePeerDependencies: - supports-color esm-env@1.0.0: {} - espree@9.6.1: + espree@10.1.0: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 3.4.3 + eslint-visitor-keys: 4.0.0 esprima@4.0.1: {} @@ -7697,9 +7703,9 @@ snapshots: fflate@0.8.2: {} - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 fill-range@7.1.1: dependencies: @@ -7722,11 +7728,10 @@ snapshots: micromatch: 4.0.8 pkg-dir: 4.2.0 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 flatted@3.3.1: {} @@ -7812,9 +7817,7 @@ snapshots: globals@11.12.0: {} - globals@13.24.0: - dependencies: - type-fest: 0.20.2 + globals@14.0.0: {} globalyzer@0.1.0: {} @@ -7840,8 +7843,6 @@ snapshots: graceful-fs@4.2.11: {} - graphemer@1.4.0: {} - gray-matter@4.0.3: dependencies: js-yaml: 3.14.1 @@ -7858,6 +7859,15 @@ snapshots: '@types/hast': 3.0.4 hast-util-is-element: 3.0.0 + hast-util-from-html@2.0.1: + dependencies: + '@types/hast': 3.0.4 + devlop: 1.1.0 + hast-util-from-parse5: 8.0.1 + parse5: 7.1.2 + vfile: 6.0.3 + vfile-message: 4.0.2 + hast-util-from-html@2.0.2: dependencies: '@types/hast': 3.0.4 @@ -8085,6 +8095,8 @@ snapshots: dependencies: loose-envify: 1.4.0 + is-absolute-url@4.0.1: {} + is-alphabetical@2.0.1: {} is-alphanumerical@2.0.1: @@ -8954,6 +8966,8 @@ snapshots: ms@2.1.2: {} + ms@2.1.3: {} + muggle-string@0.4.1: {} mz@2.7.0: @@ -9211,44 +9225,44 @@ snapshots: dependencies: find-up: 4.1.0 - postcss-import@15.1.0(postcss@8.4.43): + postcss-import@15.1.0(postcss@8.4.44): dependencies: - postcss: 8.4.43 + postcss: 8.4.44 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 - postcss-import@16.1.0(postcss@8.4.43): + postcss-import@16.1.0(postcss@8.4.44): dependencies: - postcss: 8.4.43 + postcss: 8.4.44 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 - postcss-js@4.0.1(postcss@8.4.43): + postcss-js@4.0.1(postcss@8.4.44): dependencies: camelcase-css: 2.0.1 - postcss: 8.4.43 + postcss: 8.4.44 - postcss-load-config@4.0.2(postcss@8.4.43): + postcss-load-config@4.0.2(postcss@8.4.44): dependencies: lilconfig: 3.1.2 yaml: 2.5.0 optionalDependencies: - postcss: 8.4.43 + postcss: 8.4.44 - postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.43)(tsx@4.19.0)(yaml@2.5.0): + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(yaml@2.5.0): dependencies: lilconfig: 3.1.2 optionalDependencies: jiti: 1.21.6 - postcss: 8.4.43 + postcss: 8.4.44 tsx: 4.19.0 yaml: 2.5.0 - postcss-nested@6.2.0(postcss@8.4.43): + postcss-nested@6.2.0(postcss@8.4.44): dependencies: - postcss: 8.4.43 + postcss: 8.4.44 postcss-selector-parser: 6.1.2 postcss-selector-parser@6.0.10: @@ -9269,7 +9283,7 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 - postcss@8.4.43: + postcss@8.4.44: dependencies: nanoid: 3.3.7 picocolors: 1.0.1 @@ -9559,10 +9573,6 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - rollup@4.21.2: dependencies: '@types/estree': 1.0.5 @@ -9745,6 +9755,19 @@ snapshots: stackback@0.0.2: {} + starlight-links-validator@0.11.0(@astrojs/starlight@0.26.1(astro@4.15.1(@types/node@22.5.2)(lightningcss@1.26.0)(rollup@4.21.2)(terser@5.31.6)(typescript@5.5.4)))(astro@4.15.1(@types/node@22.5.2)(lightningcss@1.26.0)(rollup@4.21.2)(terser@5.31.6)(typescript@5.5.4)): + dependencies: + '@astrojs/starlight': 0.26.1(astro@4.15.1(@types/node@22.5.2)(lightningcss@1.26.0)(rollup@4.21.2)(terser@5.31.6)(typescript@5.5.4)) + astro: 4.15.1(@types/node@22.5.2)(lightningcss@1.26.0)(rollup@4.21.2)(terser@5.31.6)(typescript@5.5.4) + github-slugger: 2.0.0 + hast-util-from-html: 2.0.1 + hast-util-has-property: 3.0.0 + is-absolute-url: 4.0.1 + kleur: 4.1.5 + mdast-util-to-string: 4.0.0 + picomatch: 4.0.2 + unist-util-visit: 5.0.0 + std-env@3.7.0: {} stdin-discarder@0.2.2: {} @@ -9844,14 +9867,14 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte-check@3.8.6(@babel/core@7.25.2)(postcss-load-config@4.0.2(postcss@8.4.43))(postcss@8.4.43)(svelte@5.0.0-next.242): + svelte-check@3.8.6(@babel/core@7.25.2)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(yaml@2.5.0))(postcss@8.4.44)(svelte@5.0.0-next.242): dependencies: '@jridgewell/trace-mapping': 0.3.25 chokidar: 3.6.0 picocolors: 1.0.1 sade: 1.8.1 svelte: 5.0.0-next.242 - svelte-preprocess: 5.1.4(@babel/core@7.25.2)(postcss-load-config@4.0.2(postcss@8.4.43))(postcss@8.4.43)(svelte@5.0.0-next.242)(typescript@5.5.4) + svelte-preprocess: 5.1.4(@babel/core@7.25.2)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(yaml@2.5.0))(postcss@8.4.44)(svelte@5.0.0-next.242)(typescript@5.5.4) typescript: 5.5.4 transitivePeerDependencies: - '@babel/core' @@ -9868,7 +9891,7 @@ snapshots: dependencies: svelte: 5.0.0-next.242 - svelte-preprocess@5.1.4(@babel/core@7.25.2)(postcss-load-config@4.0.2(postcss@8.4.43))(postcss@8.4.43)(svelte@5.0.0-next.242)(typescript@5.5.4): + svelte-preprocess@5.1.4(@babel/core@7.25.2)(postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(yaml@2.5.0))(postcss@8.4.44)(svelte@5.0.0-next.242)(typescript@5.5.4): dependencies: '@types/pug': 2.0.10 detect-indent: 6.1.0 @@ -9878,8 +9901,8 @@ snapshots: svelte: 5.0.0-next.242 optionalDependencies: '@babel/core': 7.25.2 - postcss: 8.4.43 - postcss-load-config: 4.0.2(postcss@8.4.43) + postcss: 8.4.44 + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(yaml@2.5.0) typescript: 5.5.4 svelte@5.0.0-next.242: @@ -9914,11 +9937,11 @@ snapshots: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.1 - postcss: 8.4.43 - postcss-import: 15.1.0(postcss@8.4.43) - postcss-js: 4.0.1(postcss@8.4.43) - postcss-load-config: 4.0.2(postcss@8.4.43) - postcss-nested: 6.2.0(postcss@8.4.43) + postcss: 8.4.44 + postcss-import: 15.1.0(postcss@8.4.44) + postcss-js: 4.0.1(postcss@8.4.44) + postcss-load-config: 4.0.2(postcss@8.4.44) + postcss-nested: 6.2.0(postcss@8.4.44) postcss-selector-parser: 6.1.2 resolve: 1.22.8 sucrase: 3.35.0 @@ -10019,7 +10042,7 @@ snapshots: tslib@2.7.0: {} - tsup@8.2.4(jiti@1.21.6)(postcss@8.4.43)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.0): + tsup@8.2.4(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.0): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 @@ -10031,14 +10054,14 @@ snapshots: globby: 11.1.0 joycon: 3.1.1 picocolors: 1.0.1 - postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.43)(tsx@4.19.0)(yaml@2.5.0) + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.44)(tsx@4.19.0)(yaml@2.5.0) resolve-from: 5.0.0 rollup: 4.21.2 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 optionalDependencies: - postcss: 8.4.43 + postcss: 8.4.44 typescript: 5.5.4 transitivePeerDependencies: - jiti @@ -10094,8 +10117,6 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-fest@0.20.2: {} - type-fest@2.19.0: {} typesafe-path@0.2.2: {} @@ -10226,7 +10247,7 @@ snapshots: vite@5.4.2(@types/node@22.5.2)(lightningcss@1.26.0)(terser@5.31.6): dependencies: esbuild: 0.21.5 - postcss: 8.4.43 + postcss: 8.4.44 rollup: 4.21.2 optionalDependencies: '@types/node': 22.5.2