@astrojs/starlight 0.28.2 → 0.28.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 +24 -0
- package/components/Search.astro +2 -0
- package/components/TableOfContents/starlight-toc.ts +4 -1
- package/index.ts +1 -0
- package/integrations/asides.ts +4 -2
- package/integrations/expressive-code/translations.ts +1 -1
- package/integrations/shared/localeToLang.ts +4 -1
- package/package.json +1 -1
- package/routes/static/404.astro +1 -3
- package/schemas/i18n.ts +14 -2
- package/translations/ja.json +2 -2
- package/user-components/Aside.astro +1 -4
- package/user-components/FileTree.astro +1 -7
- package/utils/createPathFormatter.ts +3 -3
- package/utils/createTranslationSystem.ts +4 -4
- package/utils/route-data.ts +2 -2
- package/utils/translations.ts +2 -2
- package/virtual-internal.d.ts +149 -0
- package/virtual.d.ts +0 -149
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.28.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2444](https://github.com/withastro/starlight/pull/2444) [`d585b3e`](https://github.com/withastro/starlight/commit/d585b3e0485dd55b2ffab985a6c06d267d22fe51) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes a UI string translation issue for languages with a region subtag.
|
|
8
|
+
|
|
9
|
+
- [#2518](https://github.com/withastro/starlight/pull/2518) [`0f69db8`](https://github.com/withastro/starlight/commit/0f69db8b806833a7160570a469ddcdc8c0dec5e0) Thanks [@morinokami](https://github.com/morinokami)! - Updates Japanese UI translations
|
|
10
|
+
|
|
11
|
+
- [#2507](https://github.com/withastro/starlight/pull/2507) [`bd6ced5`](https://github.com/withastro/starlight/commit/bd6ced5bc46310b217c7bfe83a0f68ba4a03da45) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes a table of contents highlighting issue after resizing the window.
|
|
12
|
+
|
|
13
|
+
- [#2444](https://github.com/withastro/starlight/pull/2444) [`d585b3e`](https://github.com/withastro/starlight/commit/d585b3e0485dd55b2ffab985a6c06d267d22fe51) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Refactors various components to use the new built-in localization system to access translated UI strings.
|
|
14
|
+
|
|
15
|
+
## 0.28.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#2408](https://github.com/withastro/starlight/pull/2408) [`0b4823d`](https://github.com/withastro/starlight/commit/0b4823d534abe517fac5efd97f6febb5965714fe) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes a link formatting issue when using the Astro `build.format` option set to `file` with a `base`.
|
|
20
|
+
|
|
21
|
+
- [#2380](https://github.com/withastro/starlight/pull/2380) [`7b451cf`](https://github.com/withastro/starlight/commit/7b451cff6979bef1c817f3a84392221ac884ba3d) Thanks [@delucis](https://github.com/delucis)! - Loosen Starlight’s i18n schema to pass through unknown keys
|
|
22
|
+
|
|
23
|
+
- [#2388](https://github.com/withastro/starlight/pull/2388) [`6bba3d8`](https://github.com/withastro/starlight/commit/6bba3d8e02b95ecee7f9c945b6ee33b4c4ba755d) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes a potential type-checking issue in Starlight projects.
|
|
24
|
+
|
|
25
|
+
- [#2443](https://github.com/withastro/starlight/pull/2443) [`a0f40b3`](https://github.com/withastro/starlight/commit/a0f40b3c3c7ab0cb9f0f5f11b94e3679547f6ab4) Thanks [@kevinzunigacuellar](https://github.com/kevinzunigacuellar)! - Fixes CSS issue where bottom padding is not applied in the search dialog.
|
|
26
|
+
|
|
3
27
|
## 0.28.2
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/components/Search.astro
CHANGED
|
@@ -88,7 +88,10 @@ export class StarlightTOC extends HTMLElement {
|
|
|
88
88
|
let timeout: NodeJS.Timeout;
|
|
89
89
|
window.addEventListener('resize', () => {
|
|
90
90
|
// Disable intersection observer while window is resizing.
|
|
91
|
-
if (observer)
|
|
91
|
+
if (observer) {
|
|
92
|
+
observer.disconnect();
|
|
93
|
+
observer = undefined;
|
|
94
|
+
}
|
|
92
95
|
clearTimeout(timeout);
|
|
93
96
|
timeout = setTimeout(() => this.onIdle(observe), 200);
|
|
94
97
|
});
|
package/index.ts
CHANGED
package/integrations/asides.ts
CHANGED
|
@@ -17,9 +17,10 @@ import { visit } from 'unist-util-visit';
|
|
|
17
17
|
import type { StarlightConfig } from '../types';
|
|
18
18
|
import type { createTranslationSystemFromFs } from '../utils/translations-fs';
|
|
19
19
|
import { pathToLocale } from './shared/pathToLocale';
|
|
20
|
+
import { localeToLang } from './shared/localeToLang';
|
|
20
21
|
|
|
21
22
|
interface AsidesOptions {
|
|
22
|
-
starlightConfig:
|
|
23
|
+
starlightConfig: Pick<StarlightConfig, 'defaultLocale' | 'locales'>;
|
|
23
24
|
astroConfig: { root: AstroConfig['root']; srcDir: AstroConfig['srcDir'] };
|
|
24
25
|
useTranslations: ReturnType<typeof createTranslationSystemFromFs>;
|
|
25
26
|
}
|
|
@@ -151,7 +152,8 @@ function remarkAsides(options: AsidesOptions): Plugin<[], Root> {
|
|
|
151
152
|
|
|
152
153
|
const transformer: Transformer<Root> = (tree, file) => {
|
|
153
154
|
const locale = pathToLocale(file.history[0], options);
|
|
154
|
-
const
|
|
155
|
+
const lang = localeToLang(options.starlightConfig, locale);
|
|
156
|
+
const t = options.useTranslations(lang);
|
|
155
157
|
visit(tree, (node, index, parent) => {
|
|
156
158
|
if (!parent || index === undefined || !isNodeDirective(node)) {
|
|
157
159
|
return;
|
|
@@ -22,7 +22,7 @@ function addTranslationsForLocale(
|
|
|
22
22
|
useTranslations: ReturnType<typeof createTranslationSystemFromFs>
|
|
23
23
|
) {
|
|
24
24
|
const lang = localeToLang(config, locale);
|
|
25
|
-
const t = useTranslations(
|
|
25
|
+
const t = useTranslations(lang);
|
|
26
26
|
const translationKeys = [
|
|
27
27
|
'expressiveCode.copyButtonCopied',
|
|
28
28
|
'expressiveCode.copyButtonTooltip',
|
|
@@ -5,7 +5,10 @@ import { BuiltInDefaultLocale } from '../../utils/i18n';
|
|
|
5
5
|
* Get the BCP-47 language tag for the given locale.
|
|
6
6
|
* @param locale Locale string or `undefined` for the root locale.
|
|
7
7
|
*/
|
|
8
|
-
export function localeToLang(
|
|
8
|
+
export function localeToLang(
|
|
9
|
+
config: Pick<StarlightConfig, 'defaultLocale' | 'locales'>,
|
|
10
|
+
locale: string | undefined
|
|
11
|
+
): string {
|
|
9
12
|
const lang = locale ? config.locales?.[locale]?.lang : config.locales?.root?.lang;
|
|
10
13
|
const defaultLang = config.defaultLocale?.lang || config.defaultLocale?.locale;
|
|
11
14
|
return lang || defaultLang || BuiltInDefaultLocale.lang;
|
package/package.json
CHANGED
package/routes/static/404.astro
CHANGED
|
@@ -3,7 +3,6 @@ import { getEntry } from 'astro:content';
|
|
|
3
3
|
import config from 'virtual:starlight/user-config';
|
|
4
4
|
import EmptyContent from '../../components/EmptyMarkdown.md';
|
|
5
5
|
import type { Route, StarlightDocsEntry } from '../../utils/routing';
|
|
6
|
-
import { useTranslations } from '../../utils/translations';
|
|
7
6
|
import { BuiltInDefaultLocale } from '../../utils/i18n';
|
|
8
7
|
import CommonPage from '../common.astro';
|
|
9
8
|
|
|
@@ -15,7 +14,6 @@ let locale = config.defaultLocale?.locale;
|
|
|
15
14
|
if (locale === 'root') locale = undefined;
|
|
16
15
|
|
|
17
16
|
const entryMeta = { dir, lang, locale };
|
|
18
|
-
const t = useTranslations(locale);
|
|
19
17
|
|
|
20
18
|
const fallbackEntry: StarlightDocsEntry = {
|
|
21
19
|
slug: '404',
|
|
@@ -27,7 +25,7 @@ const fallbackEntry: StarlightDocsEntry = {
|
|
|
27
25
|
template: 'splash',
|
|
28
26
|
editUrl: false,
|
|
29
27
|
head: [],
|
|
30
|
-
hero: { tagline: t('404.text'), actions: [] },
|
|
28
|
+
hero: { tagline: Astro.locals.t('404.text'), actions: [] },
|
|
31
29
|
pagefind: false,
|
|
32
30
|
sidebar: { hidden: false, attrs: {} },
|
|
33
31
|
draft: false,
|
package/schemas/i18n.ts
CHANGED
|
@@ -23,16 +23,28 @@ const defaultI18nSchema = () =>
|
|
|
23
23
|
/** Type of Starlight’s default i18n schema, including extensions from Pagefind and Expressive Code. */
|
|
24
24
|
type DefaultI18nSchema = ReturnType<typeof defaultI18nSchema>;
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Based on the the return type of Zod’s `merge()` method. Merges the type of two `z.object()` schemas.
|
|
28
|
+
* Also sets them as “passthrough” schemas as that’s how we use them. In practice whether or not the types
|
|
29
|
+
* are passthrough or not doesn’t matter too much.
|
|
30
|
+
*
|
|
31
|
+
* @see https://github.com/colinhacks/zod/blob/3032e240a0c227692bb96eedf240ed493c53f54c/src/types.ts#L2656-L2660
|
|
32
|
+
*/
|
|
33
|
+
type MergeSchemas<A extends z.AnyZodObject, B extends z.AnyZodObject> = z.ZodObject<
|
|
34
|
+
z.objectUtil.extendShape<A['shape'], B['shape']>,
|
|
35
|
+
'passthrough',
|
|
36
|
+
B['_def']['catchall']
|
|
37
|
+
>;
|
|
26
38
|
/** Type that extends Starlight’s default i18n schema with an optional, user-defined schema. */
|
|
27
39
|
type ExtendedSchema<T extends z.AnyZodObject> = T extends z.AnyZodObject
|
|
28
|
-
?
|
|
40
|
+
? MergeSchemas<DefaultI18nSchema, T>
|
|
29
41
|
: DefaultI18nSchema;
|
|
30
42
|
|
|
31
43
|
/** Content collection schema for Starlight’s optional `i18n` collection. */
|
|
32
44
|
export function i18nSchema<T extends z.AnyZodObject = z.ZodObject<{}>>({
|
|
33
45
|
extend = z.object({}) as T,
|
|
34
46
|
}: i18nSchemaOpts<T> = {}): ExtendedSchema<T> {
|
|
35
|
-
return defaultI18nSchema().merge(extend) as ExtendedSchema<T>;
|
|
47
|
+
return defaultI18nSchema().merge(extend).passthrough() as ExtendedSchema<T>;
|
|
36
48
|
}
|
|
37
49
|
export type i18nSchemaOutput = z.output<ReturnType<typeof i18nSchema>>;
|
|
38
50
|
|
package/translations/ja.json
CHANGED
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"page.lastUpdated": "最終更新日:",
|
|
19
19
|
"page.previousLink": "前へ",
|
|
20
20
|
"page.nextLink": "次へ",
|
|
21
|
-
"page.draft": "
|
|
21
|
+
"page.draft": "このコンテンツは下書きです。プロダクションビルドには含まれません。",
|
|
22
22
|
"404.text": "ページが見つかりません。 URL を確認するか、検索バーを使用してみてください。",
|
|
23
23
|
"aside.note": "ノート",
|
|
24
24
|
"aside.tip": "ヒント",
|
|
25
25
|
"aside.caution": "注意",
|
|
26
26
|
"aside.danger": "危険",
|
|
27
27
|
"fileTree.directory": "ディレクトリ",
|
|
28
|
-
"builtWithStarlight.label": "
|
|
28
|
+
"builtWithStarlight.label": "Starlightで作成"
|
|
29
29
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { AstroError } from 'astro/errors';
|
|
3
|
-
import { slugToLocaleData, urlToSlug } from '../utils/slugs';
|
|
4
|
-
import { useTranslations } from '../utils/translations';
|
|
5
3
|
import Icon from './Icon.astro';
|
|
6
4
|
|
|
7
5
|
const asideVariants = ['note', 'tip', 'caution', 'danger'] as const;
|
|
@@ -23,8 +21,7 @@ if (!asideVariants.includes(type)) {
|
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
if (!title) {
|
|
26
|
-
|
|
27
|
-
title = useTranslations(locale)(`aside.${type}`);
|
|
24
|
+
title = Astro.locals.t(`aside.${type}`);
|
|
28
25
|
}
|
|
29
26
|
---
|
|
30
27
|
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { stripLeadingAndTrailingSlashes } from '../utils/path';
|
|
3
|
-
import { slugToLocaleData } from '../utils/slugs';
|
|
4
|
-
import { useTranslations } from '../utils/translations';
|
|
5
2
|
import { processFileTree } from './rehype-file-tree';
|
|
6
3
|
|
|
7
|
-
const slug = stripLeadingAndTrailingSlashes(Astro.url.pathname);
|
|
8
|
-
const t = useTranslations(slugToLocaleData(slug).locale);
|
|
9
|
-
|
|
10
4
|
const fileTreeHtml = await Astro.slots.render('default');
|
|
11
|
-
const html = processFileTree(fileTreeHtml, t('fileTree.directory'));
|
|
5
|
+
const html = processFileTree(fileTreeHtml, Astro.locals.t('fileTree.directory'));
|
|
12
6
|
---
|
|
13
7
|
|
|
14
8
|
<starlight-file-tree set:html={html} class="not-content" data-pagefind-ignore />
|
|
@@ -40,12 +40,12 @@ function formatPath(
|
|
|
40
40
|
const formatStrategy = formatStrategies[format];
|
|
41
41
|
const trailingSlashStrategy = trailingSlashStrategies[trailingSlash];
|
|
42
42
|
|
|
43
|
-
// Add base
|
|
44
|
-
href = formatStrategy.addBase(href);
|
|
45
|
-
|
|
46
43
|
// Handle extension
|
|
47
44
|
href = formatStrategy.handleExtension(href);
|
|
48
45
|
|
|
46
|
+
// Add base
|
|
47
|
+
href = formatStrategy.addBase(href);
|
|
48
|
+
|
|
49
49
|
// Skip trailing slash handling for `build.format: 'file'`
|
|
50
50
|
if (format === 'file') return href;
|
|
51
51
|
|
|
@@ -49,14 +49,14 @@ export function createTranslationSystem<T extends i18nSchemaOutput>(
|
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* Generate a utility function that returns UI strings for the given
|
|
52
|
+
* Generate a utility function that returns UI strings for the given language.
|
|
53
53
|
*
|
|
54
54
|
* Also includes a few utility methods:
|
|
55
55
|
* - `all()` method for getting the entire dictionary.
|
|
56
56
|
* - `exists()` method for checking if a key exists in the dictionary.
|
|
57
57
|
* - `dir()` method for getting the text direction of the locale.
|
|
58
58
|
*
|
|
59
|
-
* @param {string | undefined} [
|
|
59
|
+
* @param {string | undefined} [lang]
|
|
60
60
|
* @example
|
|
61
61
|
* const t = useTranslations('en');
|
|
62
62
|
* const label = t('search.label');
|
|
@@ -68,8 +68,8 @@ export function createTranslationSystem<T extends i18nSchemaOutput>(
|
|
|
68
68
|
* const dir = t.dir();
|
|
69
69
|
* // => 'ltr'
|
|
70
70
|
*/
|
|
71
|
-
return (
|
|
72
|
-
|
|
71
|
+
return (lang: string | undefined) => {
|
|
72
|
+
lang ??= config.defaultLocale?.lang || BuiltInDefaultLocale.lang;
|
|
73
73
|
|
|
74
74
|
const t = i18n.getFixedT(lang, I18nextNamespace) as I18nT;
|
|
75
75
|
t.all = () => i18n.getResourceBundle(lang, I18nextNamespace);
|
package/utils/route-data.ts
CHANGED
|
@@ -62,7 +62,7 @@ export function generateRouteData({
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
export function getToC({ entry,
|
|
65
|
+
export function getToC({ entry, lang, headings }: PageProps) {
|
|
66
66
|
const tocConfig =
|
|
67
67
|
entry.data.template === 'splash'
|
|
68
68
|
? false
|
|
@@ -70,7 +70,7 @@ export function getToC({ entry, locale, headings }: PageProps) {
|
|
|
70
70
|
? entry.data.tableOfContents
|
|
71
71
|
: config.tableOfContents;
|
|
72
72
|
if (!tocConfig) return;
|
|
73
|
-
const t = useTranslations(
|
|
73
|
+
const t = useTranslations(lang);
|
|
74
74
|
return {
|
|
75
75
|
...tocConfig,
|
|
76
76
|
items: generateToC(headings, { ...tocConfig, title: t('tableOfContents.overview') }),
|
package/utils/translations.ts
CHANGED
|
@@ -31,8 +31,8 @@ async function loadTranslations() {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* Generate a utility function that returns UI strings for the given
|
|
35
|
-
* @param {string | undefined} [
|
|
34
|
+
* Generate a utility function that returns UI strings for the given language.
|
|
35
|
+
* @param {string | undefined} [lang]
|
|
36
36
|
* @example
|
|
37
37
|
* const t = useTranslations('en');
|
|
38
38
|
* const label = t('search.label'); // => 'Search'
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
declare module 'virtual:starlight/project-context' {
|
|
2
|
+
const ProjectContext: {
|
|
3
|
+
root: string;
|
|
4
|
+
srcDir: string;
|
|
5
|
+
trailingSlash: import('astro').AstroConfig['trailingSlash'];
|
|
6
|
+
build: {
|
|
7
|
+
format: import('astro').AstroConfig['build']['format'];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default ProjectContext;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare module 'virtual:starlight/git-info' {
|
|
14
|
+
export function getNewestCommitDate(file: string): Date;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare module 'virtual:starlight/user-css' {}
|
|
18
|
+
|
|
19
|
+
declare module 'virtual:starlight/user-images' {
|
|
20
|
+
type ImageMetadata = import('astro').ImageMetadata;
|
|
21
|
+
export const logos: {
|
|
22
|
+
dark?: ImageMetadata;
|
|
23
|
+
light?: ImageMetadata;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare module 'virtual:starlight/collection-config' {
|
|
28
|
+
export const collections: import('astro:content').ContentConfig['collections'] | undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare module 'virtual:starlight/components/Banner' {
|
|
32
|
+
const Banner: typeof import('./components/Banner.astro').default;
|
|
33
|
+
export default Banner;
|
|
34
|
+
}
|
|
35
|
+
declare module 'virtual:starlight/components/ContentPanel' {
|
|
36
|
+
const ContentPanel: typeof import('./components/ContentPanel.astro').default;
|
|
37
|
+
export default ContentPanel;
|
|
38
|
+
}
|
|
39
|
+
declare module 'virtual:starlight/components/PageTitle' {
|
|
40
|
+
const PageTitle: typeof import('./components/PageTitle.astro').default;
|
|
41
|
+
export default PageTitle;
|
|
42
|
+
}
|
|
43
|
+
declare module 'virtual:starlight/components/FallbackContentNotice' {
|
|
44
|
+
const FallbackContentNotice: typeof import('./components/FallbackContentNotice.astro').default;
|
|
45
|
+
export default FallbackContentNotice;
|
|
46
|
+
}
|
|
47
|
+
declare module 'virtual:starlight/components/DraftContentNotice' {
|
|
48
|
+
const DraftContentNotice: typeof import('./components/DraftContentNotice.astro').default;
|
|
49
|
+
export default DraftContentNotice;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare module 'virtual:starlight/components/Footer' {
|
|
53
|
+
const Footer: typeof import('./components/Footer.astro').default;
|
|
54
|
+
export default Footer;
|
|
55
|
+
}
|
|
56
|
+
declare module 'virtual:starlight/components/LastUpdated' {
|
|
57
|
+
const LastUpdated: typeof import('./components/LastUpdated.astro').default;
|
|
58
|
+
export default LastUpdated;
|
|
59
|
+
}
|
|
60
|
+
declare module 'virtual:starlight/components/Pagination' {
|
|
61
|
+
const Pagination: typeof import('./components/Pagination.astro').default;
|
|
62
|
+
export default Pagination;
|
|
63
|
+
}
|
|
64
|
+
declare module 'virtual:starlight/components/EditLink' {
|
|
65
|
+
const EditLink: typeof import('./components/EditLink.astro').default;
|
|
66
|
+
export default EditLink;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare module 'virtual:starlight/components/Header' {
|
|
70
|
+
const Header: typeof import('./components/Header.astro').default;
|
|
71
|
+
export default Header;
|
|
72
|
+
}
|
|
73
|
+
declare module 'virtual:starlight/components/LanguageSelect' {
|
|
74
|
+
const LanguageSelect: typeof import('./components/LanguageSelect.astro').default;
|
|
75
|
+
export default LanguageSelect;
|
|
76
|
+
}
|
|
77
|
+
declare module 'virtual:starlight/components/Search' {
|
|
78
|
+
const Search: typeof import('./components/Search.astro').default;
|
|
79
|
+
export default Search;
|
|
80
|
+
}
|
|
81
|
+
declare module 'virtual:starlight/components/SiteTitle' {
|
|
82
|
+
const SiteTitle: typeof import('./components/SiteTitle.astro').default;
|
|
83
|
+
export default SiteTitle;
|
|
84
|
+
}
|
|
85
|
+
declare module 'virtual:starlight/components/SocialIcons' {
|
|
86
|
+
const SocialIcons: typeof import('./components/SocialIcons.astro').default;
|
|
87
|
+
export default SocialIcons;
|
|
88
|
+
}
|
|
89
|
+
declare module 'virtual:starlight/components/ThemeSelect' {
|
|
90
|
+
const ThemeSelect: typeof import('./components/ThemeSelect.astro').default;
|
|
91
|
+
export default ThemeSelect;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare module 'virtual:starlight/components/Head' {
|
|
95
|
+
const Head: typeof import('./components/Head.astro').default;
|
|
96
|
+
export default Head;
|
|
97
|
+
}
|
|
98
|
+
declare module 'virtual:starlight/components/Hero' {
|
|
99
|
+
const Hero: typeof import('./components/Hero.astro').default;
|
|
100
|
+
export default Hero;
|
|
101
|
+
}
|
|
102
|
+
declare module 'virtual:starlight/components/MarkdownContent' {
|
|
103
|
+
const MarkdownContent: typeof import('./components/MarkdownContent.astro').default;
|
|
104
|
+
export default MarkdownContent;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare module 'virtual:starlight/components/PageSidebar' {
|
|
108
|
+
const PageSidebar: typeof import('./components/PageSidebar.astro').default;
|
|
109
|
+
export default PageSidebar;
|
|
110
|
+
}
|
|
111
|
+
declare module 'virtual:starlight/components/TableOfContents' {
|
|
112
|
+
const TableOfContents: typeof import('./components/TableOfContents.astro').default;
|
|
113
|
+
export default TableOfContents;
|
|
114
|
+
}
|
|
115
|
+
declare module 'virtual:starlight/components/MobileTableOfContents' {
|
|
116
|
+
const MobileTableOfContents: typeof import('./components/MobileTableOfContents.astro').default;
|
|
117
|
+
export default MobileTableOfContents;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare module 'virtual:starlight/components/Sidebar' {
|
|
121
|
+
const Sidebar: typeof import('./components/Sidebar.astro').default;
|
|
122
|
+
export default Sidebar;
|
|
123
|
+
}
|
|
124
|
+
declare module 'virtual:starlight/components/SkipLink' {
|
|
125
|
+
const SkipLink: typeof import('./components/SkipLink.astro').default;
|
|
126
|
+
export default SkipLink;
|
|
127
|
+
}
|
|
128
|
+
declare module 'virtual:starlight/components/ThemeProvider' {
|
|
129
|
+
const ThemeProvider: typeof import('./components/ThemeProvider.astro').default;
|
|
130
|
+
export default ThemeProvider;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare module 'virtual:starlight/components/PageFrame' {
|
|
134
|
+
const PageFrame: typeof import('./components/PageFrame.astro').default;
|
|
135
|
+
export default PageFrame;
|
|
136
|
+
}
|
|
137
|
+
declare module 'virtual:starlight/components/MobileMenuToggle' {
|
|
138
|
+
const MobileMenuToggle: typeof import('./components/MobileMenuToggle.astro').default;
|
|
139
|
+
export default MobileMenuToggle;
|
|
140
|
+
}
|
|
141
|
+
declare module 'virtual:starlight/components/MobileMenuFooter' {
|
|
142
|
+
const MobileMenuFooter: typeof import('./components/MobileMenuFooter.astro').default;
|
|
143
|
+
export default MobileMenuFooter;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare module 'virtual:starlight/components/TwoColumnContent' {
|
|
147
|
+
const TwoColumnContent: typeof import('./components/TwoColumnContent.astro').default;
|
|
148
|
+
export default TwoColumnContent;
|
|
149
|
+
}
|
package/virtual.d.ts
CHANGED
|
@@ -2,157 +2,8 @@ declare module 'virtual:starlight/user-config' {
|
|
|
2
2
|
const Config: import('./types').StarlightConfig;
|
|
3
3
|
export default Config;
|
|
4
4
|
}
|
|
5
|
-
declare module 'virtual:starlight/project-context' {
|
|
6
|
-
const ProjectContext: {
|
|
7
|
-
root: string;
|
|
8
|
-
srcDir: string;
|
|
9
|
-
trailingSlash: import('astro').AstroConfig['trailingSlash'];
|
|
10
|
-
build: {
|
|
11
|
-
format: import('astro').AstroConfig['build']['format'];
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export default ProjectContext;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare module 'virtual:starlight/git-info' {
|
|
18
|
-
export function getNewestCommitDate(file: string): Date;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare module 'virtual:starlight/user-css' {}
|
|
22
|
-
|
|
23
|
-
declare module 'virtual:starlight/user-images' {
|
|
24
|
-
type ImageMetadata = import('astro').ImageMetadata;
|
|
25
|
-
export const logos: {
|
|
26
|
-
dark?: ImageMetadata;
|
|
27
|
-
light?: ImageMetadata;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
5
|
|
|
31
6
|
declare module 'virtual:starlight/plugin-translations' {
|
|
32
7
|
const PluginTranslations: import('./utils/plugins').PluginTranslations;
|
|
33
8
|
export default PluginTranslations;
|
|
34
9
|
}
|
|
35
|
-
|
|
36
|
-
declare module 'virtual:starlight/collection-config' {
|
|
37
|
-
export const collections: import('astro:content').ContentConfig['collections'] | undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare module 'virtual:starlight/components/Banner' {
|
|
41
|
-
const Banner: typeof import('./components/Banner.astro').default;
|
|
42
|
-
export default Banner;
|
|
43
|
-
}
|
|
44
|
-
declare module 'virtual:starlight/components/ContentPanel' {
|
|
45
|
-
const ContentPanel: typeof import('./components/ContentPanel.astro').default;
|
|
46
|
-
export default ContentPanel;
|
|
47
|
-
}
|
|
48
|
-
declare module 'virtual:starlight/components/PageTitle' {
|
|
49
|
-
const PageTitle: typeof import('./components/PageTitle.astro').default;
|
|
50
|
-
export default PageTitle;
|
|
51
|
-
}
|
|
52
|
-
declare module 'virtual:starlight/components/FallbackContentNotice' {
|
|
53
|
-
const FallbackContentNotice: typeof import('./components/FallbackContentNotice.astro').default;
|
|
54
|
-
export default FallbackContentNotice;
|
|
55
|
-
}
|
|
56
|
-
declare module 'virtual:starlight/components/DraftContentNotice' {
|
|
57
|
-
const DraftContentNotice: typeof import('./components/DraftContentNotice.astro').default;
|
|
58
|
-
export default DraftContentNotice;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
declare module 'virtual:starlight/components/Footer' {
|
|
62
|
-
const Footer: typeof import('./components/Footer.astro').default;
|
|
63
|
-
export default Footer;
|
|
64
|
-
}
|
|
65
|
-
declare module 'virtual:starlight/components/LastUpdated' {
|
|
66
|
-
const LastUpdated: typeof import('./components/LastUpdated.astro').default;
|
|
67
|
-
export default LastUpdated;
|
|
68
|
-
}
|
|
69
|
-
declare module 'virtual:starlight/components/Pagination' {
|
|
70
|
-
const Pagination: typeof import('./components/Pagination.astro').default;
|
|
71
|
-
export default Pagination;
|
|
72
|
-
}
|
|
73
|
-
declare module 'virtual:starlight/components/EditLink' {
|
|
74
|
-
const EditLink: typeof import('./components/EditLink.astro').default;
|
|
75
|
-
export default EditLink;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
declare module 'virtual:starlight/components/Header' {
|
|
79
|
-
const Header: typeof import('./components/Header.astro').default;
|
|
80
|
-
export default Header;
|
|
81
|
-
}
|
|
82
|
-
declare module 'virtual:starlight/components/LanguageSelect' {
|
|
83
|
-
const LanguageSelect: typeof import('./components/LanguageSelect.astro').default;
|
|
84
|
-
export default LanguageSelect;
|
|
85
|
-
}
|
|
86
|
-
declare module 'virtual:starlight/components/Search' {
|
|
87
|
-
const Search: typeof import('./components/Search.astro').default;
|
|
88
|
-
export default Search;
|
|
89
|
-
}
|
|
90
|
-
declare module 'virtual:starlight/components/SiteTitle' {
|
|
91
|
-
const SiteTitle: typeof import('./components/SiteTitle.astro').default;
|
|
92
|
-
export default SiteTitle;
|
|
93
|
-
}
|
|
94
|
-
declare module 'virtual:starlight/components/SocialIcons' {
|
|
95
|
-
const SocialIcons: typeof import('./components/SocialIcons.astro').default;
|
|
96
|
-
export default SocialIcons;
|
|
97
|
-
}
|
|
98
|
-
declare module 'virtual:starlight/components/ThemeSelect' {
|
|
99
|
-
const ThemeSelect: typeof import('./components/ThemeSelect.astro').default;
|
|
100
|
-
export default ThemeSelect;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
declare module 'virtual:starlight/components/Head' {
|
|
104
|
-
const Head: typeof import('./components/Head.astro').default;
|
|
105
|
-
export default Head;
|
|
106
|
-
}
|
|
107
|
-
declare module 'virtual:starlight/components/Hero' {
|
|
108
|
-
const Hero: typeof import('./components/Hero.astro').default;
|
|
109
|
-
export default Hero;
|
|
110
|
-
}
|
|
111
|
-
declare module 'virtual:starlight/components/MarkdownContent' {
|
|
112
|
-
const MarkdownContent: typeof import('./components/MarkdownContent.astro').default;
|
|
113
|
-
export default MarkdownContent;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
declare module 'virtual:starlight/components/PageSidebar' {
|
|
117
|
-
const PageSidebar: typeof import('./components/PageSidebar.astro').default;
|
|
118
|
-
export default PageSidebar;
|
|
119
|
-
}
|
|
120
|
-
declare module 'virtual:starlight/components/TableOfContents' {
|
|
121
|
-
const TableOfContents: typeof import('./components/TableOfContents.astro').default;
|
|
122
|
-
export default TableOfContents;
|
|
123
|
-
}
|
|
124
|
-
declare module 'virtual:starlight/components/MobileTableOfContents' {
|
|
125
|
-
const MobileTableOfContents: typeof import('./components/MobileTableOfContents.astro').default;
|
|
126
|
-
export default MobileTableOfContents;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
declare module 'virtual:starlight/components/Sidebar' {
|
|
130
|
-
const Sidebar: typeof import('./components/Sidebar.astro').default;
|
|
131
|
-
export default Sidebar;
|
|
132
|
-
}
|
|
133
|
-
declare module 'virtual:starlight/components/SkipLink' {
|
|
134
|
-
const SkipLink: typeof import('./components/SkipLink.astro').default;
|
|
135
|
-
export default SkipLink;
|
|
136
|
-
}
|
|
137
|
-
declare module 'virtual:starlight/components/ThemeProvider' {
|
|
138
|
-
const ThemeProvider: typeof import('./components/ThemeProvider.astro').default;
|
|
139
|
-
export default ThemeProvider;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
declare module 'virtual:starlight/components/PageFrame' {
|
|
143
|
-
const PageFrame: typeof import('./components/PageFrame.astro').default;
|
|
144
|
-
export default PageFrame;
|
|
145
|
-
}
|
|
146
|
-
declare module 'virtual:starlight/components/MobileMenuToggle' {
|
|
147
|
-
const MobileMenuToggle: typeof import('./components/MobileMenuToggle.astro').default;
|
|
148
|
-
export default MobileMenuToggle;
|
|
149
|
-
}
|
|
150
|
-
declare module 'virtual:starlight/components/MobileMenuFooter' {
|
|
151
|
-
const MobileMenuFooter: typeof import('./components/MobileMenuFooter.astro').default;
|
|
152
|
-
export default MobileMenuFooter;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
declare module 'virtual:starlight/components/TwoColumnContent' {
|
|
156
|
-
const TwoColumnContent: typeof import('./components/TwoColumnContent.astro').default;
|
|
157
|
-
export default TwoColumnContent;
|
|
158
|
-
}
|