@astrojs/starlight 0.41.10 → 0.42.0
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/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/components/MobileMenuToggle.astro +65 -0
- package/{components → dist/components}/PageFrame.astro +32 -8
- package/dist/components-internals/Icons.d.ts +415 -0
- package/dist/components-internals/Icons.js +140 -0
- package/dist/components-internals/SidebarPersistState.d.ts +1 -0
- package/dist/components-internals/SidebarPersistState.js +53 -0
- package/dist/components-internals/TableOfContents/starlight-toc.d.ts +18 -0
- package/dist/components-internals/TableOfContents/starlight-toc.js +88 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +4 -0
- package/{expressive-code.d.ts → dist/expressive-code.d.ts} +6 -13
- package/dist/expressive-code.js +31 -0
- package/dist/global.d.ts +62 -0
- package/dist/global.js +2 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +109 -0
- package/dist/integrations/aside-utils.d.ts +9 -0
- package/dist/integrations/aside-utils.js +35 -0
- package/dist/integrations/expressive-code/hast.d.ts +1 -0
- package/dist/integrations/expressive-code/hast.js +2 -0
- package/dist/integrations/expressive-code/index.d.ts +60 -0
- package/dist/integrations/expressive-code/index.js +48 -0
- package/dist/integrations/expressive-code/preprocessor.d.ts +17 -0
- package/dist/integrations/expressive-code/preprocessor.js +76 -0
- package/dist/integrations/expressive-code/themes/night-owl-dark.js +4 -0
- package/dist/integrations/expressive-code/themes/night-owl-light.js +4 -0
- package/dist/integrations/expressive-code/theming.d.ts +16 -0
- package/dist/integrations/expressive-code/theming.js +71 -0
- package/dist/integrations/expressive-code/translations.d.ts +8 -0
- package/dist/integrations/expressive-code/translations.js +26 -0
- package/dist/integrations/markdown-icon.d.ts +8 -0
- package/dist/integrations/markdown-icon.js +14 -0
- package/dist/integrations/markdown-plugins.d.ts +18 -0
- package/dist/integrations/markdown-plugins.js +36 -0
- package/dist/integrations/markdown-processor.d.ts +29 -0
- package/dist/integrations/markdown-processor.js +44 -0
- package/dist/integrations/pagefind.d.ts +7 -0
- package/dist/integrations/pagefind.js +34 -0
- package/dist/integrations/rehype-code-rtl-support.d.ts +21 -0
- package/dist/integrations/rehype-code-rtl-support.js +36 -0
- package/dist/integrations/rehype-heading-links.d.ts +10 -0
- package/dist/integrations/rehype-heading-links.js +57 -0
- package/dist/integrations/remark-asides.d.ts +32 -0
- package/dist/integrations/remark-asides.js +166 -0
- package/dist/integrations/remark-rehype.d.ts +17 -0
- package/dist/integrations/remark-rehype.js +51 -0
- package/dist/integrations/satteri.d.ts +13 -0
- package/dist/integrations/satteri.js +209 -0
- package/dist/integrations/shared/absolutePathToLang.d.ts +10 -0
- package/dist/integrations/shared/absolutePathToLang.js +13 -0
- package/dist/integrations/shared/localeToLang.d.ts +10 -0
- package/dist/integrations/shared/localeToLang.js +13 -0
- package/dist/integrations/shared/slugToLocale.d.ts +12 -0
- package/dist/integrations/shared/slugToLocale.js +15 -0
- package/dist/integrations/sitemap.d.ts +12 -0
- package/dist/integrations/sitemap.js +19 -0
- package/dist/integrations/vite-layer-order.d.ts +15 -0
- package/dist/integrations/vite-layer-order.js +56 -0
- package/dist/integrations/vite-lazy-barrel-optimization.d.ts +12 -0
- package/dist/integrations/vite-lazy-barrel-optimization.js +33 -0
- package/dist/integrations/vite-virtual-modules.d.ts +14 -0
- package/dist/integrations/vite-virtual-modules.js +108 -0
- package/dist/internal.d.ts +3 -0
- package/dist/internal.js +3 -0
- package/dist/loaders.d.ts +20 -0
- package/dist/loaders.js +49 -0
- package/dist/locals.d.ts +15 -0
- package/dist/locals.js +33 -0
- package/dist/package.js +4 -0
- package/{props.ts → dist/props.d.ts} +6 -4
- package/dist/props.js +1 -0
- package/dist/route-data.d.ts +7 -0
- package/dist/route-data.js +6 -0
- package/dist/schema.d.ts +426 -0
- package/dist/schema.js +103 -0
- package/dist/schemas/badge.d.ts +86 -0
- package/dist/schemas/badge.js +39 -0
- package/dist/schemas/components.d.ts +236 -0
- package/dist/schemas/components.js +36 -0
- package/dist/schemas/expressiveCode.d.ts +7 -0
- package/dist/schemas/expressiveCode.js +5 -0
- package/dist/schemas/favicon.d.ts +9 -0
- package/dist/schemas/favicon.js +32 -0
- package/dist/schemas/head.d.ts +33 -0
- package/dist/schemas/head.js +41 -0
- package/dist/schemas/hero.d.ts +319 -0
- package/dist/schemas/hero.js +73 -0
- package/dist/schemas/i18n.d.ts +125 -0
- package/dist/schemas/i18n.js +76 -0
- package/dist/schemas/icon.d.ts +284 -0
- package/dist/schemas/icon.js +7 -0
- package/dist/schemas/locale.d.ts +20 -0
- package/dist/schemas/locale.js +11 -0
- package/dist/schemas/logo.d.ts +32 -0
- package/dist/schemas/logo.js +14 -0
- package/dist/schemas/pagefind.d.ts +166 -0
- package/dist/schemas/pagefind.js +31 -0
- package/dist/schemas/prevNextLink.d.ts +10 -0
- package/dist/schemas/prevNextLink.js +14 -0
- package/dist/schemas/sidebar.d.ts +205 -0
- package/dist/schemas/sidebar.js +71 -0
- package/dist/schemas/site-title.d.ts +7 -0
- package/dist/schemas/site-title.js +17 -0
- package/dist/schemas/social.d.ts +292 -0
- package/dist/schemas/social.js +18 -0
- package/dist/schemas/tableOfContents.d.ts +24 -0
- package/dist/schemas/tableOfContents.js +16 -0
- package/{style → dist/style}/anchor-links.css +13 -1
- package/dist/translations/ar.js +36 -0
- package/dist/translations/ca.js +46 -0
- package/dist/translations/cs.js +46 -0
- package/dist/translations/da.js +33 -0
- package/dist/translations/de.js +33 -0
- package/dist/translations/el.js +33 -0
- package/dist/translations/en.js +33 -0
- package/dist/translations/es.js +46 -0
- package/dist/translations/fa.js +33 -0
- package/dist/translations/fi.js +33 -0
- package/dist/translations/fr.js +36 -0
- package/dist/translations/gl.js +46 -0
- package/dist/translations/he.js +33 -0
- package/dist/translations/hi.js +36 -0
- package/dist/translations/hu.js +46 -0
- package/dist/translations/id.js +33 -0
- package/dist/translations/index.d.ts +48 -0
- package/dist/translations/index.js +75 -0
- package/dist/translations/it.js +36 -0
- package/dist/translations/ja.js +36 -0
- package/dist/translations/ko.js +36 -0
- package/dist/translations/lv.js +33 -0
- package/dist/translations/nb.js +33 -0
- package/dist/translations/nl.js +33 -0
- package/dist/translations/pl.js +36 -0
- package/dist/translations/pt.js +36 -0
- package/dist/translations/ro.js +33 -0
- package/dist/translations/ru.js +36 -0
- package/dist/translations/sk.js +33 -0
- package/dist/translations/sv.js +33 -0
- package/dist/translations/th.js +33 -0
- package/dist/translations/tr.js +33 -0
- package/dist/translations/uk.js +33 -0
- package/dist/translations/vi.js +33 -0
- package/dist/translations/zh-CN.js +36 -0
- package/dist/translations/zh-TW.js +36 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.js +1 -0
- package/{user-components → dist/user-components}/FileTree.astro +1 -1
- package/{user-components → dist/user-components}/Steps.astro +1 -1
- package/{user-components → dist/user-components}/TabItem.astro +1 -1
- package/{user-components → dist/user-components}/Tabs.astro +1 -1
- package/dist/user-components/file-tree-icons.d.ts +178 -0
- package/dist/user-components/file-tree-icons.js +632 -0
- package/dist/user-components/file-tree-processor.d.ts +16 -0
- package/dist/user-components/file-tree-processor.js +132 -0
- package/dist/user-components/steps-processor.d.ts +10 -0
- package/dist/user-components/steps-processor.js +39 -0
- package/dist/user-components/tabs-processor.d.ts +23 -0
- package/dist/user-components/tabs-processor.js +70 -0
- package/dist/utils/base.d.ts +7 -0
- package/dist/utils/base.js +15 -0
- package/dist/utils/canonical.d.ts +10 -0
- package/dist/utils/canonical.js +14 -0
- package/dist/utils/collection-fs.d.ts +13 -0
- package/dist/utils/collection-fs.js +19 -0
- package/{utils/collection.ts → dist/utils/collection.d.ts} +9 -20
- package/dist/utils/collection.js +26 -0
- package/dist/utils/createPathFormatter.d.ts +9 -0
- package/dist/utils/createPathFormatter.js +35 -0
- package/dist/utils/createTranslationSystem.d.ts +23 -0
- package/dist/utils/createTranslationSystem.js +84 -0
- package/dist/utils/error-map.d.ts +23 -0
- package/dist/utils/error-map.js +125 -0
- package/dist/utils/format-path.d.ts +4 -0
- package/dist/utils/format-path.js +9 -0
- package/dist/utils/generateToC.d.ts +14 -0
- package/dist/utils/generateToC.js +25 -0
- package/dist/utils/git.d.ts +12 -0
- package/dist/utils/git.js +71 -0
- package/dist/utils/gitInlined.d.ts +6 -0
- package/dist/utils/gitInlined.js +11 -0
- package/dist/utils/head.d.ts +7 -0
- package/dist/utils/head.js +233 -0
- package/dist/utils/i18n.d.ts +50 -0
- package/dist/utils/i18n.js +141 -0
- package/dist/utils/localizedUrl.d.ts +8 -0
- package/dist/utils/localizedUrl.js +28 -0
- package/dist/utils/navigation.d.ts +19 -0
- package/dist/utils/navigation.js +353 -0
- package/dist/utils/path.d.ts +21 -0
- package/dist/utils/path.js +51 -0
- package/dist/utils/plugins.d.ts +721 -0
- package/dist/utils/plugins.js +174 -0
- package/dist/utils/routing/data.d.ts +20 -0
- package/dist/utils/routing/data.js +127 -0
- package/dist/utils/routing/index.d.ts +21 -0
- package/dist/utils/routing/index.js +106 -0
- package/dist/utils/routing/middleware.d.ts +11 -0
- package/dist/utils/routing/middleware.js +65 -0
- package/dist/utils/routing/types.d.ts +93 -0
- package/dist/utils/routing/types.js +1 -0
- package/dist/utils/slugs.d.ts +45 -0
- package/dist/utils/slugs.js +104 -0
- package/dist/utils/starlight-page.d.ts +36 -0
- package/dist/utils/starlight-page.js +120 -0
- package/dist/utils/translations-fs.d.ts +15 -0
- package/dist/utils/translations-fs.js +39 -0
- package/dist/utils/translations.d.ts +20 -0
- package/dist/utils/translations.js +29 -0
- package/dist/utils/types.d.ts +5 -0
- package/dist/utils/types.js +1 -0
- package/dist/utils/url.d.ts +7 -0
- package/{utils/url.ts → dist/utils/url.js} +5 -4
- package/dist/utils/user-config.d.ts +2055 -0
- package/dist/utils/user-config.js +136 -0
- package/dist/utils/validateLogoImports.d.ts +5 -0
- package/dist/utils/validateLogoImports.js +16 -0
- package/dist/utils/zodDeepMerge.d.ts +16 -0
- package/dist/utils/zodDeepMerge.js +53 -0
- package/package.json +62 -33
- package/CHANGELOG.md +0 -3043
- package/components/MobileMenuToggle.astro +0 -114
- package/components-internals/Icons.ts +0 -248
- package/components-internals/SidebarPersistState.ts +0 -71
- package/components-internals/TableOfContents/starlight-toc.ts +0 -127
- package/constants.ts +0 -4
- package/expressive-code.mjs +0 -23
- package/global.d.ts +0 -11
- package/i18n.d.ts +0 -18
- package/index.ts +0 -200
- package/integrations/aside-utils.ts +0 -41
- package/integrations/expressive-code/hast.d.ts +0 -5
- package/integrations/expressive-code/hast.mjs +0 -9
- package/integrations/expressive-code/index.ts +0 -125
- package/integrations/expressive-code/preprocessor.ts +0 -126
- package/integrations/expressive-code/themes/night-owl-dark.jsonc +0 -1796
- package/integrations/expressive-code/themes/night-owl-light.jsonc +0 -1695
- package/integrations/expressive-code/theming.ts +0 -105
- package/integrations/expressive-code/translations.ts +0 -36
- package/integrations/markdown-icon.ts +0 -13
- package/integrations/markdown-plugins.ts +0 -71
- package/integrations/markdown-processor.ts +0 -64
- package/integrations/pagefind.ts +0 -60
- package/integrations/rehype-code-rtl-support.ts +0 -37
- package/integrations/rehype-heading-links.ts +0 -79
- package/integrations/remark-asides.ts +0 -219
- package/integrations/remark-rehype.ts +0 -87
- package/integrations/satteri.ts +0 -265
- package/integrations/shared/absolutePathToLang.ts +0 -26
- package/integrations/shared/localeToLang.ts +0 -15
- package/integrations/shared/slugToLocale.ts +0 -18
- package/integrations/sitemap.ts +0 -23
- package/integrations/vite-layer-order.ts +0 -69
- package/integrations/vite-lazy-barrel-optimization.ts +0 -40
- package/integrations/vite-virtual-modules.ts +0 -175
- package/internal.ts +0 -6
- package/loaders.ts +0 -63
- package/locals.d.ts +0 -43
- package/locals.ts +0 -43
- package/route-data.ts +0 -11
- package/schema.ts +0 -167
- package/schemas/badge.ts +0 -40
- package/schemas/components.ts +0 -265
- package/schemas/expressiveCode.ts +0 -12
- package/schemas/favicon.ts +0 -40
- package/schemas/head.ts +0 -50
- package/schemas/hero.ts +0 -69
- package/schemas/i18n.ts +0 -244
- package/schemas/icon.ts +0 -7
- package/schemas/logo.ts +0 -28
- package/schemas/pagefind.ts +0 -128
- package/schemas/prevNextLink.ts +0 -18
- package/schemas/sidebar.ts +0 -163
- package/schemas/site-title.ts +0 -20
- package/schemas/social.ts +0 -23
- package/schemas/tableOfContents.ts +0 -21
- package/translations/README.md +0 -14
- package/translations/ar.json +0 -33
- package/translations/ca.json +0 -43
- package/translations/cs.json +0 -43
- package/translations/da.json +0 -30
- package/translations/de.json +0 -30
- package/translations/el.json +0 -30
- package/translations/en.json +0 -30
- package/translations/es.json +0 -43
- package/translations/fa.json +0 -30
- package/translations/fi.json +0 -30
- package/translations/fr.json +0 -33
- package/translations/gl.json +0 -43
- package/translations/he.json +0 -30
- package/translations/hi.json +0 -33
- package/translations/hu.json +0 -43
- package/translations/id.json +0 -30
- package/translations/index.ts +0 -76
- package/translations/it.json +0 -33
- package/translations/ja.json +0 -33
- package/translations/ko.json +0 -33
- package/translations/lv.json +0 -30
- package/translations/nb.json +0 -30
- package/translations/nl.json +0 -30
- package/translations/pl.json +0 -33
- package/translations/pt.json +0 -33
- package/translations/ro.json +0 -30
- package/translations/ru.json +0 -33
- package/translations/sk.json +0 -30
- package/translations/sv.json +0 -30
- package/translations/th.json +0 -30
- package/translations/tr.json +0 -30
- package/translations/uk.json +0 -30
- package/translations/vi.json +0 -30
- package/translations/zh-CN.json +0 -33
- package/translations/zh-TW.json +0 -33
- package/types.ts +0 -7
- package/user-components/file-tree-icons.ts +0 -782
- package/user-components/rehype-file-tree.ts +0 -251
- package/user-components/rehype-steps.ts +0 -85
- package/user-components/rehype-tabs.ts +0 -121
- package/utils/base.ts +0 -15
- package/utils/canonical.ts +0 -19
- package/utils/collection-fs.ts +0 -20
- package/utils/createPathFormatter.ts +0 -60
- package/utils/createTranslationSystem.ts +0 -137
- package/utils/error-map.ts +0 -222
- package/utils/format-path.ts +0 -7
- package/utils/generateToC.ts +0 -33
- package/utils/git.ts +0 -121
- package/utils/gitInlined.ts +0 -20
- package/utils/head.ts +0 -235
- package/utils/i18n.ts +0 -221
- package/utils/localizedUrl.ts +0 -51
- package/utils/navigation.ts +0 -566
- package/utils/path.ts +0 -58
- package/utils/plugins.ts +0 -498
- package/utils/routing/data.ts +0 -154
- package/utils/routing/index.ts +0 -135
- package/utils/routing/middleware.ts +0 -81
- package/utils/routing/types.ts +0 -101
- package/utils/slugs.ts +0 -119
- package/utils/starlight-page.ts +0 -205
- package/utils/translations-fs.ts +0 -54
- package/utils/translations.ts +0 -57
- package/utils/types.ts +0 -15
- package/utils/user-config.ts +0 -348
- package/utils/validateLogoImports.ts +0 -21
- package/utils/zodDeepMerge.ts +0 -144
- package/virtual-internal.d.ts +0 -149
- package/virtual.d.ts +0 -27
- /package/{components → dist/components}/AnchorHeading.astro +0 -0
- /package/{components → dist/components}/Banner.astro +0 -0
- /package/{components → dist/components}/ContentNotice.astro +0 -0
- /package/{components → dist/components}/ContentPanel.astro +0 -0
- /package/{components → dist/components}/DraftContentNotice.astro +0 -0
- /package/{components → dist/components}/EditLink.astro +0 -0
- /package/{components → dist/components}/FallbackContentNotice.astro +0 -0
- /package/{components → dist/components}/Footer.astro +0 -0
- /package/{components → dist/components}/Head.astro +0 -0
- /package/{components → dist/components}/Header.astro +0 -0
- /package/{components → dist/components}/Hero.astro +0 -0
- /package/{components → dist/components}/LanguageSelect.astro +0 -0
- /package/{components → dist/components}/LastUpdated.astro +0 -0
- /package/{components → dist/components}/MarkdownContent.astro +0 -0
- /package/{components → dist/components}/MobileMenuFooter.astro +0 -0
- /package/{components → dist/components}/MobileTableOfContents.astro +0 -0
- /package/{components → dist/components}/Page.astro +0 -0
- /package/{components → dist/components}/PageSidebar.astro +0 -0
- /package/{components → dist/components}/PageTitle.astro +0 -0
- /package/{components → dist/components}/Pagination.astro +0 -0
- /package/{components → dist/components}/Search.astro +0 -0
- /package/{components → dist/components}/Select.astro +0 -0
- /package/{components → dist/components}/Sidebar.astro +0 -0
- /package/{components → dist/components}/SidebarPersister.astro +0 -0
- /package/{components → dist/components}/SidebarRestorePoint.astro +0 -0
- /package/{components → dist/components}/SidebarSublist.astro +0 -0
- /package/{components → dist/components}/SiteTitle.astro +0 -0
- /package/{components → dist/components}/SkipLink.astro +0 -0
- /package/{components → dist/components}/SocialIcons.astro +0 -0
- /package/{components → dist/components}/StarlightPage.astro +0 -0
- /package/{components → dist/components}/TableOfContents.astro +0 -0
- /package/{components → dist/components}/ThemeProvider.astro +0 -0
- /package/{components → dist/components}/ThemeSelect.astro +0 -0
- /package/{components → dist/components}/TwoColumnContent.astro +0 -0
- /package/{components-internals → dist/components-internals}/TableOfContents/TableOfContentsList.astro +0 -0
- /package/{components.ts → dist/components.ts} +0 -0
- /package/{routes → dist/routes}/common.astro +0 -0
- /package/{routes → dist/routes}/ssr/404.astro +0 -0
- /package/{routes → dist/routes}/ssr/index.astro +0 -0
- /package/{routes → dist/routes}/static/404.astro +0 -0
- /package/{routes → dist/routes}/static/index.astro +0 -0
- /package/{style → dist/style}/asides.css +0 -0
- /package/{style → dist/style}/layers.css +0 -0
- /package/{style → dist/style}/markdown.css +0 -0
- /package/{style → dist/style}/print.css +0 -0
- /package/{style → dist/style}/props.css +0 -0
- /package/{style → dist/style}/reset.css +0 -0
- /package/{style → dist/style}/util.css +0 -0
- /package/{user-components → dist/user-components}/Aside.astro +0 -0
- /package/{user-components → dist/user-components}/Badge.astro +0 -0
- /package/{user-components → dist/user-components}/Card.astro +0 -0
- /package/{user-components → dist/user-components}/CardGrid.astro +0 -0
- /package/{user-components → dist/user-components}/Icon.astro +0 -0
- /package/{user-components → dist/user-components}/LinkButton.astro +0 -0
- /package/{user-components → dist/user-components}/LinkCard.astro +0 -0
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import { LinkHTMLAttributes } from "./schemas/sidebar.js";
|
|
2
|
+
import { i18nSchema } from "./schemas/i18n.js";
|
|
3
|
+
import { DeepMergedSchema } from "./utils/zodDeepMerge.js";
|
|
4
|
+
import { z } from "astro/zod";
|
|
5
|
+
import { SchemaContext } from "astro:content";
|
|
6
|
+
//#region src/schema.d.ts
|
|
7
|
+
/** Default content collection schema for Starlight’s `docs` collection. */
|
|
8
|
+
declare const StarlightFrontmatterSchema: (context: SchemaContext) => z.ZodObject<{
|
|
9
|
+
title: z.ZodString;
|
|
10
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11
|
+
editUrl: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodBoolean]>>>;
|
|
12
|
+
head: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
13
|
+
tag: z.ZodEnum<{
|
|
14
|
+
base: "base";
|
|
15
|
+
link: "link";
|
|
16
|
+
meta: "meta";
|
|
17
|
+
noscript: "noscript";
|
|
18
|
+
script: "script";
|
|
19
|
+
style: "style";
|
|
20
|
+
template: "template";
|
|
21
|
+
title: "title";
|
|
22
|
+
}>;
|
|
23
|
+
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodUndefined]>>>;
|
|
24
|
+
content: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>>>;
|
|
26
|
+
tableOfContents: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
27
|
+
minHeadingLevel: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
28
|
+
maxHeadingLevel: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
29
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodBoolean, z.ZodTransform<false | {
|
|
30
|
+
minHeadingLevel: number;
|
|
31
|
+
maxHeadingLevel: number;
|
|
32
|
+
}, boolean>>]>>;
|
|
33
|
+
template: z.ZodDefault<z.ZodEnum<{
|
|
34
|
+
doc: "doc";
|
|
35
|
+
splash: "splash";
|
|
36
|
+
}>>;
|
|
37
|
+
hero: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
title: z.ZodOptional<z.ZodString>;
|
|
39
|
+
tagline: z.ZodOptional<z.ZodString>;
|
|
40
|
+
image: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
41
|
+
alt: z.ZodDefault<z.ZodString>;
|
|
42
|
+
file: any;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
alt: z.ZodDefault<z.ZodString>;
|
|
45
|
+
dark: any;
|
|
46
|
+
light: any;
|
|
47
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
48
|
+
html: z.ZodString;
|
|
49
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
50
|
+
html: string;
|
|
51
|
+
alt: string;
|
|
52
|
+
}, {
|
|
53
|
+
html: string;
|
|
54
|
+
}>>]>>;
|
|
55
|
+
actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
56
|
+
text: z.ZodString;
|
|
57
|
+
link: z.ZodString;
|
|
58
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
59
|
+
primary: "primary";
|
|
60
|
+
secondary: "secondary";
|
|
61
|
+
minimal: "minimal";
|
|
62
|
+
}>>;
|
|
63
|
+
icon: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodEnum<{
|
|
64
|
+
server: "server";
|
|
65
|
+
external: "external";
|
|
66
|
+
error: "error";
|
|
67
|
+
link: "link";
|
|
68
|
+
"up-caret": "up-caret";
|
|
69
|
+
"down-caret": "down-caret";
|
|
70
|
+
"right-caret": "right-caret";
|
|
71
|
+
"left-caret": "left-caret";
|
|
72
|
+
"up-arrow": "up-arrow";
|
|
73
|
+
"down-arrow": "down-arrow";
|
|
74
|
+
"right-arrow": "right-arrow";
|
|
75
|
+
"left-arrow": "left-arrow";
|
|
76
|
+
bars: "bars";
|
|
77
|
+
translate: "translate";
|
|
78
|
+
pencil: "pencil";
|
|
79
|
+
pen: "pen";
|
|
80
|
+
document: "document";
|
|
81
|
+
"add-document": "add-document";
|
|
82
|
+
setting: "setting";
|
|
83
|
+
"link-alt": "link-alt";
|
|
84
|
+
download: "download";
|
|
85
|
+
"cloud-download": "cloud-download";
|
|
86
|
+
moon: "moon";
|
|
87
|
+
sun: "sun";
|
|
88
|
+
clock: "clock";
|
|
89
|
+
laptop: "laptop";
|
|
90
|
+
desktop: "desktop";
|
|
91
|
+
"mobile-android": "mobile-android";
|
|
92
|
+
window: "window";
|
|
93
|
+
database: "database";
|
|
94
|
+
"code-branch": "code-branch";
|
|
95
|
+
"open-book": "open-book";
|
|
96
|
+
notes: "notes";
|
|
97
|
+
information: "information";
|
|
98
|
+
magnifier: "magnifier";
|
|
99
|
+
"forward-slash": "forward-slash";
|
|
100
|
+
close: "close";
|
|
101
|
+
warning: "warning";
|
|
102
|
+
"approve-check-circle": "approve-check-circle";
|
|
103
|
+
"approve-check": "approve-check";
|
|
104
|
+
"question-circle": "question-circle";
|
|
105
|
+
question: "question";
|
|
106
|
+
rocket: "rocket";
|
|
107
|
+
star: "star";
|
|
108
|
+
puzzle: "puzzle";
|
|
109
|
+
"list-format": "list-format";
|
|
110
|
+
analytics: "analytics";
|
|
111
|
+
random: "random";
|
|
112
|
+
padlock: "padlock";
|
|
113
|
+
comment: "comment";
|
|
114
|
+
"comment-alt": "comment-alt";
|
|
115
|
+
heart: "heart";
|
|
116
|
+
github: "github";
|
|
117
|
+
gitlab: "gitlab";
|
|
118
|
+
bitbucket: "bitbucket";
|
|
119
|
+
forgejo: "forgejo";
|
|
120
|
+
codePen: "codePen";
|
|
121
|
+
farcaster: "farcaster";
|
|
122
|
+
discord: "discord";
|
|
123
|
+
gitter: "gitter";
|
|
124
|
+
twitter: "twitter";
|
|
125
|
+
"x.com": "x.com";
|
|
126
|
+
mastodon: "mastodon";
|
|
127
|
+
codeberg: "codeberg";
|
|
128
|
+
youtube: "youtube";
|
|
129
|
+
threads: "threads";
|
|
130
|
+
linkedin: "linkedin";
|
|
131
|
+
twitch: "twitch";
|
|
132
|
+
azureDevOps: "azureDevOps";
|
|
133
|
+
microsoftTeams: "microsoftTeams";
|
|
134
|
+
instagram: "instagram";
|
|
135
|
+
stackOverflow: "stackOverflow";
|
|
136
|
+
telegram: "telegram";
|
|
137
|
+
whatsApp: "whatsApp";
|
|
138
|
+
rss: "rss";
|
|
139
|
+
facebook: "facebook";
|
|
140
|
+
email: "email";
|
|
141
|
+
phone: "phone";
|
|
142
|
+
reddit: "reddit";
|
|
143
|
+
patreon: "patreon";
|
|
144
|
+
signal: "signal";
|
|
145
|
+
slack: "slack";
|
|
146
|
+
matrix: "matrix";
|
|
147
|
+
hackerOne: "hackerOne";
|
|
148
|
+
openCollective: "openCollective";
|
|
149
|
+
blueSky: "blueSky";
|
|
150
|
+
discourse: "discourse";
|
|
151
|
+
zulip: "zulip";
|
|
152
|
+
pinterest: "pinterest";
|
|
153
|
+
tiktok: "tiktok";
|
|
154
|
+
goodreads: "goodreads";
|
|
155
|
+
hypothesis: "hypothesis";
|
|
156
|
+
astro: "astro";
|
|
157
|
+
solidjs: "solidjs";
|
|
158
|
+
alpine: "alpine";
|
|
159
|
+
pnpm: "pnpm";
|
|
160
|
+
biome: "biome";
|
|
161
|
+
bun: "bun";
|
|
162
|
+
mdx: "mdx";
|
|
163
|
+
apple: "apple";
|
|
164
|
+
linux: "linux";
|
|
165
|
+
homebrew: "homebrew";
|
|
166
|
+
nix: "nix";
|
|
167
|
+
starlight: "starlight";
|
|
168
|
+
pkl: "pkl";
|
|
169
|
+
node: "node";
|
|
170
|
+
cloudflare: "cloudflare";
|
|
171
|
+
vercel: "vercel";
|
|
172
|
+
netlify: "netlify";
|
|
173
|
+
deno: "deno";
|
|
174
|
+
jsr: "jsr";
|
|
175
|
+
nostr: "nostr";
|
|
176
|
+
backstage: "backstage";
|
|
177
|
+
confluence: "confluence";
|
|
178
|
+
jira: "jira";
|
|
179
|
+
storybook: "storybook";
|
|
180
|
+
vscode: "vscode";
|
|
181
|
+
jetbrains: "jetbrains";
|
|
182
|
+
zed: "zed";
|
|
183
|
+
vim: "vim";
|
|
184
|
+
figma: "figma";
|
|
185
|
+
sketch: "sketch";
|
|
186
|
+
npm: "npm";
|
|
187
|
+
npmx: "npmx";
|
|
188
|
+
sourcehut: "sourcehut";
|
|
189
|
+
substack: "substack";
|
|
190
|
+
chrome: "chrome";
|
|
191
|
+
edge: "edge";
|
|
192
|
+
firefox: "firefox";
|
|
193
|
+
safari: "safari";
|
|
194
|
+
"seti:folder": "seti:folder";
|
|
195
|
+
"seti:bsl": "seti:bsl";
|
|
196
|
+
"seti:mdo": "seti:mdo";
|
|
197
|
+
"seti:salesforce": "seti:salesforce";
|
|
198
|
+
"seti:asm": "seti:asm";
|
|
199
|
+
"seti:bicep": "seti:bicep";
|
|
200
|
+
"seti:bazel": "seti:bazel";
|
|
201
|
+
"seti:c": "seti:c";
|
|
202
|
+
"seti:c-sharp": "seti:c-sharp";
|
|
203
|
+
"seti:html": "seti:html";
|
|
204
|
+
"seti:cpp": "seti:cpp";
|
|
205
|
+
"seti:clojure": "seti:clojure";
|
|
206
|
+
"seti:coldfusion": "seti:coldfusion";
|
|
207
|
+
"seti:config": "seti:config";
|
|
208
|
+
"seti:crystal": "seti:crystal";
|
|
209
|
+
"seti:crystal_embedded": "seti:crystal_embedded";
|
|
210
|
+
"seti:json": "seti:json";
|
|
211
|
+
"seti:css": "seti:css";
|
|
212
|
+
"seti:csv": "seti:csv";
|
|
213
|
+
"seti:xls": "seti:xls";
|
|
214
|
+
"seti:cu": "seti:cu";
|
|
215
|
+
"seti:cake": "seti:cake";
|
|
216
|
+
"seti:cake_php": "seti:cake_php";
|
|
217
|
+
"seti:d": "seti:d";
|
|
218
|
+
"seti:word": "seti:word";
|
|
219
|
+
"seti:elixir": "seti:elixir";
|
|
220
|
+
"seti:elixir_script": "seti:elixir_script";
|
|
221
|
+
"seti:hex": "seti:hex";
|
|
222
|
+
"seti:elm": "seti:elm";
|
|
223
|
+
"seti:favicon": "seti:favicon";
|
|
224
|
+
"seti:f-sharp": "seti:f-sharp";
|
|
225
|
+
"seti:git": "seti:git";
|
|
226
|
+
"seti:go": "seti:go";
|
|
227
|
+
"seti:godot": "seti:godot";
|
|
228
|
+
"seti:gradle": "seti:gradle";
|
|
229
|
+
"seti:grails": "seti:grails";
|
|
230
|
+
"seti:graphql": "seti:graphql";
|
|
231
|
+
"seti:hacklang": "seti:hacklang";
|
|
232
|
+
"seti:haml": "seti:haml";
|
|
233
|
+
"seti:mustache": "seti:mustache";
|
|
234
|
+
"seti:haskell": "seti:haskell";
|
|
235
|
+
"seti:haxe": "seti:haxe";
|
|
236
|
+
"seti:jade": "seti:jade";
|
|
237
|
+
"seti:java": "seti:java";
|
|
238
|
+
"seti:javascript": "seti:javascript";
|
|
239
|
+
"seti:jinja": "seti:jinja";
|
|
240
|
+
"seti:julia": "seti:julia";
|
|
241
|
+
"seti:karma": "seti:karma";
|
|
242
|
+
"seti:kotlin": "seti:kotlin";
|
|
243
|
+
"seti:dart": "seti:dart";
|
|
244
|
+
"seti:liquid": "seti:liquid";
|
|
245
|
+
"seti:livescript": "seti:livescript";
|
|
246
|
+
"seti:lua": "seti:lua";
|
|
247
|
+
"seti:markdown": "seti:markdown";
|
|
248
|
+
"seti:argdown": "seti:argdown";
|
|
249
|
+
"seti:info": "seti:info";
|
|
250
|
+
"seti:clock": "seti:clock";
|
|
251
|
+
"seti:maven": "seti:maven";
|
|
252
|
+
"seti:nim": "seti:nim";
|
|
253
|
+
"seti:github": "seti:github";
|
|
254
|
+
"seti:notebook": "seti:notebook";
|
|
255
|
+
"seti:nunjucks": "seti:nunjucks";
|
|
256
|
+
"seti:npm": "seti:npm";
|
|
257
|
+
"seti:ocaml": "seti:ocaml";
|
|
258
|
+
"seti:odata": "seti:odata";
|
|
259
|
+
"seti:perl": "seti:perl";
|
|
260
|
+
"seti:php": "seti:php";
|
|
261
|
+
"seti:pipeline": "seti:pipeline";
|
|
262
|
+
"seti:pddl": "seti:pddl";
|
|
263
|
+
"seti:plan": "seti:plan";
|
|
264
|
+
"seti:happenings": "seti:happenings";
|
|
265
|
+
"seti:powershell": "seti:powershell";
|
|
266
|
+
"seti:prisma": "seti:prisma";
|
|
267
|
+
"seti:pug": "seti:pug";
|
|
268
|
+
"seti:puppet": "seti:puppet";
|
|
269
|
+
"seti:purescript": "seti:purescript";
|
|
270
|
+
"seti:python": "seti:python";
|
|
271
|
+
"seti:react": "seti:react";
|
|
272
|
+
"seti:rescript": "seti:rescript";
|
|
273
|
+
"seti:R": "seti:R";
|
|
274
|
+
"seti:ruby": "seti:ruby";
|
|
275
|
+
"seti:rust": "seti:rust";
|
|
276
|
+
"seti:sass": "seti:sass";
|
|
277
|
+
"seti:spring": "seti:spring";
|
|
278
|
+
"seti:slim": "seti:slim";
|
|
279
|
+
"seti:smarty": "seti:smarty";
|
|
280
|
+
"seti:sbt": "seti:sbt";
|
|
281
|
+
"seti:scala": "seti:scala";
|
|
282
|
+
"seti:ethereum": "seti:ethereum";
|
|
283
|
+
"seti:stylus": "seti:stylus";
|
|
284
|
+
"seti:svelte": "seti:svelte";
|
|
285
|
+
"seti:swift": "seti:swift";
|
|
286
|
+
"seti:db": "seti:db";
|
|
287
|
+
"seti:terraform": "seti:terraform";
|
|
288
|
+
"seti:tex": "seti:tex";
|
|
289
|
+
"seti:default": "seti:default";
|
|
290
|
+
"seti:twig": "seti:twig";
|
|
291
|
+
"seti:typescript": "seti:typescript";
|
|
292
|
+
"seti:tsconfig": "seti:tsconfig";
|
|
293
|
+
"seti:vala": "seti:vala";
|
|
294
|
+
"seti:vite": "seti:vite";
|
|
295
|
+
"seti:vue": "seti:vue";
|
|
296
|
+
"seti:wasm": "seti:wasm";
|
|
297
|
+
"seti:wat": "seti:wat";
|
|
298
|
+
"seti:xml": "seti:xml";
|
|
299
|
+
"seti:yml": "seti:yml";
|
|
300
|
+
"seti:prolog": "seti:prolog";
|
|
301
|
+
"seti:zig": "seti:zig";
|
|
302
|
+
"seti:zip": "seti:zip";
|
|
303
|
+
"seti:wgt": "seti:wgt";
|
|
304
|
+
"seti:illustrator": "seti:illustrator";
|
|
305
|
+
"seti:photoshop": "seti:photoshop";
|
|
306
|
+
"seti:pdf": "seti:pdf";
|
|
307
|
+
"seti:font": "seti:font";
|
|
308
|
+
"seti:image": "seti:image";
|
|
309
|
+
"seti:svg": "seti:svg";
|
|
310
|
+
"seti:sublime": "seti:sublime";
|
|
311
|
+
"seti:code-search": "seti:code-search";
|
|
312
|
+
"seti:shell": "seti:shell";
|
|
313
|
+
"seti:video": "seti:video";
|
|
314
|
+
"seti:audio": "seti:audio";
|
|
315
|
+
"seti:windows": "seti:windows";
|
|
316
|
+
"seti:jenkins": "seti:jenkins";
|
|
317
|
+
"seti:babel": "seti:babel";
|
|
318
|
+
"seti:bower": "seti:bower";
|
|
319
|
+
"seti:docker": "seti:docker";
|
|
320
|
+
"seti:code-climate": "seti:code-climate";
|
|
321
|
+
"seti:eslint": "seti:eslint";
|
|
322
|
+
"seti:firebase": "seti:firebase";
|
|
323
|
+
"seti:firefox": "seti:firefox";
|
|
324
|
+
"seti:gitlab": "seti:gitlab";
|
|
325
|
+
"seti:grunt": "seti:grunt";
|
|
326
|
+
"seti:gulp": "seti:gulp";
|
|
327
|
+
"seti:ionic": "seti:ionic";
|
|
328
|
+
"seti:platformio": "seti:platformio";
|
|
329
|
+
"seti:rollup": "seti:rollup";
|
|
330
|
+
"seti:stylelint": "seti:stylelint";
|
|
331
|
+
"seti:yarn": "seti:yarn";
|
|
332
|
+
"seti:webpack": "seti:webpack";
|
|
333
|
+
"seti:lock": "seti:lock";
|
|
334
|
+
"seti:license": "seti:license";
|
|
335
|
+
"seti:makefile": "seti:makefile";
|
|
336
|
+
"seti:heroku": "seti:heroku";
|
|
337
|
+
"seti:todo": "seti:todo";
|
|
338
|
+
"seti:ignored": "seti:ignored";
|
|
339
|
+
}>, z.ZodString]>, z.ZodTransform<{
|
|
340
|
+
readonly type: "icon";
|
|
341
|
+
readonly name: "server" | "external" | "error" | "link" | "up-caret" | "down-caret" | "right-caret" | "left-caret" | "up-arrow" | "down-arrow" | "right-arrow" | "left-arrow" | "bars" | "translate" | "pencil" | "pen" | "document" | "add-document" | "setting" | "link-alt" | "download" | "cloud-download" | "moon" | "sun" | "clock" | "laptop" | "desktop" | "mobile-android" | "window" | "database" | "code-branch" | "open-book" | "notes" | "information" | "magnifier" | "forward-slash" | "close" | "warning" | "approve-check-circle" | "approve-check" | "question-circle" | "question" | "rocket" | "star" | "puzzle" | "list-format" | "analytics" | "random" | "padlock" | "comment" | "comment-alt" | "heart" | "github" | "gitlab" | "bitbucket" | "forgejo" | "codePen" | "farcaster" | "discord" | "gitter" | "twitter" | "x.com" | "mastodon" | "codeberg" | "youtube" | "threads" | "linkedin" | "twitch" | "azureDevOps" | "microsoftTeams" | "instagram" | "stackOverflow" | "telegram" | "whatsApp" | "rss" | "facebook" | "email" | "phone" | "reddit" | "patreon" | "signal" | "slack" | "matrix" | "hackerOne" | "openCollective" | "blueSky" | "discourse" | "zulip" | "pinterest" | "tiktok" | "goodreads" | "hypothesis" | "astro" | "solidjs" | "alpine" | "pnpm" | "biome" | "bun" | "mdx" | "apple" | "linux" | "homebrew" | "nix" | "starlight" | "pkl" | "node" | "cloudflare" | "vercel" | "netlify" | "deno" | "jsr" | "nostr" | "backstage" | "confluence" | "jira" | "storybook" | "vscode" | "jetbrains" | "zed" | "vim" | "figma" | "sketch" | "npm" | "npmx" | "sourcehut" | "substack" | "chrome" | "edge" | "firefox" | "safari" | "seti:folder" | "seti:bsl" | "seti:mdo" | "seti:salesforce" | "seti:asm" | "seti:bicep" | "seti:bazel" | "seti:c" | "seti:c-sharp" | "seti:html" | "seti:cpp" | "seti:clojure" | "seti:coldfusion" | "seti:config" | "seti:crystal" | "seti:crystal_embedded" | "seti:json" | "seti:css" | "seti:csv" | "seti:xls" | "seti:cu" | "seti:cake" | "seti:cake_php" | "seti:d" | "seti:word" | "seti:elixir" | "seti:elixir_script" | "seti:hex" | "seti:elm" | "seti:favicon" | "seti:f-sharp" | "seti:git" | "seti:go" | "seti:godot" | "seti:gradle" | "seti:grails" | "seti:graphql" | "seti:hacklang" | "seti:haml" | "seti:mustache" | "seti:haskell" | "seti:haxe" | "seti:jade" | "seti:java" | "seti:javascript" | "seti:jinja" | "seti:julia" | "seti:karma" | "seti:kotlin" | "seti:dart" | "seti:liquid" | "seti:livescript" | "seti:lua" | "seti:markdown" | "seti:argdown" | "seti:info" | "seti:clock" | "seti:maven" | "seti:nim" | "seti:github" | "seti:notebook" | "seti:nunjucks" | "seti:npm" | "seti:ocaml" | "seti:odata" | "seti:perl" | "seti:php" | "seti:pipeline" | "seti:pddl" | "seti:plan" | "seti:happenings" | "seti:powershell" | "seti:prisma" | "seti:pug" | "seti:puppet" | "seti:purescript" | "seti:python" | "seti:react" | "seti:rescript" | "seti:R" | "seti:ruby" | "seti:rust" | "seti:sass" | "seti:spring" | "seti:slim" | "seti:smarty" | "seti:sbt" | "seti:scala" | "seti:ethereum" | "seti:stylus" | "seti:svelte" | "seti:swift" | "seti:db" | "seti:terraform" | "seti:tex" | "seti:default" | "seti:twig" | "seti:typescript" | "seti:tsconfig" | "seti:vala" | "seti:vite" | "seti:vue" | "seti:wasm" | "seti:wat" | "seti:xml" | "seti:yml" | "seti:prolog" | "seti:zig" | "seti:zip" | "seti:wgt" | "seti:illustrator" | "seti:photoshop" | "seti:pdf" | "seti:font" | "seti:image" | "seti:svg" | "seti:sublime" | "seti:code-search" | "seti:shell" | "seti:video" | "seti:audio" | "seti:windows" | "seti:jenkins" | "seti:babel" | "seti:bower" | "seti:docker" | "seti:code-climate" | "seti:eslint" | "seti:firebase" | "seti:firefox" | "seti:gitlab" | "seti:grunt" | "seti:gulp" | "seti:ionic" | "seti:platformio" | "seti:rollup" | "seti:stylelint" | "seti:yarn" | "seti:webpack" | "seti:lock" | "seti:license" | "seti:makefile" | "seti:heroku" | "seti:todo" | "seti:ignored";
|
|
342
|
+
readonly html?: never;
|
|
343
|
+
} | {
|
|
344
|
+
readonly type: "raw";
|
|
345
|
+
readonly html: string;
|
|
346
|
+
readonly name?: never;
|
|
347
|
+
}, string>>>;
|
|
348
|
+
attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
349
|
+
}, z.core.$strip>>>;
|
|
350
|
+
}, z.core.$strip>>;
|
|
351
|
+
lastUpdated: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodBoolean]>>;
|
|
352
|
+
prev: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodObject<{
|
|
353
|
+
link: z.ZodOptional<z.ZodString>;
|
|
354
|
+
label: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, z.core.$strict>]>>;
|
|
356
|
+
next: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodObject<{
|
|
357
|
+
link: z.ZodOptional<z.ZodString>;
|
|
358
|
+
label: z.ZodOptional<z.ZodString>;
|
|
359
|
+
}, z.core.$strict>]>>;
|
|
360
|
+
sidebar: z.ZodPrefault<z.ZodObject<{
|
|
361
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
362
|
+
label: z.ZodOptional<z.ZodString>;
|
|
363
|
+
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
364
|
+
badge: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
365
|
+
text: z.ZodString;
|
|
366
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
367
|
+
default: "default";
|
|
368
|
+
success: "success";
|
|
369
|
+
note: "note";
|
|
370
|
+
tip: "tip";
|
|
371
|
+
caution: "caution";
|
|
372
|
+
danger: "danger";
|
|
373
|
+
}>>;
|
|
374
|
+
class: z.ZodOptional<z.ZodString>;
|
|
375
|
+
}, z.core.$strip>]>, z.ZodTransform<{
|
|
376
|
+
text: string;
|
|
377
|
+
variant: "default" | "success" | "note" | "tip" | "caution" | "danger";
|
|
378
|
+
class?: string | undefined;
|
|
379
|
+
}, string | {
|
|
380
|
+
text: string;
|
|
381
|
+
variant: "default" | "success" | "note" | "tip" | "caution" | "danger";
|
|
382
|
+
class?: string | undefined;
|
|
383
|
+
}>>>;
|
|
384
|
+
attrs: z.ZodDefault<z.ZodType<LinkHTMLAttributes, LinkHTMLAttributes, z.core.$ZodTypeInternals<LinkHTMLAttributes, LinkHTMLAttributes>>>;
|
|
385
|
+
}, z.core.$strip>>;
|
|
386
|
+
banner: z.ZodOptional<z.ZodObject<{
|
|
387
|
+
content: z.ZodString;
|
|
388
|
+
}, z.core.$strip>>;
|
|
389
|
+
pagefind: z.ZodDefault<z.ZodBoolean>;
|
|
390
|
+
draft: z.ZodDefault<z.ZodBoolean>;
|
|
391
|
+
}, z.core.$strip>;
|
|
392
|
+
/** Type of Starlight’s default frontmatter schema. */
|
|
393
|
+
type DefaultSchema = ReturnType<typeof StarlightFrontmatterSchema>;
|
|
394
|
+
/** Base subset of Zod types that we support passing to the `extend` option. */
|
|
395
|
+
type BaseObjectSchema = z.ZodObject<z.ZodRawShape, z.core.$ZodObjectConfig>;
|
|
396
|
+
type BaseSchema = BaseObjectSchema | z.ZodUnion<readonly BaseObjectSchema[]>;
|
|
397
|
+
/** Type that extends Starlight’s default schema with an optional, user-defined schema. */
|
|
398
|
+
type ExtendedSchema<T extends BaseSchema = never> = [T] extends [never] ? DefaultSchema : DeepMergedSchema<DefaultSchema, T>;
|
|
399
|
+
interface DocsSchemaOpts<T extends BaseSchema> {
|
|
400
|
+
/**
|
|
401
|
+
* Extend Starlight’s schema with additional fields.
|
|
402
|
+
*
|
|
403
|
+
* @example
|
|
404
|
+
* // Extend the built-in schema with a Zod schema.
|
|
405
|
+
* docsSchema({
|
|
406
|
+
* extend: z.object({
|
|
407
|
+
* // Add a new field to the schema.
|
|
408
|
+
* category: z.enum(['tutorial', 'guide', 'reference']).optional(),
|
|
409
|
+
* }),
|
|
410
|
+
* })
|
|
411
|
+
*
|
|
412
|
+
* // Use the Astro image helper.
|
|
413
|
+
* docsSchema({
|
|
414
|
+
* extend: ({ image }) => {
|
|
415
|
+
* return z.object({
|
|
416
|
+
* cover: image(),
|
|
417
|
+
* });
|
|
418
|
+
* },
|
|
419
|
+
* })
|
|
420
|
+
*/
|
|
421
|
+
extend?: T | ((context: SchemaContext) => T);
|
|
422
|
+
}
|
|
423
|
+
/** Content collection schema for Starlight’s `docs` collection. */
|
|
424
|
+
declare function docsSchema<T extends BaseSchema = never>(...args: [DocsSchemaOpts<T>?]): (context: SchemaContext) => ExtendedSchema<T>;
|
|
425
|
+
//#endregion
|
|
426
|
+
export { docsSchema, i18nSchema };
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { HeadConfigSchema } from "./schemas/head.js";
|
|
2
|
+
import { BadgeConfigSchema } from "./schemas/badge.js";
|
|
3
|
+
import { SidebarLinkItemHTMLAttributesSchema } from "./schemas/sidebar.js";
|
|
4
|
+
import { FrontmatterTableOfContentsSchema } from "./schemas/tableOfContents.js";
|
|
5
|
+
import { i18nSchema } from "./schemas/i18n.js";
|
|
6
|
+
import { PrevNextLinkConfigSchema } from "./schemas/prevNextLink.js";
|
|
7
|
+
import { HeroSchema } from "./schemas/hero.js";
|
|
8
|
+
import { deepMergeSchemas } from "./utils/zodDeepMerge.js";
|
|
9
|
+
import { z } from "astro/zod";
|
|
10
|
+
//#region src/schema.ts
|
|
11
|
+
/** Default content collection schema for Starlight’s `docs` collection. */
|
|
12
|
+
const StarlightFrontmatterSchema = (context) => z.object({
|
|
13
|
+
/** The title of the current page. Required. */
|
|
14
|
+
title: z.string(),
|
|
15
|
+
/**
|
|
16
|
+
* A short description of the current page’s content. Optional, but recommended.
|
|
17
|
+
* A good description is 150–160 characters long and outlines the key content
|
|
18
|
+
* of the page in a clear and engaging way.
|
|
19
|
+
*/
|
|
20
|
+
description: z.string().optional(),
|
|
21
|
+
/**
|
|
22
|
+
* Custom URL where a reader can edit this page.
|
|
23
|
+
* Overrides the `editLink.baseUrl` global config if set.
|
|
24
|
+
*
|
|
25
|
+
* Can also be set to `false` to disable showing an edit link on this page.
|
|
26
|
+
*/
|
|
27
|
+
editUrl: z.union([z.url(), z.boolean()]).optional().default(true),
|
|
28
|
+
/** Set custom `<head>` tags just for this page. */
|
|
29
|
+
head: HeadConfigSchema({ source: "content" }),
|
|
30
|
+
/** Override global table of contents configuration for this page. */
|
|
31
|
+
tableOfContents: FrontmatterTableOfContentsSchema(),
|
|
32
|
+
/**
|
|
33
|
+
* Set the layout style for this page.
|
|
34
|
+
* Can be `'doc'` (the default) or `'splash'` for a wider layout without any sidebars.
|
|
35
|
+
*/
|
|
36
|
+
template: z.enum(["doc", "splash"]).default("doc"),
|
|
37
|
+
/** Display a hero section on this page. */
|
|
38
|
+
hero: HeroSchema(context).optional(),
|
|
39
|
+
/**
|
|
40
|
+
* The last update date of the current page.
|
|
41
|
+
* Overrides the `lastUpdated` global config or the date generated from the Git history.
|
|
42
|
+
*/
|
|
43
|
+
lastUpdated: z.union([z.date(), z.boolean()]).optional(),
|
|
44
|
+
/**
|
|
45
|
+
* The previous navigation link configuration.
|
|
46
|
+
* Overrides the `pagination` global config or the link text and/or URL.
|
|
47
|
+
*/
|
|
48
|
+
prev: PrevNextLinkConfigSchema(),
|
|
49
|
+
/**
|
|
50
|
+
* The next navigation link configuration.
|
|
51
|
+
* Overrides the `pagination` global config or the link text and/or URL.
|
|
52
|
+
*/
|
|
53
|
+
next: PrevNextLinkConfigSchema(),
|
|
54
|
+
sidebar: z.object({
|
|
55
|
+
/**
|
|
56
|
+
* The order of this page in the navigation.
|
|
57
|
+
* Pages are sorted by this value in ascending order. Then by slug.
|
|
58
|
+
* If not provided, pages will be sorted alphabetically by slug.
|
|
59
|
+
* If two pages have the same order value, they will be sorted alphabetically by slug.
|
|
60
|
+
*/
|
|
61
|
+
order: z.number().optional(),
|
|
62
|
+
/**
|
|
63
|
+
* The label for this page in the navigation.
|
|
64
|
+
* Defaults to the page `title` if not set.
|
|
65
|
+
*/
|
|
66
|
+
label: z.string().optional(),
|
|
67
|
+
/**
|
|
68
|
+
* Prevents this page from being included in autogenerated sidebar groups.
|
|
69
|
+
*/
|
|
70
|
+
hidden: z.boolean().default(false),
|
|
71
|
+
/**
|
|
72
|
+
* Adds a badge to the sidebar link.
|
|
73
|
+
* Can be a string or an object with a variant and text.
|
|
74
|
+
* Variants include 'note', 'tip', 'caution', 'danger', 'success', and 'default'.
|
|
75
|
+
* Passing only a string defaults to the 'default' variant which uses the site accent color.
|
|
76
|
+
*/
|
|
77
|
+
badge: BadgeConfigSchema(),
|
|
78
|
+
/** HTML attributes to add to the sidebar link. */
|
|
79
|
+
attrs: SidebarLinkItemHTMLAttributesSchema()
|
|
80
|
+
}).prefault({}),
|
|
81
|
+
/** Display an announcement banner at the top of this page. */
|
|
82
|
+
banner: z.object({
|
|
83
|
+
/** The content of the banner. Supports HTML syntax. */
|
|
84
|
+
content: z.string() }).optional(),
|
|
85
|
+
/** Pagefind indexing for this page - set to false to disable. */
|
|
86
|
+
pagefind: z.boolean().default(true),
|
|
87
|
+
/**
|
|
88
|
+
* Indicates that this page is a draft and will not be included in production builds.
|
|
89
|
+
* Note that the page will still be available when running Astro in development mode.
|
|
90
|
+
*/
|
|
91
|
+
draft: z.boolean().default(false)
|
|
92
|
+
});
|
|
93
|
+
/** Content collection schema for Starlight’s `docs` collection. */
|
|
94
|
+
function docsSchema(...args) {
|
|
95
|
+
const [options = {}] = args;
|
|
96
|
+
const { extend } = options;
|
|
97
|
+
return (context) => {
|
|
98
|
+
const UserSchema = typeof extend === "function" ? extend(context) : extend;
|
|
99
|
+
return UserSchema ? deepMergeSchemas(StarlightFrontmatterSchema(context), UserSchema) : StarlightFrontmatterSchema(context);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { docsSchema, i18nSchema };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from "astro/zod";
|
|
2
|
+
//#region src/schemas/badge.d.ts
|
|
3
|
+
declare const badgeSchema: z.ZodObject<{
|
|
4
|
+
text: z.ZodString;
|
|
5
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
default: "default";
|
|
7
|
+
success: "success";
|
|
8
|
+
note: "note";
|
|
9
|
+
tip: "tip";
|
|
10
|
+
caution: "caution";
|
|
11
|
+
danger: "danger";
|
|
12
|
+
}>>;
|
|
13
|
+
class: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
declare const i18nBadgeSchema: z.ZodObject<{
|
|
16
|
+
text: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
17
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
18
|
+
default: "default";
|
|
19
|
+
success: "success";
|
|
20
|
+
note: "note";
|
|
21
|
+
tip: "tip";
|
|
22
|
+
caution: "caution";
|
|
23
|
+
danger: "danger";
|
|
24
|
+
}>>;
|
|
25
|
+
class: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
declare const BadgeComponentSchema: z.ZodObject<{
|
|
28
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
29
|
+
small: "small";
|
|
30
|
+
medium: "medium";
|
|
31
|
+
large: "large";
|
|
32
|
+
}>>;
|
|
33
|
+
text: z.ZodString;
|
|
34
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
35
|
+
default: "default";
|
|
36
|
+
success: "success";
|
|
37
|
+
note: "note";
|
|
38
|
+
tip: "tip";
|
|
39
|
+
caution: "caution";
|
|
40
|
+
danger: "danger";
|
|
41
|
+
}>>;
|
|
42
|
+
class: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$loose>;
|
|
44
|
+
type BadgeComponentProps = z.input<typeof BadgeComponentSchema>;
|
|
45
|
+
declare const BadgeConfigSchema: () => z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
46
|
+
text: z.ZodString;
|
|
47
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
48
|
+
default: "default";
|
|
49
|
+
success: "success";
|
|
50
|
+
note: "note";
|
|
51
|
+
tip: "tip";
|
|
52
|
+
caution: "caution";
|
|
53
|
+
danger: "danger";
|
|
54
|
+
}>>;
|
|
55
|
+
class: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>]>, z.ZodTransform<{
|
|
57
|
+
text: string;
|
|
58
|
+
variant: "default" | "success" | "note" | "tip" | "caution" | "danger";
|
|
59
|
+
class?: string | undefined;
|
|
60
|
+
}, string | {
|
|
61
|
+
text: string;
|
|
62
|
+
variant: "default" | "success" | "note" | "tip" | "caution" | "danger";
|
|
63
|
+
class?: string | undefined;
|
|
64
|
+
}>>>;
|
|
65
|
+
type I18nBadgeUserConfig = string | {
|
|
66
|
+
variant?: 'note' | 'danger' | 'success' | 'caution' | 'tip' | 'default' | undefined;
|
|
67
|
+
class?: string | undefined;
|
|
68
|
+
text: string | Record<string, string>;
|
|
69
|
+
} | undefined;
|
|
70
|
+
declare const I18nBadgeConfigSchema: () => z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
71
|
+
text: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
72
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
73
|
+
default: "default";
|
|
74
|
+
success: "success";
|
|
75
|
+
note: "note";
|
|
76
|
+
tip: "tip";
|
|
77
|
+
caution: "caution";
|
|
78
|
+
danger: "danger";
|
|
79
|
+
}>>;
|
|
80
|
+
class: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, z.core.$strip>]>>;
|
|
82
|
+
type Badge = z.output<typeof badgeSchema>;
|
|
83
|
+
type I18nBadge = z.output<typeof i18nBadgeSchema>;
|
|
84
|
+
type I18nBadgeConfig = z.output<ReturnType<typeof I18nBadgeConfigSchema>>;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { Badge, BadgeComponentProps, BadgeComponentSchema, BadgeConfigSchema, I18nBadge, I18nBadgeConfig, I18nBadgeConfigSchema, I18nBadgeUserConfig };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "astro/zod";
|
|
2
|
+
//#region src/schemas/badge.ts
|
|
3
|
+
const badgeBaseSchema = z.object({
|
|
4
|
+
variant: z.enum([
|
|
5
|
+
"note",
|
|
6
|
+
"danger",
|
|
7
|
+
"success",
|
|
8
|
+
"caution",
|
|
9
|
+
"tip",
|
|
10
|
+
"default"
|
|
11
|
+
]).default("default"),
|
|
12
|
+
class: z.string().optional()
|
|
13
|
+
});
|
|
14
|
+
const badgeSchema = z.object({
|
|
15
|
+
...badgeBaseSchema.shape,
|
|
16
|
+
text: z.string()
|
|
17
|
+
});
|
|
18
|
+
const i18nBadgeSchema = z.object({
|
|
19
|
+
...badgeBaseSchema.shape,
|
|
20
|
+
text: z.union([z.string(), z.record(z.string(), z.string())])
|
|
21
|
+
});
|
|
22
|
+
const BadgeComponentSchema = z.looseObject({
|
|
23
|
+
...badgeSchema.shape,
|
|
24
|
+
size: z.enum([
|
|
25
|
+
"small",
|
|
26
|
+
"medium",
|
|
27
|
+
"large"
|
|
28
|
+
]).default("small")
|
|
29
|
+
});
|
|
30
|
+
const BadgeConfigSchema = () => z.union([z.string(), badgeSchema]).transform((badge) => {
|
|
31
|
+
if (typeof badge === "string") return {
|
|
32
|
+
variant: "default",
|
|
33
|
+
text: badge
|
|
34
|
+
};
|
|
35
|
+
return badge;
|
|
36
|
+
}).optional();
|
|
37
|
+
const I18nBadgeConfigSchema = () => z.union([z.string(), i18nBadgeSchema]).optional();
|
|
38
|
+
//#endregion
|
|
39
|
+
export { BadgeComponentSchema, BadgeConfigSchema, I18nBadgeConfigSchema };
|