@astrojs/starlight 0.38.2 → 0.38.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/components/ContentNotice.astro +1 -0
- package/components/Hero.astro +3 -0
- package/package.json +1 -1
- package/style/asides.css +4 -0
- package/translations/cs.json +5 -5
- package/user-components/Aside.astro +7 -3
- package/utils/i18n.ts +3 -0
- package/utils/user-config.ts +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.38.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3828](https://github.com/withastro/starlight/pull/3828) [`342038b`](https://github.com/withastro/starlight/commit/342038b60b35c0e8cd4489e6a3ee16902445cfce) Thanks [@MangelMaxime](https://github.com/MangelMaxime)! - Fixes aside styling when used without any content
|
|
8
|
+
|
|
9
|
+
- [#3853](https://github.com/withastro/starlight/pull/3853) [`563e11b`](https://github.com/withastro/starlight/commit/563e11b71f5c23d0ca982f7e061ade0796101ffb) Thanks [@delucis](https://github.com/delucis)! - Fixes a type-checking issue for users on newer versions of TypeScript
|
|
10
|
+
|
|
11
|
+
## 0.38.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#3799](https://github.com/withastro/starlight/pull/3799) [`313611b`](https://github.com/withastro/starlight/commit/313611b1cd9c1f38688cb98cc103ddd758e80ec2) Thanks [@JosefJezek](https://github.com/JosefJezek)! - Improves Czech UI translations
|
|
16
|
+
|
|
17
|
+
- [#3770](https://github.com/withastro/starlight/pull/3770) [`6e7bed1`](https://github.com/withastro/starlight/commit/6e7bed1e6b3b586b9719c620924f60d3678a1f83) Thanks [@gameroman](https://github.com/gameroman)! - Adds examples to the inline documentation for `title` in the Starlight configuration object
|
|
18
|
+
|
|
19
|
+
- [#3801](https://github.com/withastro/starlight/pull/3801) [`fedd48b`](https://github.com/withastro/starlight/commit/fedd48b701ea9ca764b19139404c744099565f4c) Thanks [@delucis](https://github.com/delucis)! - Fixes missing draft content warning in dev on pages using the hero layout
|
|
20
|
+
|
|
3
21
|
## 0.38.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/components/Hero.astro
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { Image } from 'astro:assets';
|
|
3
|
+
import DraftContentNotice from 'virtual:starlight/components/DraftContentNotice';
|
|
3
4
|
import { PAGE_TITLE_ID } from '../constants';
|
|
4
5
|
import LinkButton from '../user-components/LinkButton.astro';
|
|
5
6
|
|
|
@@ -44,6 +45,7 @@ if (image) {
|
|
|
44
45
|
<div class="sl-flex stack">
|
|
45
46
|
<div class="sl-flex copy">
|
|
46
47
|
<h1 id={PAGE_TITLE_ID} data-page-title set:html={title} />
|
|
48
|
+
{data.draft && <DraftContentNotice />}
|
|
47
49
|
{tagline && <div class="tagline" set:html={tagline} />}
|
|
48
50
|
</div>
|
|
49
51
|
{
|
|
@@ -67,6 +69,7 @@ if (image) {
|
|
|
67
69
|
@layer starlight.core {
|
|
68
70
|
.hero {
|
|
69
71
|
display: grid;
|
|
72
|
+
grid-template-columns: 100%;
|
|
70
73
|
align-items: center;
|
|
71
74
|
gap: 1rem;
|
|
72
75
|
padding-bottom: 1rem;
|
package/package.json
CHANGED
package/style/asides.css
CHANGED
package/translations/cs.json
CHANGED
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"tableOfContents.overview": "Přehled",
|
|
16
16
|
"i18n.untranslatedContent": "Tento obsah zatím není dostupný ve vašem jazyce.",
|
|
17
17
|
"page.editLink": "Upravit stránku",
|
|
18
|
-
"page.lastUpdated": "
|
|
18
|
+
"page.lastUpdated": "Aktualizováno:",
|
|
19
19
|
"page.previousLink": "Předchozí",
|
|
20
20
|
"page.nextLink": "Další",
|
|
21
21
|
"page.draft": "Tento obsah je koncept a nebude zahrnutý v produkčním sestavení.",
|
|
22
|
-
"404.text": "Stránka nenalezena. Zkontrolujte adresu nebo zkuste použít
|
|
22
|
+
"404.text": "Stránka nenalezena. Zkontrolujte adresu nebo zkuste použít vyhledávač.",
|
|
23
23
|
"aside.note": "Poznámka",
|
|
24
24
|
"aside.tip": "Tip",
|
|
25
25
|
"aside.caution": "Upozornění",
|
|
26
26
|
"aside.danger": "Nebezpečí",
|
|
27
27
|
"fileTree.directory": "Adresář",
|
|
28
|
-
"builtWithStarlight.label": "
|
|
28
|
+
"builtWithStarlight.label": "Postaveno se Starlight",
|
|
29
29
|
"expressiveCode.copyButtonCopied": "Zkopírováno!",
|
|
30
|
-
"expressiveCode.copyButtonTooltip": "
|
|
30
|
+
"expressiveCode.copyButtonTooltip": "Kopírovat do schránky",
|
|
31
31
|
"expressiveCode.terminalWindowFallbackTitle": "Terminál",
|
|
32
32
|
"pagefind.clear_search": "Vyčistit",
|
|
33
33
|
"pagefind.load_more": "Načíst další výsledky",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"pagefind.alt_search": "Žádné výsledky pro [SEARCH_TERM]. Namísto toho zobrazuji výsledky pro: [DIFFERENT_TERM]",
|
|
40
40
|
"pagefind.search_suggestion": "Žádný výsledek pro [SEARCH_TERM]. Zkus nějaké z těchto hledání:",
|
|
41
41
|
"pagefind.searching": "Hledám [SEARCH_TERM]...",
|
|
42
|
-
"heading.anchorLabel": "
|
|
42
|
+
"heading.anchorLabel": "Sekce “{{title}}”"
|
|
43
43
|
}
|
|
@@ -34,7 +34,11 @@ if (!title) {
|
|
|
34
34
|
<p class="starlight-aside__title" aria-hidden="true">
|
|
35
35
|
<Icon name={icon || icons[type]} class="starlight-aside__icon" />{title}
|
|
36
36
|
</p>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
{
|
|
38
|
+
/*
|
|
39
|
+
The slot is intentionally not wrapped in newlines/whitespace to ensure CSS `:empty`
|
|
40
|
+
can match when no content is provided.
|
|
41
|
+
*/
|
|
42
|
+
}
|
|
43
|
+
<div class="starlight-aside__content"><slot /></div>
|
|
40
44
|
</aside>
|
package/utils/i18n.ts
CHANGED
|
@@ -193,6 +193,9 @@ function getLocaleDir(locale: Intl.Locale): 'ltr' | 'rtl' {
|
|
|
193
193
|
}
|
|
194
194
|
// Firefox does not support `textInfo` or `getTextInfo` yet so we fallback to a well-known list
|
|
195
195
|
// of right-to-left languages.
|
|
196
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
197
|
+
// @ts-ignore — This is a type error with newer versions of TypeScript’s DOM types.
|
|
198
|
+
// TODO: remove or switch to @ts-expect-error in #3572
|
|
196
199
|
return wellKnownRTL.includes(locale.language) ? 'rtl' : 'ltr';
|
|
197
200
|
}
|
|
198
201
|
|
package/utils/user-config.ts
CHANGED
|
@@ -22,7 +22,15 @@ const LocaleSchema = z.object({
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
const UserConfigSchema = z.object({
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Title for your website. Will be used in metadata and as browser tab title.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* title: 'My Docs'
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* title: { en: 'My Docs' }
|
|
33
|
+
*/
|
|
26
34
|
title: TitleConfigSchema(),
|
|
27
35
|
|
|
28
36
|
/** Description metadata for your website. Can be used in page metadata. */
|