From b012c45cf927b2d2f203c670270a0dbbfb35ad3e Mon Sep 17 00:00:00 2001 From: Avraj Date: Tue, 8 Aug 2023 01:29:35 +0300 Subject: [PATCH 1/5] Add site to community project showcase (#463) --- docs/src/content/docs/showcase.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/content/docs/showcase.md b/docs/src/content/docs/showcase.md index 3ee4362ff13..aaf61830517 100644 --- a/docs/src/content/docs/showcase.md +++ b/docs/src/content/docs/showcase.md @@ -23,6 +23,7 @@ Starlight is already being used in production. These are some of the sites aroun - [xs-dev docs](https://xs-dev.js.org) - [Athena OS](https://www.athenaos.org) - [simple-fm](https://simple.arciniega.one) +- [CommandKit](https://commandkit.underctrl.io) See all the [public project repos using Starlight on GitHub](https://github.com/withastro/starlight/network/dependents). From 0bd16df83045bf225461e9b0528428bdff408a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=91=9E=E4=B8=B0?= Date: Tue, 8 Aug 2023 16:29:02 +0800 Subject: [PATCH 2/5] i18n(zh-cn): Update showcase.md (#472) --- docs/src/content/docs/zh/showcase.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/content/docs/zh/showcase.md b/docs/src/content/docs/zh/showcase.md index 5dbbde43dad..4bb6be0e6e4 100644 --- a/docs/src/content/docs/zh/showcase.md +++ b/docs/src/content/docs/zh/showcase.md @@ -22,6 +22,7 @@ Starlight 已投入生产。 这些是网络上的一些网站: - [xs-dev docs](https://xs-dev.js.org) - [Athena OS](https://www.athenaos.org) - [simple-fm](https://simple.arciniega.one) +- [CommandKit](https://commandkit.underctrl.io) 查看所有[在 GitHub 上使用 Starlight 的公共项目仓库](https://github.com/withastro/starlight/network/dependents)。 From 3e5d4b1b298558af322210915a58af5882d6ae06 Mon Sep 17 00:00:00 2001 From: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> Date: Tue, 8 Aug 2023 02:30:39 -0600 Subject: [PATCH 3/5] update: showcase (#471) --- docs/src/content/docs/es/showcase.md | 1 + docs/src/content/docs/fr/showcase.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/src/content/docs/es/showcase.md b/docs/src/content/docs/es/showcase.md index 57a3a637935..0fb59c4b00c 100644 --- a/docs/src/content/docs/es/showcase.md +++ b/docs/src/content/docs/es/showcase.md @@ -23,6 +23,7 @@ Starlight ya está siendo utilizado en producción. Estos son algunos de los sit - [xs-dev docs](https://xs-dev.js.org) - [Athena OS](https://www.athenaos.org) - [simple-fm](https://simple.arciniega.one) +- [CommandKit](https://commandkit.underctrl.io) Consulta todos los [repositorios de proyectos públicos que utilizan Starlight en GitHub](https://github.com/withastro/starlight/network/dependents). diff --git a/docs/src/content/docs/fr/showcase.md b/docs/src/content/docs/fr/showcase.md index 32579295840..a1b18f9c92d 100644 --- a/docs/src/content/docs/fr/showcase.md +++ b/docs/src/content/docs/fr/showcase.md @@ -23,6 +23,7 @@ Starlight est déjà utilisé en production. Voici quelques sites sur le web : - [xs-dev docs](https://xs-dev.js.org) - [Athena OS](https://www.athenaos.org) - [simple-fm](https://simple.arciniega.one) +- [CommandKit](https://commandkit.underctrl.io) Voir [les dépôts de projets publics utilisant Starlight sur GitHub](https://github.com/withastro/starlight/network/dependents). From 6a7692ae3178f9f9f727cc17b8ae860604afd78f Mon Sep 17 00:00:00 2001 From: HiDeoo <494699+HiDeoo@users.noreply.github.com> Date: Wed, 9 Aug 2023 00:21:26 +0200 Subject: [PATCH 4/5] Fix issue with nested `` components (#473) --- .changeset/wise-boats-flow.md | 5 +++++ packages/starlight/user-components/Tabs.astro | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/wise-boats-flow.md diff --git a/.changeset/wise-boats-flow.md b/.changeset/wise-boats-flow.md new file mode 100644 index 00000000000..6a85edfdd55 --- /dev/null +++ b/.changeset/wise-boats-flow.md @@ -0,0 +1,5 @@ +--- +'@astrojs/starlight': patch +--- + +Fix issue with nested `` components diff --git a/packages/starlight/user-components/Tabs.astro b/packages/starlight/user-components/Tabs.astro index 43af0430618..82b3af179dd 100644 --- a/packages/starlight/user-components/Tabs.astro +++ b/packages/starlight/user-components/Tabs.astro @@ -77,7 +77,7 @@ const { html, panels } = processPanels(panelHtml); super(); const tablist = this.querySelector('[role="tablist"]')!; this.tabs = [...tablist.querySelectorAll('[role="tab"]')]; - this.panels = [...this.querySelectorAll('[role="tabpanel"]')]; + this.panels = [...this.querySelectorAll(':scope > [role="tabpanel"]')]; this.tabs.forEach((tab, i) => { // Handle clicks for mouse users From bf91e2744a43d6b2ed1916a4cb239a50bd4bf94a Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Thu, 10 Aug 2023 00:13:12 +0200 Subject: [PATCH 5/5] Run size limit checks against basics example (#477) --- .github/workflows/size-limit.yml | 2 +- docs/package.json | 24 ++------------- examples/basics/package.json | 2 +- package.json | 27 +++++++++++++++-- packages/starlight/package.json | 2 +- pnpm-lock.yaml | 50 ++++++++++++++++---------------- 6 files changed, 54 insertions(+), 53 deletions(-) diff --git a/.github/workflows/size-limit.yml b/.github/workflows/size-limit.yml index 649cf46ffc3..afa45d0349d 100644 --- a/.github/workflows/size-limit.yml +++ b/.github/workflows/size-limit.yml @@ -25,5 +25,5 @@ jobs: uses: andresz1/size-limit-action@dd31dce7dcc72a041fd3e49abf0502b13fc4ce05 with: github_token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }} - directory: docs/ + build_script: 'build:examples' package_manager: pnpm diff --git a/docs/package.json b/docs/package.json index 47d9d4c1da5..0091d79b6d8 100644 --- a/docs/package.json +++ b/docs/package.json @@ -6,7 +6,6 @@ "scripts": { "test": "start-server-and-test preview http://localhost:3000 pa11y", "pa11y": "pa11y-ci --sitemap 'http://localhost:3000/sitemap-index.xml' --sitemap-find 'https://starlight.astro.build' --sitemap-replace 'http://localhost:3000'", - "size": "size-limit", "dev": "astro dev", "start": "astro dev", "build": "astro build", @@ -15,35 +14,16 @@ }, "dependencies": { "@astrojs/starlight": "workspace:*", - "astro": "^2.10.1", + "astro": "^2.10.4", "sharp": "^0.32.3" }, "devDependencies": { - "@size-limit/file": "^8.2.4", "hast-util-from-html": "^1.0.2", "hast-util-to-string": "^2.0.0", "hastscript": "^7.2.0", "pa11y-ci": "^3.0.1", "rehype": "^12.0.1", - "size-limit": "^8.2.4", "start-server-and-test": "^2.0.0", "unist-util-visit": "^4.1.2" - }, - "size-limit": [ - { - "name": "/index.html", - "path": "dist/index.html", - "limit": "14 kB" - }, - { - "name": "/_astro/*.js", - "path": "dist/_astro/*.js", - "limit": "20 kB" - }, - { - "name": "/_astro/*.css", - "path": "dist/_astro/*.css", - "limit": "10 kB" - } - ] + } } diff --git a/examples/basics/package.json b/examples/basics/package.json index f5f747ba5a5..3afd38514e5 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/starlight": "^0.6.1", - "astro": "^2.10.1", + "astro": "^2.10.4", "sharp": "^0.32.3" } } diff --git a/package.json b/package.json index b8d73edabc5..e49a7f451a5 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "version": "1.0.0", "description": "", "scripts": { + "build:examples": "pnpm --filter @example/* build", + "size": "size-limit", "version": "pnpm changeset version && pnpm i --no-frozen-lockfile", "format": "prettier -w --cache --plugin prettier-plugin-astro ." }, @@ -11,9 +13,28 @@ "devDependencies": { "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.1", - "astro": "^2.10.1", + "@size-limit/file": "^8.2.4", + "astro": "^2.10.4", "prettier": "^3.0.0", - "prettier-plugin-astro": "^0.11.0" + "prettier-plugin-astro": "^0.11.0", + "size-limit": "^8.2.4" }, - "packageManager": "pnpm@8.2.0" + "packageManager": "pnpm@8.2.0", + "size-limit": [ + { + "name": "/index.html", + "path": "examples/basics/dist/index.html", + "limit": "14 kB" + }, + { + "name": "/_astro/*.js", + "path": "examples/basics/dist/_astro/*.js", + "limit": "20 kB" + }, + { + "name": "/_astro/*.css", + "path": "examples/basics/dist/_astro/*.css", + "limit": "10 kB" + } + ] } diff --git a/packages/starlight/package.json b/packages/starlight/package.json index 579e60bb5ad..e992ffa746d 100644 --- a/packages/starlight/package.json +++ b/packages/starlight/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/node": "^18.16.19", "@vitest/coverage-v8": "^0.33.0", - "astro": "^2.10.1", + "astro": "^2.10.4", "vitest": "^0.33.0" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2aa64a148e1..64b6c77ca7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,15 +14,21 @@ importers: '@changesets/cli': specifier: ^2.26.1 version: 2.26.1 + '@size-limit/file': + specifier: ^8.2.4 + version: 8.2.4(size-limit@8.2.4) astro: - specifier: ^2.10.1 - version: 2.10.1(sharp@0.32.3) + specifier: ^2.10.4 + version: 2.10.4(sharp@0.32.3) prettier: specifier: ^3.0.0 version: 3.0.0 prettier-plugin-astro: specifier: ^0.11.0 version: 0.11.0 + size-limit: + specifier: ^8.2.4 + version: 8.2.4 docs: dependencies: @@ -30,15 +36,12 @@ importers: specifier: workspace:* version: link:../packages/starlight astro: - specifier: ^2.10.1 - version: 2.10.1(sharp@0.32.3) + specifier: ^2.10.4 + version: 2.10.4(sharp@0.32.3) sharp: specifier: ^0.32.3 version: 0.32.3 devDependencies: - '@size-limit/file': - specifier: ^8.2.4 - version: 8.2.4(size-limit@8.2.4) hast-util-from-html: specifier: ^1.0.2 version: 1.0.2 @@ -54,9 +57,6 @@ importers: rehype: specifier: ^12.0.1 version: 12.0.1 - size-limit: - specifier: ^8.2.4 - version: 8.2.4 start-server-and-test: specifier: ^2.0.0 version: 2.0.0 @@ -100,8 +100,8 @@ importers: specifier: ^0.6.1 version: link:../../packages/starlight astro: - specifier: ^2.10.1 - version: 2.10.1(sharp@0.32.3) + specifier: ^2.10.4 + version: 2.10.4(sharp@0.32.3) sharp: specifier: ^0.32.3 version: 0.32.3 @@ -110,7 +110,7 @@ importers: dependencies: '@astrojs/mdx': specifier: ^0.19.7 - version: 0.19.7(astro@2.10.1) + version: 0.19.7(astro@2.10.4) '@astrojs/sitemap': specifier: ^1.3.3 version: 1.3.3 @@ -161,8 +161,8 @@ importers: specifier: ^0.33.0 version: 0.33.0(vitest@0.33.0) astro: - specifier: ^2.10.1 - version: 2.10.1(@types/node@18.16.19) + specifier: ^2.10.4 + version: 2.10.4(@types/node@18.16.19) vitest: specifier: ^0.33.0 version: 0.33.0 @@ -200,13 +200,13 @@ packages: vscode-languageserver-types: 3.17.3 vscode-uri: 3.0.7 - /@astrojs/markdown-remark@2.2.1(astro@2.10.1): + /@astrojs/markdown-remark@2.2.1(astro@2.10.4): resolution: {integrity: sha512-VF0HRv4GpC1XEMLnsKf6jth7JSmlt9qpqP0josQgA2eSpCIAC/Et+y94mgdBIZVBYH/yFnMoIxgKVe93xfO2GA==} peerDependencies: astro: ^2.5.0 dependencies: '@astrojs/prism': 2.1.2 - astro: 2.10.1(sharp@0.32.3) + astro: 2.10.4(sharp@0.32.3) github-slugger: 1.5.0 import-meta-resolve: 2.2.2 rehype-raw: 6.1.1 @@ -222,11 +222,11 @@ packages: transitivePeerDependencies: - supports-color - /@astrojs/mdx@0.19.7(astro@2.10.1): + /@astrojs/mdx@0.19.7(astro@2.10.4): resolution: {integrity: sha512-mfEbBD7oi8yBHhcJucEjnrquREkJ3os+jioURP8BR2B8tOV2rV2j8trvmLUgfS+P/+HevGObxCTjcRYxn6T7eg==} engines: {node: '>=16.12.0'} dependencies: - '@astrojs/markdown-remark': 2.2.1(astro@2.10.1) + '@astrojs/markdown-remark': 2.2.1(astro@2.10.4) '@astrojs/prism': 2.1.2 '@mdx-js/mdx': 2.3.0 acorn: 8.9.0 @@ -1656,8 +1656,8 @@ packages: hasBin: true dev: false - /astro@2.10.1(@types/node@18.16.19): - resolution: {integrity: sha512-t3y9laRaOZTAu6omVpI5x/wE80t2yTCWO/UTCPJYAYy2Aoi+snupwk8ZFBLgVd0lwO7KhjRKA0pUScfkn3bnXw==} + /astro@2.10.4(@types/node@18.16.19): + resolution: {integrity: sha512-6MQ2E25tvHFNVgZ2uaNm33w2DKTyurlDLU0UUcdnAxVQwldDD8Qq8KDHm+nBx1CAWycjdbjJi9VQVvX2TOCMeQ==} engines: {node: '>=16.12.0', npm: '>=6.14.0'} hasBin: true peerDependencies: @@ -1669,7 +1669,7 @@ packages: '@astrojs/compiler': 1.8.0 '@astrojs/internal-helpers': 0.1.2 '@astrojs/language-server': 1.0.4 - '@astrojs/markdown-remark': 2.2.1(astro@2.10.1) + '@astrojs/markdown-remark': 2.2.1(astro@2.10.4) '@astrojs/telemetry': 2.1.1 '@astrojs/webapi': 2.2.0 '@babel/core': 7.22.5 @@ -1735,8 +1735,8 @@ packages: - terser dev: true - /astro@2.10.1(sharp@0.32.3): - resolution: {integrity: sha512-t3y9laRaOZTAu6omVpI5x/wE80t2yTCWO/UTCPJYAYy2Aoi+snupwk8ZFBLgVd0lwO7KhjRKA0pUScfkn3bnXw==} + /astro@2.10.4(sharp@0.32.3): + resolution: {integrity: sha512-6MQ2E25tvHFNVgZ2uaNm33w2DKTyurlDLU0UUcdnAxVQwldDD8Qq8KDHm+nBx1CAWycjdbjJi9VQVvX2TOCMeQ==} engines: {node: '>=16.12.0', npm: '>=6.14.0'} hasBin: true peerDependencies: @@ -1748,7 +1748,7 @@ packages: '@astrojs/compiler': 1.8.0 '@astrojs/internal-helpers': 0.1.2 '@astrojs/language-server': 1.0.4 - '@astrojs/markdown-remark': 2.2.1(astro@2.10.1) + '@astrojs/markdown-remark': 2.2.1(astro@2.10.4) '@astrojs/telemetry': 2.1.1 '@astrojs/webapi': 2.2.0 '@babel/core': 7.22.5