Skip to content

Commit

Permalink
feat!: bumps minimum required Starlight version to 0.28.0
Browse files Browse the repository at this point in the history
Co-authored-by: HiDeoo <[email protected]>
  • Loading branch information
o-az and HiDeoo authored Sep 20, 2024
1 parent b63e825 commit 165b89b
Show file tree
Hide file tree
Showing 6 changed files with 718 additions and 1,093 deletions.
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
},
"dependencies": {
"@astrojs/starlight": "^0.25.1",
"@astrojs/starlight": "^0.28.2",
"@hideoo/starlight-plugins-docs-components": "^0.2.2",
"astro": "^4.10.1",
"astro": "^4.15.8",
"sharp": "^0.33.4",
"starlight-theme-rapide": "workspace:*"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@hideoo/eslint-config": "^3.0.1",
"@hideoo/prettier-config": "^2.0.0",
"@hideoo/tsconfig": "^2.0.1",
"astro": "^4.10.1",
"astro": "^4.15.8",
"eslint": "^8.57.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.5",
Expand Down
6 changes: 3 additions & 3 deletions packages/starlight-theme-rapide/overrides/Pagination.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Icon } from '@astrojs/starlight/components'
import type { Props } from '@astrojs/starlight/props'
const { dir, labels, pagination } = Astro.props
const { dir, pagination } = Astro.props
const { prev, next } = pagination
const isRtl = dir === 'rtl'
---
Expand All @@ -14,15 +14,15 @@ const isRtl = dir === 'rtl'
<a href={prev.href} rel="prev">
<div>
<Icon name={isRtl ? 'right-arrow' : 'left-arrow'} size="1.25rem" />
{labels['page.previousLink']}
{Astro.locals.t('page.previousLink')}
</div>
<p class="link-title">{prev.label}</p>
</a>
)}
{next && (
<a href={next.href} rel="next">
<div>
{labels['page.nextLink']}
{Astro.locals.t('page.nextLink')}
<Icon name={isRtl ? 'left-arrow' : 'right-arrow'} size="1.25rem" />
</div>
<p class="link-title">{next.label}</p>
Expand Down
5 changes: 2 additions & 3 deletions packages/starlight-theme-rapide/overrides/ThemeSelect.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import crypto from 'node:crypto'
import type { Props } from '@astrojs/starlight/props'
const { labels } = Astro.props
const id = `moon-mask-${crypto.randomBytes(4).toString('hex')}`
// https://web.dev/building-a-theme-switch-component/
Expand All @@ -12,10 +11,10 @@ const id = `moon-mask-${crypto.randomBytes(4).toString('hex')}`

<starlight-rapide-theme-select>
<button
aria-label={labels['themeSelect.accessibleLabel']}
aria-label={Astro.locals.t('themeSelect.accessibleLabel')}
aria-live="polite"
class="sl-flex"
title={labels['themeSelect.accessibleLabel']}
title={Astro.locals.t('themeSelect.accessibleLabel')}
>
<svg aria-hidden="true" height="16" viewBox="0 0 24 24" width="16">
<mask class="moon" id={id}>
Expand Down
2 changes: 1 addition & 1 deletion packages/starlight-theme-rapide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lint": "prettier -c --cache . && eslint . --cache --max-warnings=0"
},
"peerDependencies": {
"@astrojs/starlight": ">=0.23.0"
"@astrojs/starlight": ">=0.28.0"
},
"engines": {
"node": ">=18"
Expand Down
Loading

0 comments on commit 165b89b

Please sign in to comment.