diff --git a/.changeset/breezy-cats-taste.md b/.changeset/breezy-cats-taste.md new file mode 100644 index 0000000000..3f2add688d --- /dev/null +++ b/.changeset/breezy-cats-taste.md @@ -0,0 +1,5 @@ +--- +'@astrojs/starlight': patch +--- + +Adds extra information to the errors thrown by the `` component to help locate misformatted code diff --git a/.gitignore b/.gitignore index e790eb4de4..d825d3a73c 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,7 @@ pnpm-debug.log* __coverage__/ # Vercel output -.vercel \ No newline at end of file +.vercel + +# Created by @astrojs/check +/src/ diff --git a/docs/src/content/docs/zh-cn/getting-started.mdx b/docs/src/content/docs/zh-cn/getting-started.mdx index 6d87fc8c4c..58b7d9fbc8 100644 --- a/docs/src/content/docs/zh-cn/getting-started.mdx +++ b/docs/src/content/docs/zh-cn/getting-started.mdx @@ -15,7 +15,7 @@ Starlight 是一个基于 [Astro](https://astro.build) 框架构建的全功能 在你的终端中运行以下命令来创建一个新的 Astro + Starlight 项目: - + ```sh @@ -52,7 +52,7 @@ yarn create astro --template starlight 在你的项目目录中,运行以下命令来启动开发服务器: - + ```sh @@ -104,7 +104,7 @@ Starlight 已经准备好让你添加新内容或导入你现有的文件! Starlight 是一个 Astro 集成。你可以通过在终端中运行以下命令来更新它和其他 Astro 软件包: - + ```sh diff --git a/docs/src/content/docs/zh-cn/guides/components.mdx b/docs/src/content/docs/zh-cn/guides/components.mdx index 5b4913843b..4565c32836 100644 --- a/docs/src/content/docs/zh-cn/guides/components.mdx +++ b/docs/src/content/docs/zh-cn/guides/components.mdx @@ -86,6 +86,50 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; +#### 同步选项卡 + +通过添加 `syncKey` 属性来保持多个选项卡组同步。 + +页面上拥有相同的 `syncKey` 值的所有 `` 都将展示相同的活动标签。这使得你的读者只需选择一次(例如他们的操作系统或包管理器),就可以看到他们的选择反映在整个页面中。 + +若要同步相关的选项卡,请为每个 `` 组件添加相同的 `syncKey` 属性,并确保它们都使用相同的 `` 标签: + +```mdx 'syncKey="constellations"' +# src/content/docs/example.mdx + +import { Tabs, TabItem } from '@astrojs/starlight/components'; + +_一些星座:_ + + + Bellatrix, Rigel, Betelgeuse + Pollux, Castor A, Castor B + + +_一些系外行星:_ + + + HD 34445 b, Gliese 179 b, Wasp-82 b + Pollux b, HAT-P-24b, HD 50554 b + +``` + +以上代码在页面上生成了以下内容: + +_一些星座:_ + + + Bellatrix, Rigel, Betelgeuse + Pollux, Castor A, Castor B + + +_一些系外行星:_ + + + HD 34445 b, Gliese 179 b, Wasp-82 b + Pollux b, HAT-P-24b, HD 50554 b + + ### 卡片 import { Card, CardGrid } from '@astrojs/starlight/components'; diff --git a/docs/src/content/docs/zh-cn/guides/css-and-tailwind.mdx b/docs/src/content/docs/zh-cn/guides/css-and-tailwind.mdx index 3f0b33a82f..becb044d6d 100644 --- a/docs/src/content/docs/zh-cn/guides/css-and-tailwind.mdx +++ b/docs/src/content/docs/zh-cn/guides/css-and-tailwind.mdx @@ -63,7 +63,7 @@ Starlight Tailwind 插件应用了以下配置: 使用 `create astro` 创建一个预配置了 Tailwind CSS 的新 Starlight 项目: - + ```sh @@ -95,7 +95,7 @@ yarn create astro --template starlight/tailwind 1. 将 Astro 的 Tailwind 集成添加到项目中: - + @@ -125,7 +125,7 @@ yarn create astro --template starlight/tailwind 2. 安装 Starlight Tailwind 插件: - + diff --git a/docs/src/content/docs/zh-cn/guides/customization.mdx b/docs/src/content/docs/zh-cn/guides/customization.mdx index bbca255438..560e816c6c 100644 --- a/docs/src/content/docs/zh-cn/guides/customization.mdx +++ b/docs/src/content/docs/zh-cn/guides/customization.mdx @@ -128,7 +128,7 @@ Starlight 在每个页面上显示目录,使读者更容易跳转到他们正 默认情况下,目录中包含 `

` 和 `

` 标题。使用全局 `tableOfContents` 中的 `minHeadingLevel` 和 `maxHeadingLevel` 选项更改要包含的标题级别。通过添加相应的 frontmatter 中的 `tableOfContents` 属性,在单个页面上覆盖这些默认值: - + ```md {4-6} @@ -162,8 +162,8 @@ defineConfig({ 通过将 `tableOfContents` 选项设置为 `false` 来完全禁用目录: - - + + ```md {4} --- diff --git a/docs/src/content/docs/zh-cn/guides/i18n.mdx b/docs/src/content/docs/zh-cn/guides/i18n.mdx index 79d4cd3d95..0e83217b4c 100644 --- a/docs/src/content/docs/zh-cn/guides/i18n.mdx +++ b/docs/src/content/docs/zh-cn/guides/i18n.mdx @@ -143,6 +143,34 @@ Starlight 期望你在所有语言中创建等效的页面。例如,如果你 如果某种语言尚未提供翻译,Starlight 将为读者显示该页面的默认语言(通过 `defaultLocale` 设置)的内容。例如,如果你尚未创建关于你的法语版本,并且你的默认语言是英语,那么访问 `/fr/about` 的访问者将看到来自 `/en/about` 的英语内容,并显示该页面尚未翻译的通知。这有助于你在默认语言中添加内容,然后在翻译人员有时间时逐步翻译它。 +## 翻译网站标题 + +默认情况下,Starlight 会为所有语言使用相同的站点标题。 +如果你需要为每种语言自定义标题,你可以在 Starlight 的选项中将一个对象传递给 [`title`](/zh-cn/reference/configuration/#title-必填): + +```diff lang="js" +// astro.config.mjs +import { defineConfig } from 'astro/config'; +import starlight from '@astrojs/starlight'; + +export default defineConfig({ + integrations: [ + starlight({ +- title: 'My Docs', ++ title: { ++ en: 'My Docs', ++ 'zh-CN': '我的文档', ++ }, + defaultLocale: 'en', + locales: { + en: { label: 'English' }, + 'zh-cn': { label: '简体中文', lang: 'zh-CN' }, + }, + }), + ], +}); +``` + ## 翻译 Starlight 的 UI import LanguagesList from '~/components/languages-list.astro'; diff --git a/docs/src/content/docs/zh-cn/guides/pages.mdx b/docs/src/content/docs/zh-cn/guides/pages.mdx index 0298dc6119..2d15d5f1ca 100644 --- a/docs/src/content/docs/zh-cn/guides/pages.mdx +++ b/docs/src/content/docs/zh-cn/guides/pages.mdx @@ -107,6 +107,7 @@ import CustomComponent from './CustomComponent.astro'; - [`slug`](/zh-cn/reference/frontmatter/#slug) 属性不受支持,并且会根据自定义页面的 URL 自动设置。 - [`editUrl`](/zh-cn/reference/frontmatter/#editurl) 选项需要一个 URL 来显示编辑链接。 - 用于自定义页面如何在 [自动生成的链接组](/zh-cn/reference/configuration/#sidebar) 中显示的 [`sidebar`](/zh-cn/reference/frontmatter/#sidebar) frontmatter 属性不可用。使用 `` 组件的页面不是集合的一部分,不能添加到自动生成的侧边栏组中。 +- [`draft`](/zh-cn/reference/frontmatter/#draft) 选项仅会显示页面为草稿的 [通知](/zh-cn/reference/overrides/#draftcontentnotice),但不会自动将其从生产版本中排除。 ##### `sidebar` diff --git a/docs/src/content/docs/zh-cn/reference/configuration.mdx b/docs/src/content/docs/zh-cn/reference/configuration.mdx index 8e3b3ce6bd..6bb7641843 100644 --- a/docs/src/content/docs/zh-cn/reference/configuration.mdx +++ b/docs/src/content/docs/zh-cn/reference/configuration.mdx @@ -25,10 +25,22 @@ export default defineConfig({ ### `title` (必填) -**类型:** `string` +**类型:** `string | Record` 设置你的网站标题。将用于元数据和浏览器标签标题。 +这个值可以是一个字符串,或者对于多语言网站,可以是一个包含每种不同语言值的对象。 +当使用对象形式时,键必须是 BCP-47 标签(例如 `en`,`ar` 或 `zh-CN`): + +```ts +starlight({ + title: { + en: 'My delightful docs site', + de: 'Meine bezaubernde Dokumentationsseite', + }, +}); +``` + ### `description` **类型:** `string` diff --git a/docs/src/content/docs/zh-cn/reference/frontmatter.md b/docs/src/content/docs/zh-cn/reference/frontmatter.md index c7d37556b3..408cc689cc 100644 --- a/docs/src/content/docs/zh-cn/reference/frontmatter.md +++ b/docs/src/content/docs/zh-cn/reference/frontmatter.md @@ -267,6 +267,21 @@ pagefind: false --- ``` +### `draft` + +**类型:** `boolean` +**默认值:** `false` + +设置此页面是否应被视为草稿,并且不包含在 [生产版本](https://docs.astro.build/zh-cn/reference/cli-reference/#astro-build) 和 [自动生成的链接组](/zh-cn/guides/sidebar/#自动生成的分组) 中。设置为 `true` 可将页面标记为草稿,并使其仅在开发过程中可见。 + +```md +--- +# src/content/docs/example.md +# 从生产版本中排除此页面 +draft: true +--- +``` + ### `sidebar` **类型:** [`SidebarConfig`](#sidebarconfig) diff --git a/docs/src/content/docs/zh-cn/reference/overrides.md b/docs/src/content/docs/zh-cn/reference/overrides.md index 4769f656a7..aebbc401db 100644 --- a/docs/src/content/docs/zh-cn/reference/overrides.md +++ b/docs/src/content/docs/zh-cn/reference/overrides.md @@ -50,6 +50,12 @@ Starlight 会将以下参数传递给你的自定义组件。 当前语言的根路径。对于默认语言来说是 `undefined`。 +#### `siteTitle` + +**类型:** `string` + +根据页面语言设置的网站标题。 + #### `slug` **类型:** `string` @@ -218,7 +224,7 @@ entry: { **默认组件:** [`Header.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/Header.astro) 在每个页面顶部显示的导航栏组件。 -默认实现显示了 [``](#sitetitle)、[``](#search)、[``](#socialicons)、[``](#themeselect) 和 [``](#languageselect)。 +默认实现显示了 [``](#sitetitle-1)、[``](#search)、[``](#socialicons)、[``](#themeselect) 和 [``](#languageselect)。 #### `SiteTitle` @@ -332,6 +338,12 @@ Starlight 的页面侧边栏负责显示当前页面的子标题的目录。 自定义实现应确保在 `

` 元素上设置 `id="_top"`,就像默认实现中一样。 +#### `DraftContentNotice` + +**默认组件:** [`DraftContentNotice.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/DraftContentNotice.astro) + +在开发过程中,当当前页面被标记为草稿时,向用户显示的通知。 + #### `FallbackContentNotice` **默认组件:** [`FallbackContentNotice.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/FallbackContentNotice.astro) diff --git a/docs/src/content/docs/zh-cn/resources/community-content.mdx b/docs/src/content/docs/zh-cn/resources/community-content.mdx index 78b4365af2..37fbbe3915 100644 --- a/docs/src/content/docs/zh-cn/resources/community-content.mdx +++ b/docs/src/content/docs/zh-cn/resources/community-content.mdx @@ -124,5 +124,10 @@ import YouTubeGrid from '~/components/youtube-grid.astro'; title: 'Astro Starlight 文档模板(构建自定义 app 文档!)', description: '在大约 5 分钟内启动并运行新的 Starlight 网站', }, + { + href: 'https://www.youtube.com/watch?v=12o7WxjAxjM', + title: '使用代理将 Starlight 文档包含在 Next.js 项目中', + description: '将 Starlight 设置为 Next.js 网站内的子目录项目', + }, ]} /> diff --git a/examples/basics/package.json b/examples/basics/package.json index fcd05dc460..46f4e03b48 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/starlight": "^0.22.1", + "@astrojs/starlight": "^0.22.2", "astro": "^4.4.5", "sharp": "^0.32.5" } diff --git a/examples/tailwind/package.json b/examples/tailwind/package.json index 9ed0026d8c..e924e247ee 100644 --- a/examples/tailwind/package.json +++ b/examples/tailwind/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/starlight": "^0.22.1", + "@astrojs/starlight": "^0.22.2", "@astrojs/starlight-tailwind": "^2.0.2", "@astrojs/tailwind": "^5.1.0", "astro": "^4.4.5", diff --git a/package.json b/package.json index f428f76463..d6bbb2d749 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,11 @@ "size": "size-limit", "version": "pnpm changeset version && pnpm i --no-frozen-lockfile", "format": "prettier -w --cache --plugin prettier-plugin-astro .", - "typecheck": "tsc -p tsconfig.typecheck.json" + "typecheck": "astro check" }, "license": "MIT", "devDependencies": { + "@astrojs/check": "^0.5.10", "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.1", "@size-limit/file": "^8.2.4", diff --git a/packages/starlight/404.astro b/packages/starlight/404.astro index 7a88177d97..15cabd6a23 100644 --- a/packages/starlight/404.astro +++ b/packages/starlight/404.astro @@ -31,6 +31,7 @@ const fallbackEntry: StarlightDocsEntry = { hero: { tagline: t('404.text'), actions: [] }, pagefind: false, sidebar: { hidden: false, attrs: {} }, + draft: false, }, render: async () => ({ Content: EmptyContent, diff --git a/packages/starlight/CHANGELOG.md b/packages/starlight/CHANGELOG.md index 679eff5ed2..6865e5a892 100644 --- a/packages/starlight/CHANGELOG.md +++ b/packages/starlight/CHANGELOG.md @@ -1,5 +1,13 @@ # @astrojs/starlight +## 0.22.2 + +### Patch Changes + +- [#1811](https://github.com/withastro/starlight/pull/1811) [`fe06aa13`](https://github.com/withastro/starlight/commit/fe06aa1307208ef9f5b249181ec29837f96940c2) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes a `` sync issue when inconsistently using the `icon` prop or not on `` components. + +- [#1826](https://github.com/withastro/starlight/pull/1826) [`52ea7381`](https://github.com/withastro/starlight/commit/52ea7381e131338a03cffb3499ba1699951cea1e) Thanks [@dragomano](https://github.com/dragomano)! - Updates Russian UI translations + ## 0.22.1 ### Patch Changes diff --git a/packages/starlight/__e2e__/fixtures/basics/src/content/docs/tabs.mdx b/packages/starlight/__e2e__/fixtures/basics/src/content/docs/tabs.mdx index 17e643a613..c01ba8c12f 100644 --- a/packages/starlight/__e2e__/fixtures/basics/src/content/docs/tabs.mdx +++ b/packages/starlight/__e2e__/fixtures/basics/src/content/docs/tabs.mdx @@ -35,3 +35,20 @@ A set of tabs using the `style` sync key. css code tailwind code + +Another set of tabs using the `pkg` sync key and using icons. + + + + another npm command + + + another pnpm command + + + another bun command + + + another yarn command + + diff --git a/packages/starlight/__e2e__/tabs.test.ts b/packages/starlight/__e2e__/tabs.test.ts index e0a36ed536..f10f79729a 100644 --- a/packages/starlight/__e2e__/tabs.test.ts +++ b/packages/starlight/__e2e__/tabs.test.ts @@ -116,6 +116,29 @@ test('preserves tabs position when alternating between tabs with different conte expect((await tabs.boundingBox())?.y).toBe(initialBoundingBox?.y); }); +test('syncs tabs with the same sync key if they do not consistenly use icons', async ({ + page, + starlight, +}) => { + await starlight.goto('/tabs'); + + const tabs = page.locator('starlight-tabs'); + const pkgTabsA = tabs.nth(0); // This set does not use icons for tab items. + const pkgTabsB = tabs.nth(4); // This set uses icons for tab items. + + // Select the pnpm tab in the first set of synced tabs. + await pkgTabsA.getByRole('tab').filter({ hasText: 'pnpm' }).click(); + + await expectSelectedTab(pkgTabsA, 'pnpm', 'pnpm command'); + await expectSelectedTab(pkgTabsB, 'pnpm', 'another pnpm command'); + + // Select the yarn tab in the second set of synced tabs. + await pkgTabsB.getByRole('tab').filter({ hasText: 'yarn' }).click(); + + await expectSelectedTab(pkgTabsB, 'yarn', 'another yarn command'); + await expectSelectedTab(pkgTabsA, 'yarn', 'yarn command'); +}); + async function expectSelectedTab(tabs: Locator, label: string, panel: string) { expect((await tabs.getByRole('tab', { selected: true }).textContent())?.trim()).toBe(label); expect((await tabs.getByRole('tabpanel').textContent())?.trim()).toBe(panel); diff --git a/packages/starlight/__tests__/basics/base.test.ts b/packages/starlight/__tests__/basics/base.test.ts index ab8fd173a0..72cabe6539 100644 --- a/packages/starlight/__tests__/basics/base.test.ts +++ b/packages/starlight/__tests__/basics/base.test.ts @@ -11,14 +11,21 @@ describe('fileWithBase()', () => { }); }); - // TODO: Stubbing BASE_URL is not currently possible. - // Astro controls BASE_URL via its `vite-plugin-env`, which prevents Vitest’s stubbing from - // working and there’s also no way to pass in Astro config in Astro’s `getViteConfig` helper. - describe.todo('with base', () => { - test('prepends base', () => { + describe('with base', () => { + test('prepends base', async () => { + // Reset the modules registry so that re-importing `../../utils/base` re-evaluates the module + // and re-computes the base. Re-importing the module is necessary because top-level imports + // cannot be re-evaluated. + vi.resetModules(); + // Set the base URL. vi.stubEnv('BASE_URL', '/base/'); + // Re-import the module to re-evaluate it. + const { fileWithBase } = await import('../../utils/base'); + expect(fileWithBase('/img.svg')).toBe('/base/img.svg'); + vi.unstubAllEnvs(); + vi.resetModules(); }); }); }); @@ -33,5 +40,17 @@ describe('pathWithBase()', () => { }); }); - describe.todo('with base'); + describe('with base', () => { + test('prepends base', async () => { + // See the first test with a base in this file for an explanation of the environment stubbing. + vi.resetModules(); + vi.stubEnv('BASE_URL', '/base/'); + const { pathWithBase } = await import('../../utils/base'); + + expect(pathWithBase('/path/')).toBe('/base/path/'); + + vi.unstubAllEnvs(); + vi.resetModules(); + }); + }); }); diff --git a/packages/starlight/__tests__/basics/slugs.test.ts b/packages/starlight/__tests__/basics/slugs.test.ts index 6b7c9bd16b..a3f8f3992c 100644 --- a/packages/starlight/__tests__/basics/slugs.test.ts +++ b/packages/starlight/__tests__/basics/slugs.test.ts @@ -95,10 +95,7 @@ describe('urlToSlug', () => { ); }); - // It is currently not possible to test this as stubbing BASE_URL is not supported due to - // `vite-plugin-env` controlling it and the lack of a way to pass in an Astro config using - // `getViteConfig()` from `astro/config`. - test.todo('returns slugs with a custom `base` option', () => { + test('returns slugs with a custom `base` option', () => { vi.stubEnv('BASE_URL', '/base/'); expect(urlToSlug(new URL('https://example.com/base'))).toBe(''); expect(urlToSlug(new URL('https://example.com/base/slug'))).toBe('slug'); diff --git a/packages/starlight/__tests__/remark-rehype/rehype-steps.test.ts b/packages/starlight/__tests__/remark-rehype/rehype-steps.test.ts index d97f7db8e1..36f4082c5b 100644 --- a/packages/starlight/__tests__/remark-rehype/rehype-steps.test.ts +++ b/packages/starlight/__tests__/remark-rehype/rehype-steps.test.ts @@ -29,16 +29,36 @@ test('component with non-`
    ` content throws an error', () => { "[AstroUserError]: The \`\` component expects its content to be a single ordered list (\`
      \`) but found the following element: \`

      \`. Hint: - To learn more about the \`\` component, see https://starlight.astro.build/guides/components/#steps" + To learn more about the \`\` component, see https://starlight.astro.build/guides/components/#steps + + Full HTML passed to \`\`: + +

      A paragraph is not an ordered list

      + " `); }); test('component with multiple children throws an error', () => { - expect(() => processSteps('
          ')).toThrowErrorMatchingInlineSnapshot(` + expect(() => + processSteps( + '
          1. List item

          I intended this to be part of the same list item

          1. Other list item
          ' + ) + ).toThrowErrorMatchingInlineSnapshot(` "[AstroUserError]: - The \`\` component expects its content to be a single ordered list (\`
            \`) but found multiple child elements: \`
              \`, \`
                \`. + The \`\` component expects its content to be a single ordered list (\`
                  \`) but found multiple child elements: \`
                    \`, \`

                    \`, \`

                      \`. Hint: - To learn more about the \`\` component, see https://starlight.astro.build/guides/components/#steps" + To learn more about the \`\` component, see https://starlight.astro.build/guides/components/#steps + + Full HTML passed to \`\`: + +
                        +
                      1. List item
                      2. +
                      +

                      I intended this to be part of the same list item

                      +
                        +
                      1. Other list item
                      2. +
                      + " `); }); diff --git a/packages/starlight/components/CallToAction.astro b/packages/starlight/components/CallToAction.astro index 591ffab086..551c64ea75 100644 --- a/packages/starlight/components/CallToAction.astro +++ b/packages/starlight/components/CallToAction.astro @@ -7,7 +7,7 @@ interface Props { variant: 'primary' | 'secondary' | 'minimal'; link: string; icon?: undefined | { type: 'icon'; name: keyof typeof Icons } | { type: 'raw'; html: string }; - attrs?: Omit, 'href'>; + attrs?: Omit, 'href'> | undefined; } const { link, variant, icon } = Astro.props; diff --git a/packages/starlight/integrations/expressive-code/index.ts b/packages/starlight/integrations/expressive-code/index.ts index fc9962f867..c3fd38546b 100644 --- a/packages/starlight/integrations/expressive-code/index.ts +++ b/packages/starlight/integrations/expressive-code/index.ts @@ -1,9 +1,9 @@ import { astroExpressiveCode, type AstroExpressiveCodeOptions, - addClassName, type CustomConfigPreprocessors, } from 'astro-expressive-code'; +import { addClassName } from 'astro-expressive-code/hast'; import type { AstroIntegration } from 'astro'; import type { StarlightConfig } from '../../types'; import type { createTranslationSystemFromFs } from '../../utils/translations-fs'; diff --git a/packages/starlight/package.json b/packages/starlight/package.json index f741e39bf1..61d2ef134b 100644 --- a/packages/starlight/package.json +++ b/packages/starlight/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/starlight", - "version": "0.22.1", + "version": "0.22.2", "description": "Build beautiful, high-performance documentation websites with Astro", "scripts": { "test": "vitest", @@ -206,6 +206,7 @@ "mdast-util-to-markdown": "^2.1.0", "pagefind": "^1.0.3", "rehype": "^13.0.1", + "rehype-format": "^5.0.0", "remark-directive": "^3.0.0", "unified": "^11.0.4", "unist-util-visit": "^5.0.0", diff --git a/packages/starlight/translations/ru.json b/packages/starlight/translations/ru.json index ec32905577..73b2d0c340 100644 --- a/packages/starlight/translations/ru.json +++ b/packages/starlight/translations/ru.json @@ -18,10 +18,10 @@ "page.lastUpdated": "Последнее обновление:", "page.previousLink": "Предыдущая", "page.nextLink": "Следующая", - "page.draft": "This content is a draft and will not be included in production builds.", + "page.draft": "Этот контент является черновиком и не будет добавлен в производственные сборки.", "404.text": "Страница не найдена. Проверьте URL или используйте поиск по сайту.", "aside.note": "Заметка", - "aside.tip": "Знали ли вы?", + "aside.tip": "Совет", "aside.caution": "Осторожно", "aside.danger": "Опасно", "fileTree.directory": "Директория", diff --git a/packages/starlight/user-components/Tabs.astro b/packages/starlight/user-components/Tabs.astro index 376fb19c93..f93475c17b 100644 --- a/packages/starlight/user-components/Tabs.astro +++ b/packages/starlight/user-components/Tabs.astro @@ -158,7 +158,7 @@ const { html, panels } = processPanels(panelHtml); newTab.setAttribute('aria-selected', 'true'); if (shouldSync) { newTab.focus(); - StarlightTabs.#syncTabs(this, newTab.textContent); + StarlightTabs.#syncTabs(this, newTab.innerText); window.scrollTo({ top: window.scrollY + (this.getBoundingClientRect().top - previousTabsOffset), }); @@ -173,7 +173,7 @@ const { html, panels } = processPanels(panelHtml); for (const receiver of syncedTabs) { if (receiver === emitter) continue; - const labelIndex = receiver.tabs.findIndex((tab) => tab.textContent === label); + const labelIndex = receiver.tabs.findIndex((tab) => tab.innerText === label); if (labelIndex === -1) continue; receiver.switchTab(receiver.tabs[labelIndex], labelIndex, false); } diff --git a/packages/starlight/user-components/rehype-steps.ts b/packages/starlight/user-components/rehype-steps.ts index dd912ced7b..ff9c9593f8 100644 --- a/packages/starlight/user-components/rehype-steps.ts +++ b/packages/starlight/user-components/rehype-steps.ts @@ -1,11 +1,17 @@ import { AstroError } from 'astro/errors'; import type { Element, Root } from 'hast'; import { rehype } from 'rehype'; +import rehypeFormat from 'rehype-format'; +import type { VFile } from 'vfile'; + +const prettyPrintProcessor = rehype().data('settings', { fragment: true }).use(rehypeFormat); +const prettyPrintHtml = (html: string) => + prettyPrintProcessor.processSync({ value: html }).toString(); const stepsProcessor = rehype() .data('settings', { fragment: true }) .use(function steps() { - return (tree: Root) => { + return (tree: Root, vfile: VFile) => { const rootElements = tree.children.filter((item): item is Element => item.type === 'element'); const [rootElement] = rootElements; @@ -17,12 +23,14 @@ const stepsProcessor = rehype() throw new StepsError( 'The `` component expects its content to be a single ordered list (`
                        `) but found multiple child elements: ' + rootElements.map((element: Element) => `\`<${element.tagName}>\``).join(', ') + - '.' + '.', + vfile.value.toString() ); } else if (rootElement.tagName !== 'ol') { throw new StepsError( 'The `` component expects its content to be a single ordered list (`
                          `) but found the following element: ' + - `\`<${rootElement.tagName}>\`.` + `\`<${rootElement.tagName}>\`.`, + vfile.value.toString() ); } @@ -49,10 +57,12 @@ export const processSteps = (html: string | undefined) => { }; class StepsError extends AstroError { - constructor(message: string) { - super( - message, - 'To learn more about the `` component, see https://starlight.astro.build/guides/components/#steps' - ); + constructor(message: string, html?: string) { + let hint = + 'To learn more about the `` component, see https://starlight.astro.build/guides/components/#steps'; + if (html) { + hint += '\n\nFull HTML passed to ``:\n' + prettyPrintHtml(html); + } + super(message, hint); } } diff --git a/packages/tailwind/__tests__/tailwind.test.ts b/packages/tailwind/__tests__/tailwind.test.ts index a0c129ca56..f00ce1f59c 100644 --- a/packages/tailwind/__tests__/tailwind.test.ts +++ b/packages/tailwind/__tests__/tailwind.test.ts @@ -5,12 +5,12 @@ import { test, expect, describe, vi } from 'vitest'; import StarlightTailwindPlugin from '..'; /** Generate a CSS string based on the passed CSS and HTML content. */ -const generatePluginCss = ({ +const generatePluginCss = async ({ css = '@tailwind base;', html = '', config = {}, }: { css?: string; html?: string; config?: Partial } = {}): Promise => { - return postcss( + const result = await postcss( tailwindcss({ // Enable Starlight plugin. plugins: [StarlightTailwindPlugin()], @@ -19,9 +19,8 @@ const generatePluginCss = ({ // Spread in any custom Tailwind config. ...config, }) - ) - .process(css, { from: '' }) - .then((result) => result.css); + ).process(css, { from: '' }); + return result.css; }; describe('@tailwind base;', async () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6ed68334e..7b8892c493 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@astrojs/check': + specifier: ^0.5.10 + version: 0.5.10(prettier-plugin-astro@0.13.0)(prettier@3.0.0)(typescript@5.4.5) '@changesets/changelog-github': specifier: ^0.4.8 version: 0.4.8 @@ -70,7 +73,7 @@ importers: examples/basics: dependencies: '@astrojs/starlight': - specifier: ^0.22.1 + specifier: ^0.22.2 version: link:../../packages/starlight astro: specifier: ^4.4.5 @@ -82,7 +85,7 @@ importers: examples/tailwind: dependencies: '@astrojs/starlight': - specifier: ^0.22.1 + specifier: ^0.22.2 version: link:../../packages/starlight '@astrojs/starlight-tailwind': specifier: ^2.0.2 @@ -172,6 +175,9 @@ importers: rehype: specifier: ^13.0.1 version: 13.0.1 + rehype-format: + specifier: ^5.0.0 + version: 5.0.0 remark-directive: specifier: ^3.0.0 version: 3.0.0 @@ -392,6 +398,23 @@ packages: lite-youtube-embed: 0.2.0 dev: false + /@astrojs/check@0.5.10(prettier-plugin-astro@0.13.0)(prettier@3.0.0)(typescript@5.4.5): + resolution: {integrity: sha512-vliHXM9cu/viGeKiksUM4mXfO816ohWtawTl2ADPgTsd4nUMjFiyAl7xFZhF34yy4hq4qf7jvK1F2PlR3b5I5w==} + hasBin: true + peerDependencies: + typescript: ^5.0.0 + dependencies: + '@astrojs/language-server': 2.8.4(prettier-plugin-astro@0.13.0)(prettier@3.0.0)(typescript@5.4.5) + chokidar: 3.5.3 + fast-glob: 3.3.2 + kleur: 4.1.5 + typescript: 5.4.5 + yargs: 17.7.2 + transitivePeerDependencies: + - prettier + - prettier-plugin-astro + dev: true + /@astrojs/compiler@1.8.0: resolution: {integrity: sha512-E0TI/uyO8n+IPSZ4Fvl9Lne8JKEasR6ZMGvE2G096oTWOXSsPAhRs2LomV3z+/VRepo2h+t/SdVo54wox4eJwA==} dev: true @@ -399,9 +422,47 @@ packages: /@astrojs/compiler@2.5.3: resolution: {integrity: sha512-jzj01BRv/fmo+9Mr2FhocywGzEYiyiP2GVHje1ziGNU6c97kwhYGsnvwMkHrncAy9T9Vi54cjaMK7UE4ClX4vA==} + /@astrojs/compiler@2.8.0: + resolution: {integrity: sha512-yrpD1WRGqsJwANaDIdtHo+YVjvIOFAjC83lu5qENIgrafwZcJgSXDuwVMXOgok4tFzpeKLsFQ6c3FoUdloLWBQ==} + dev: true + /@astrojs/internal-helpers@0.2.1: resolution: {integrity: sha512-06DD2ZnItMwUnH81LBLco3tWjcZ1lGU9rLCCBaeUCGYe9cI0wKyY2W3kDyoW1I6GmcWgt1fu+D1CTvz+FIKf8A==} + /@astrojs/language-server@2.8.4(prettier-plugin-astro@0.13.0)(prettier@3.0.0)(typescript@5.4.5): + resolution: {integrity: sha512-sJH5vGTBkhgA8+hdhzX78UUp4cFz4Mt7xkEkevD188OS5bDMkaue6hK+dtXWM47mnrXFveXA2u38K7S+5+IRjA==} + hasBin: true + peerDependencies: + prettier: ^3.0.0 + prettier-plugin-astro: '>=0.11.0' + peerDependenciesMeta: + prettier: + optional: true + prettier-plugin-astro: + optional: true + dependencies: + '@astrojs/compiler': 2.8.0 + '@jridgewell/sourcemap-codec': 1.4.15 + '@volar/kit': 2.1.6(typescript@5.4.5) + '@volar/language-core': 2.1.6 + '@volar/language-server': 2.1.6 + '@volar/language-service': 2.1.6 + '@volar/typescript': 2.1.6 + fast-glob: 3.3.2 + prettier: 3.0.0 + prettier-plugin-astro: 0.13.0 + volar-service-css: 0.0.34(@volar/language-service@2.1.6) + volar-service-emmet: 0.0.34(@volar/language-service@2.1.6) + volar-service-html: 0.0.34(@volar/language-service@2.1.6) + volar-service-prettier: 0.0.34(@volar/language-service@2.1.6)(prettier@3.0.0) + volar-service-typescript: 0.0.34(@volar/language-service@2.1.6) + volar-service-typescript-twoslash-queries: 0.0.34(@volar/language-service@2.1.6) + vscode-html-languageservice: 5.2.0 + vscode-uri: 3.0.8 + transitivePeerDependencies: + - typescript + dev: true + /@astrojs/markdown-remark@4.2.1: resolution: {integrity: sha512-2RQBIwrq+2qPYtp99bH+eL5hfbK0BoxXla85lHsRpIX/IsGqFrPX6pXI2cbWPihBwGbKCdxS6uZNX2QerZWwpQ==} dependencies: @@ -961,6 +1022,22 @@ packages: - '@algolia/client-search' dev: false + /@emmetio/abbreviation@2.3.3: + resolution: {integrity: sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA==} + dependencies: + '@emmetio/scanner': 1.0.4 + dev: true + + /@emmetio/css-abbreviation@2.1.8: + resolution: {integrity: sha512-s9yjhJ6saOO/uk1V74eifykk2CBYi01STTK3WlXWGOepyKa23ymJ053+DNQjpFcy1ingpaO7AxCcwLvHFY9tuw==} + dependencies: + '@emmetio/scanner': 1.0.4 + dev: true + + /@emmetio/scanner@1.0.4: + resolution: {integrity: sha512-IqRuJtQff7YHHBk4G8YZ45uB9BaAGcwQeVzgj/zj8/UdOhtQpEIupUhSk8dys6spFIWVZVeK20CzGEnqR5SbqA==} + dev: true + /@esbuild/aix-ppc64@0.19.12: resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} engines: {node: '>=12'} @@ -1912,6 +1989,88 @@ packages: pretty-format: 29.7.0 dev: true + /@volar/kit@2.1.6(typescript@5.4.5): + resolution: {integrity: sha512-dSuXChDGM0nSG/0fxqlNfadjpAeeo1P1SJPBQ+pDf8H1XrqeJq5gIhxRTEbiS+dyNIG69ATq1CArkbCif+oxJw==} + peerDependencies: + typescript: '*' + dependencies: + '@volar/language-service': 2.1.6 + '@volar/typescript': 2.1.6 + typesafe-path: 0.2.2 + typescript: 5.4.5 + vscode-languageserver-textdocument: 1.0.11 + vscode-uri: 3.0.8 + dev: true + + /@volar/language-core@2.1.6: + resolution: {integrity: sha512-pAlMCGX/HatBSiDFMdMyqUshkbwWbLxpN/RL7HCQDOo2gYBE+uS+nanosLc1qR6pTQ/U8q00xt8bdrrAFPSC0A==} + dependencies: + '@volar/source-map': 2.1.6 + dev: true + + /@volar/language-server@2.1.6: + resolution: {integrity: sha512-0w+FV8ro37hVb3qE4ONo3VbS5kEQXv4H/D2xCePyY5dRw6XnbJAPFNKvoxI9mxHTPonvIG1si5rN9MSGSKtgZQ==} + dependencies: + '@volar/language-core': 2.1.6 + '@volar/language-service': 2.1.6 + '@volar/snapshot-document': 2.1.6 + '@volar/typescript': 2.1.6 + '@vscode/l10n': 0.0.16 + path-browserify: 1.0.1 + request-light: 0.7.0 + vscode-languageserver: 9.0.1 + vscode-languageserver-protocol: 3.17.5 + vscode-languageserver-textdocument: 1.0.11 + vscode-uri: 3.0.8 + dev: true + + /@volar/language-service@2.1.6: + resolution: {integrity: sha512-1OpbbPQ6wUIumwMP5r45y8utVEmvq1n6BC8JHqGKsuFr9RGFIldDBlvA/xuO3MDKhjmmPGPHKb54kg1/YN78ow==} + dependencies: + '@volar/language-core': 2.1.6 + vscode-languageserver-protocol: 3.17.5 + vscode-languageserver-textdocument: 1.0.11 + vscode-uri: 3.0.8 + dev: true + + /@volar/snapshot-document@2.1.6: + resolution: {integrity: sha512-YNYk1sCOrGg7VHbZM+1It97q0GWhFxdqIwnxSNFoL0X1LuSRXoCT2DRb/aa1J6aBpPMbKqSFUWHGQEAFUnc4Zw==} + dependencies: + vscode-languageserver-protocol: 3.17.5 + vscode-languageserver-textdocument: 1.0.11 + dev: true + + /@volar/source-map@2.1.6: + resolution: {integrity: sha512-TeyH8pHHonRCHYI91J7fWUoxi0zWV8whZTVRlsWHSYfjm58Blalkf9LrZ+pj6OiverPTmrHRkBsG17ScQyWECw==} + dependencies: + muggle-string: 0.4.1 + dev: true + + /@volar/typescript@2.1.6: + resolution: {integrity: sha512-JgPGhORHqXuyC3r6skPmPHIZj4LoMmGlYErFTuPNBq9Nhc9VTv7ctHY7A3jMN3ngKEfRrfnUcwXHztvdSQqNfw==} + dependencies: + '@volar/language-core': 2.1.6 + path-browserify: 1.0.1 + dev: true + + /@vscode/emmet-helper@2.9.3: + resolution: {integrity: sha512-rB39LHWWPQYYlYfpv9qCoZOVioPCftKXXqrsyqN1mTWZM6dTnONT63Db+03vgrBbHzJN45IrgS/AGxw9iiqfEw==} + dependencies: + emmet: 2.4.7 + jsonc-parser: 2.3.1 + vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-types: 3.17.5 + vscode-uri: 2.1.2 + dev: true + + /@vscode/l10n@0.0.16: + resolution: {integrity: sha512-JT5CvrIYYCrmB+dCana8sUqJEcGB1ZDXNLMQ2+42bW995WmNoenijWMUdZfwmuQUTQcEVVIa2OecZzTYWUW9Cg==} + dev: true + + /@vscode/l10n@0.0.18: + resolution: {integrity: sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==} + dev: true + /abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} dev: true @@ -2860,6 +3019,13 @@ packages: /electron-to-chromium@1.4.543: resolution: {integrity: sha512-t2ZP4AcGE0iKCCQCBx/K2426crYdxD3YU6l0uK2EO3FZH0pbC4pFz/sZm2ruZsND6hQBTcDWWlo/MLpiOdif5g==} + /emmet@2.4.7: + resolution: {integrity: sha512-O5O5QNqtdlnQM2bmKHtJgyChcrFMgQuulI+WdiOw2NArzprUqqxUW6bgYtKvzKgrsYpuLWalOkdhNP+1jluhCA==} + dependencies: + '@emmetio/abbreviation': 2.3.3 + '@emmetio/css-abbreviation': 2.1.8 + dev: true + /emoji-regex@10.3.0: resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} @@ -3534,6 +3700,13 @@ packages: dependencies: function-bind: 1.1.2 + /hast-util-embedded@3.0.0: + resolution: {integrity: sha512-naH8sld4Pe2ep03qqULEtvYr7EjrLK2QHY8KJR6RJkTUjPGObe1vnx585uzem2hGra+s1q08DZZpfgDVYRbaXA==} + dependencies: + '@types/hast': 3.0.3 + hast-util-is-element: 3.0.0 + dev: false + /hast-util-from-html@2.0.1: resolution: {integrity: sha512-RXQBLMl9kjKVNkJTIO6bZyb2n+cUH8LFaSSzo82jiLT6Tfc+Pt7VQCS+/h3YwG4jaNE2TA2sdJisGWR+aJrp0g==} dependencies: @@ -3561,6 +3734,12 @@ packages: dependencies: '@types/hast': 3.0.3 + /hast-util-is-body-ok-link@3.0.0: + resolution: {integrity: sha512-VFHY5bo2nY8HiV6nir2ynmEB1XkxzuUffhEGeVx7orbu/B1KaGyeGgMZldvMVx5xWrDlLLG/kQ6YkJAMkBEx0w==} + dependencies: + '@types/hast': 3.0.3 + dev: false + /hast-util-is-element@3.0.0: resolution: {integrity: sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==} dependencies: @@ -3572,6 +3751,16 @@ packages: dependencies: '@types/hast': 3.0.3 + /hast-util-phrasing@3.0.1: + resolution: {integrity: sha512-6h60VfI3uBQUxHqTyMymMZnEbNl1XmEGtOxxKYL7stY2o601COo62AWAYBQR9lZbYXYSBoxag8UpPRXK+9fqSQ==} + dependencies: + '@types/hast': 3.0.3 + hast-util-embedded: 3.0.0 + hast-util-has-property: 3.0.0 + hast-util-is-body-ok-link: 3.0.0 + hast-util-is-element: 3.0.0 + dev: false + /hast-util-raw@9.0.1: resolution: {integrity: sha512-5m1gmba658Q+lO5uqL5YNGQWeh1MYWZbZmWrM5lncdcuiXuo5E2HT/CIOp0rLF8ksfSwiCVJ3twlgVRyTGThGA==} dependencies: @@ -3765,6 +3954,10 @@ packages: /html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + /html-whitespace-sensitive-tag-names@3.0.0: + resolution: {integrity: sha512-KlClZ3/Qy5UgvpvVvDomGhnQhNWH5INE8GwvSIQ9CWt1K0zbbXrl7eN5bWaafOZgtmO3jMPwUqmrmEwinhPq1w==} + dev: false + /html_codesniffer@2.5.1: resolution: {integrity: sha512-vcz0yAaX/OaV6sdNHuT9alBOKkSxYb8h5Yq26dUqgi7XmCgGUSa7U9PiY1PBXQFMjKv1wVPs5/QzHlGuxPDUGg==} engines: {node: '>=6'} @@ -4174,6 +4367,10 @@ packages: engines: {node: '>=6'} hasBin: true + /jsonc-parser@2.3.1: + resolution: {integrity: sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==} + dev: true + /jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true @@ -4960,6 +5157,10 @@ packages: /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + /muggle-string@0.4.1: + resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + dev: true + /mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} dependencies: @@ -5304,6 +5505,10 @@ packages: dependencies: entities: 4.5.0 + /path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: true + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -5746,6 +5951,29 @@ packages: expressive-code: 0.35.2 dev: false + /rehype-format@5.0.0: + resolution: {integrity: sha512-kM4II8krCHmUhxrlvzFSptvaWh280Fr7UGNJU5DCMuvmAwGCNmGfi9CvFAQK6JDjsNoRMWQStglK3zKJH685Wg==} + dependencies: + '@types/hast': 3.0.3 + hast-util-embedded: 3.0.0 + hast-util-is-element: 3.0.0 + hast-util-phrasing: 3.0.1 + hast-util-whitespace: 3.0.0 + html-whitespace-sensitive-tag-names: 3.0.0 + rehype-minify-whitespace: 6.0.0 + unist-util-visit-parents: 6.0.1 + dev: false + + /rehype-minify-whitespace@6.0.0: + resolution: {integrity: sha512-i9It4YHR0Sf3GsnlR5jFUKXRr9oayvEk9GKQUkwZv6hs70OH9q3OCZrq9PpLvIGKt3W+JxBOxCidNVpH/6rWdA==} + dependencies: + '@types/hast': 3.0.3 + hast-util-embedded: 3.0.0 + hast-util-is-element: 3.0.0 + hast-util-whitespace: 3.0.0 + unist-util-is: 6.0.0 + dev: false + /rehype-parse@9.0.0: resolution: {integrity: sha512-WG7nfvmWWkCR++KEkZevZb/uw41E8TsH4DsY9UxsTbIXCVGbAs4S+r8FrQ+OtH5EEQAs+5UxKC42VinkmpA1Yw==} dependencies: @@ -5841,6 +6069,10 @@ packages: mdast-util-to-markdown: 2.1.0 unified: 11.0.4 + /request-light@0.7.0: + resolution: {integrity: sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q==} + dev: true + /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -6677,6 +6909,16 @@ packages: is-typed-array: 1.1.10 dev: true + /typesafe-path@0.2.2: + resolution: {integrity: sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA==} + dev: true + + /typescript-auto-import-cache@0.3.2: + resolution: {integrity: sha512-+laqe5SFL1vN62FPOOJSUDTZxtgsoOXjneYOXIpx5rQ4UMiN89NAtJLpqLqyebv9fgQ/IMeeTX+mQyRnwvJzvg==} + dependencies: + semver: 7.5.4 + dev: true + /typescript@5.4.5: resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} @@ -7002,6 +7244,147 @@ packages: - terser dev: true + /volar-service-css@0.0.34(@volar/language-service@2.1.6): + resolution: {integrity: sha512-C7ua0j80ZD7bsgALAz/cA1bykPehoIa5n+3+Ccr+YLpj0fypqw9iLUmGLX11CqzqNCO2XFGe/1eXB/c+SWrF/g==} + peerDependencies: + '@volar/language-service': ~2.1.0 + peerDependenciesMeta: + '@volar/language-service': + optional: true + dependencies: + '@volar/language-service': 2.1.6 + vscode-css-languageservice: 6.2.14 + vscode-languageserver-textdocument: 1.0.11 + vscode-uri: 3.0.8 + dev: true + + /volar-service-emmet@0.0.34(@volar/language-service@2.1.6): + resolution: {integrity: sha512-ubQvMCmHPp8Ic82LMPkgrp9ot+u2p/RDd0RyT0EykRkZpWsagHUF5HWkVheLfiMyx2rFuWx/+7qZPOgypx6h6g==} + peerDependencies: + '@volar/language-service': ~2.1.0 + peerDependenciesMeta: + '@volar/language-service': + optional: true + dependencies: + '@volar/language-service': 2.1.6 + '@vscode/emmet-helper': 2.9.3 + vscode-html-languageservice: 5.2.0 + dev: true + + /volar-service-html@0.0.34(@volar/language-service@2.1.6): + resolution: {integrity: sha512-kMEneea1tQbiRcyKavqdrSVt8zV06t+0/3pGkjO3gV6sikXTNShIDkdtB4Tq9vE2cQdM50TuS7utVV7iysUxHw==} + peerDependencies: + '@volar/language-service': ~2.1.0 + peerDependenciesMeta: + '@volar/language-service': + optional: true + dependencies: + '@volar/language-service': 2.1.6 + vscode-html-languageservice: 5.2.0 + vscode-languageserver-textdocument: 1.0.11 + vscode-uri: 3.0.8 + dev: true + + /volar-service-prettier@0.0.34(@volar/language-service@2.1.6)(prettier@3.0.0): + resolution: {integrity: sha512-BNfJ8FwfPi1Wm/JkuzNjraOLdtKieGksNT/bDyquygVawv1QUzO2HB1hiMKfZGdcSFG5ZL9R0j7bBfRTfXA2gg==} + peerDependencies: + '@volar/language-service': ~2.1.0 + prettier: ^2.2 || ^3.0 + peerDependenciesMeta: + '@volar/language-service': + optional: true + prettier: + optional: true + dependencies: + '@volar/language-service': 2.1.6 + prettier: 3.0.0 + vscode-uri: 3.0.8 + dev: true + + /volar-service-typescript-twoslash-queries@0.0.34(@volar/language-service@2.1.6): + resolution: {integrity: sha512-XAY2YtWKUp6ht89gxt3L5Dr46LU45d/VlBkj1KXUwNlinpoWiGN4Nm3B6DRF3VoBThAnQgm4c7WD0S+5yTzh+w==} + peerDependencies: + '@volar/language-service': ~2.1.0 + peerDependenciesMeta: + '@volar/language-service': + optional: true + dependencies: + '@volar/language-service': 2.1.6 + dev: true + + /volar-service-typescript@0.0.34(@volar/language-service@2.1.6): + resolution: {integrity: sha512-NbAry0w8ZXFgGsflvMwmPDCzgJGx3C+eYxFEbldaumkpTAJiywECWiUbPIOfmEHgpOllUKSnhwtLlWFK4YnfQg==} + peerDependencies: + '@volar/language-service': ~2.1.0 + peerDependenciesMeta: + '@volar/language-service': + optional: true + dependencies: + '@volar/language-service': 2.1.6 + path-browserify: 1.0.1 + semver: 7.5.4 + typescript-auto-import-cache: 0.3.2 + vscode-languageserver-textdocument: 1.0.11 + vscode-nls: 5.2.0 + dev: true + + /vscode-css-languageservice@6.2.14: + resolution: {integrity: sha512-5UPQ9Y1sUTnuMyaMBpO7LrBkqjhEJb5eAwdUlDp+Uez8lry+Tspnk3+3p2qWS4LlNsr4p3v9WkZxUf1ltgFpgw==} + dependencies: + '@vscode/l10n': 0.0.18 + vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-types: 3.17.5 + vscode-uri: 3.0.8 + dev: true + + /vscode-html-languageservice@5.2.0: + resolution: {integrity: sha512-cdNMhyw57/SQzgUUGSIMQ66jikqEN6nBNyhx5YuOyj9310+eY9zw8Q0cXpiKzDX8aHYFewQEXRnigl06j/TVwQ==} + dependencies: + '@vscode/l10n': 0.0.18 + vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-types: 3.17.5 + vscode-uri: 3.0.8 + dev: true + + /vscode-jsonrpc@8.2.0: + resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==} + engines: {node: '>=14.0.0'} + dev: true + + /vscode-languageserver-protocol@3.17.5: + resolution: {integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==} + dependencies: + vscode-jsonrpc: 8.2.0 + vscode-languageserver-types: 3.17.5 + dev: true + + /vscode-languageserver-textdocument@1.0.11: + resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==} + dev: true + + /vscode-languageserver-types@3.17.5: + resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==} + dev: true + + /vscode-languageserver@9.0.1: + resolution: {integrity: sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==} + hasBin: true + dependencies: + vscode-languageserver-protocol: 3.17.5 + dev: true + + /vscode-nls@5.2.0: + resolution: {integrity: sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==} + dev: true + + /vscode-uri@2.1.2: + resolution: {integrity: sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==} + dev: true + + /vscode-uri@3.0.8: + resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} + dev: true + /wait-on@7.0.1(debug@4.3.4): resolution: {integrity: sha512-9AnJE9qTjRQOlTZIldAaf/da2eW0eSRSgcqq85mXQja/DW3MriHxkpODDSUEg+Gri/rKEcXUZHe+cevvYItaog==} engines: {node: '>=12.0.0'} diff --git a/tsconfig.typecheck.json b/tsconfig.typecheck.json deleted file mode 100644 index 1327de7776..0000000000 --- a/tsconfig.typecheck.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["**/dist/**", "**/__coverage__/**", "packages/starlight/components.ts"] -}