@astrojs/starlight 0.41.11 → 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.
Files changed (402) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +13 -0
  2. package/dist/components/MobileMenuToggle.astro +65 -0
  3. package/{components → dist/components}/PageFrame.astro +32 -8
  4. package/dist/components-internals/Icons.d.ts +415 -0
  5. package/dist/components-internals/Icons.js +140 -0
  6. package/dist/components-internals/SidebarPersistState.d.ts +1 -0
  7. package/dist/components-internals/SidebarPersistState.js +53 -0
  8. package/dist/components-internals/TableOfContents/starlight-toc.d.ts +18 -0
  9. package/dist/components-internals/TableOfContents/starlight-toc.js +88 -0
  10. package/dist/constants.d.ts +4 -0
  11. package/dist/constants.js +4 -0
  12. package/{expressive-code.d.ts → dist/expressive-code.d.ts} +6 -13
  13. package/dist/expressive-code.js +31 -0
  14. package/dist/global.d.ts +62 -0
  15. package/dist/global.js +2 -0
  16. package/dist/index.d.ts +7 -0
  17. package/dist/index.js +109 -0
  18. package/dist/integrations/aside-utils.d.ts +9 -0
  19. package/dist/integrations/aside-utils.js +35 -0
  20. package/dist/integrations/expressive-code/hast.d.ts +1 -0
  21. package/dist/integrations/expressive-code/hast.js +2 -0
  22. package/dist/integrations/expressive-code/index.d.ts +60 -0
  23. package/dist/integrations/expressive-code/index.js +48 -0
  24. package/dist/integrations/expressive-code/preprocessor.d.ts +17 -0
  25. package/dist/integrations/expressive-code/preprocessor.js +76 -0
  26. package/dist/integrations/expressive-code/themes/night-owl-dark.js +4 -0
  27. package/dist/integrations/expressive-code/themes/night-owl-light.js +4 -0
  28. package/dist/integrations/expressive-code/theming.d.ts +16 -0
  29. package/dist/integrations/expressive-code/theming.js +71 -0
  30. package/dist/integrations/expressive-code/translations.d.ts +8 -0
  31. package/dist/integrations/expressive-code/translations.js +26 -0
  32. package/dist/integrations/markdown-icon.d.ts +8 -0
  33. package/dist/integrations/markdown-icon.js +14 -0
  34. package/dist/integrations/markdown-plugins.d.ts +18 -0
  35. package/dist/integrations/markdown-plugins.js +36 -0
  36. package/dist/integrations/markdown-processor.d.ts +29 -0
  37. package/dist/integrations/markdown-processor.js +44 -0
  38. package/dist/integrations/pagefind.d.ts +7 -0
  39. package/dist/integrations/pagefind.js +34 -0
  40. package/dist/integrations/rehype-code-rtl-support.d.ts +21 -0
  41. package/dist/integrations/rehype-code-rtl-support.js +36 -0
  42. package/dist/integrations/rehype-heading-links.d.ts +10 -0
  43. package/dist/integrations/rehype-heading-links.js +57 -0
  44. package/dist/integrations/remark-asides.d.ts +32 -0
  45. package/dist/integrations/remark-asides.js +166 -0
  46. package/dist/integrations/remark-rehype.d.ts +17 -0
  47. package/dist/integrations/remark-rehype.js +51 -0
  48. package/dist/integrations/satteri.d.ts +13 -0
  49. package/dist/integrations/satteri.js +209 -0
  50. package/dist/integrations/shared/absolutePathToLang.d.ts +10 -0
  51. package/dist/integrations/shared/absolutePathToLang.js +13 -0
  52. package/dist/integrations/shared/localeToLang.d.ts +10 -0
  53. package/dist/integrations/shared/localeToLang.js +13 -0
  54. package/dist/integrations/shared/slugToLocale.d.ts +12 -0
  55. package/dist/integrations/shared/slugToLocale.js +15 -0
  56. package/dist/integrations/sitemap.d.ts +12 -0
  57. package/dist/integrations/sitemap.js +19 -0
  58. package/dist/integrations/vite-layer-order.d.ts +15 -0
  59. package/dist/integrations/vite-layer-order.js +56 -0
  60. package/dist/integrations/vite-lazy-barrel-optimization.d.ts +12 -0
  61. package/dist/integrations/vite-lazy-barrel-optimization.js +33 -0
  62. package/dist/integrations/vite-virtual-modules.d.ts +14 -0
  63. package/dist/integrations/vite-virtual-modules.js +108 -0
  64. package/dist/internal.d.ts +3 -0
  65. package/dist/internal.js +3 -0
  66. package/dist/loaders.d.ts +20 -0
  67. package/dist/loaders.js +49 -0
  68. package/dist/locals.d.ts +15 -0
  69. package/dist/locals.js +33 -0
  70. package/dist/package.js +4 -0
  71. package/{props.ts → dist/props.d.ts} +6 -4
  72. package/dist/props.js +1 -0
  73. package/dist/route-data.d.ts +7 -0
  74. package/dist/route-data.js +6 -0
  75. package/dist/schema.d.ts +426 -0
  76. package/dist/schema.js +103 -0
  77. package/dist/schemas/badge.d.ts +86 -0
  78. package/dist/schemas/badge.js +39 -0
  79. package/dist/schemas/components.d.ts +236 -0
  80. package/dist/schemas/components.js +36 -0
  81. package/dist/schemas/expressiveCode.d.ts +7 -0
  82. package/dist/schemas/expressiveCode.js +5 -0
  83. package/dist/schemas/favicon.d.ts +9 -0
  84. package/dist/schemas/favicon.js +32 -0
  85. package/dist/schemas/head.d.ts +33 -0
  86. package/dist/schemas/head.js +41 -0
  87. package/dist/schemas/hero.d.ts +319 -0
  88. package/dist/schemas/hero.js +73 -0
  89. package/dist/schemas/i18n.d.ts +125 -0
  90. package/dist/schemas/i18n.js +76 -0
  91. package/dist/schemas/icon.d.ts +284 -0
  92. package/dist/schemas/icon.js +7 -0
  93. package/dist/schemas/locale.d.ts +20 -0
  94. package/dist/schemas/locale.js +11 -0
  95. package/dist/schemas/logo.d.ts +32 -0
  96. package/dist/schemas/logo.js +14 -0
  97. package/dist/schemas/pagefind.d.ts +166 -0
  98. package/dist/schemas/pagefind.js +31 -0
  99. package/dist/schemas/prevNextLink.d.ts +10 -0
  100. package/dist/schemas/prevNextLink.js +14 -0
  101. package/dist/schemas/sidebar.d.ts +205 -0
  102. package/dist/schemas/sidebar.js +71 -0
  103. package/dist/schemas/site-title.d.ts +7 -0
  104. package/dist/schemas/site-title.js +17 -0
  105. package/dist/schemas/social.d.ts +292 -0
  106. package/dist/schemas/social.js +18 -0
  107. package/dist/schemas/tableOfContents.d.ts +24 -0
  108. package/dist/schemas/tableOfContents.js +16 -0
  109. package/dist/translations/ar.js +36 -0
  110. package/dist/translations/ca.js +46 -0
  111. package/dist/translations/cs.js +46 -0
  112. package/dist/translations/da.js +33 -0
  113. package/dist/translations/de.js +33 -0
  114. package/dist/translations/el.js +33 -0
  115. package/dist/translations/en.js +33 -0
  116. package/dist/translations/es.js +46 -0
  117. package/dist/translations/fa.js +33 -0
  118. package/dist/translations/fi.js +33 -0
  119. package/dist/translations/fr.js +36 -0
  120. package/dist/translations/gl.js +46 -0
  121. package/dist/translations/he.js +33 -0
  122. package/dist/translations/hi.js +36 -0
  123. package/dist/translations/hu.js +46 -0
  124. package/dist/translations/id.js +33 -0
  125. package/dist/translations/index.d.ts +48 -0
  126. package/dist/translations/index.js +75 -0
  127. package/dist/translations/it.js +36 -0
  128. package/dist/translations/ja.js +36 -0
  129. package/dist/translations/ko.js +36 -0
  130. package/dist/translations/lv.js +33 -0
  131. package/dist/translations/nb.js +33 -0
  132. package/dist/translations/nl.js +33 -0
  133. package/dist/translations/pl.js +36 -0
  134. package/dist/translations/pt.js +36 -0
  135. package/dist/translations/ro.js +33 -0
  136. package/dist/translations/ru.js +36 -0
  137. package/dist/translations/sk.js +33 -0
  138. package/dist/translations/sv.js +33 -0
  139. package/dist/translations/th.js +33 -0
  140. package/dist/translations/tr.js +33 -0
  141. package/dist/translations/uk.js +33 -0
  142. package/dist/translations/vi.js +33 -0
  143. package/dist/translations/zh-CN.js +36 -0
  144. package/dist/translations/zh-TW.js +36 -0
  145. package/dist/types.d.ts +4 -0
  146. package/dist/types.js +1 -0
  147. package/{user-components → dist/user-components}/FileTree.astro +1 -1
  148. package/{user-components → dist/user-components}/Steps.astro +1 -1
  149. package/{user-components → dist/user-components}/TabItem.astro +1 -1
  150. package/{user-components → dist/user-components}/Tabs.astro +1 -1
  151. package/dist/user-components/file-tree-icons.d.ts +178 -0
  152. package/dist/user-components/file-tree-icons.js +632 -0
  153. package/dist/user-components/file-tree-processor.d.ts +16 -0
  154. package/dist/user-components/file-tree-processor.js +132 -0
  155. package/dist/user-components/steps-processor.d.ts +10 -0
  156. package/dist/user-components/steps-processor.js +39 -0
  157. package/dist/user-components/tabs-processor.d.ts +23 -0
  158. package/dist/user-components/tabs-processor.js +70 -0
  159. package/dist/utils/base.d.ts +7 -0
  160. package/dist/utils/base.js +15 -0
  161. package/dist/utils/canonical.d.ts +10 -0
  162. package/dist/utils/canonical.js +14 -0
  163. package/dist/utils/collection-fs.d.ts +13 -0
  164. package/dist/utils/collection-fs.js +19 -0
  165. package/{utils/collection.ts → dist/utils/collection.d.ts} +9 -20
  166. package/dist/utils/collection.js +26 -0
  167. package/dist/utils/createPathFormatter.d.ts +9 -0
  168. package/dist/utils/createPathFormatter.js +35 -0
  169. package/dist/utils/createTranslationSystem.d.ts +23 -0
  170. package/dist/utils/createTranslationSystem.js +84 -0
  171. package/dist/utils/error-map.d.ts +23 -0
  172. package/dist/utils/error-map.js +125 -0
  173. package/dist/utils/format-path.d.ts +4 -0
  174. package/dist/utils/format-path.js +9 -0
  175. package/dist/utils/generateToC.d.ts +14 -0
  176. package/dist/utils/generateToC.js +25 -0
  177. package/dist/utils/git.d.ts +12 -0
  178. package/dist/utils/git.js +71 -0
  179. package/dist/utils/gitInlined.d.ts +6 -0
  180. package/dist/utils/gitInlined.js +11 -0
  181. package/dist/utils/head.d.ts +7 -0
  182. package/dist/utils/head.js +233 -0
  183. package/dist/utils/i18n.d.ts +50 -0
  184. package/dist/utils/i18n.js +141 -0
  185. package/dist/utils/localizedUrl.d.ts +8 -0
  186. package/dist/utils/localizedUrl.js +28 -0
  187. package/dist/utils/navigation.d.ts +19 -0
  188. package/dist/utils/navigation.js +353 -0
  189. package/dist/utils/path.d.ts +21 -0
  190. package/dist/utils/path.js +51 -0
  191. package/dist/utils/plugins.d.ts +721 -0
  192. package/dist/utils/plugins.js +174 -0
  193. package/dist/utils/routing/data.d.ts +20 -0
  194. package/dist/utils/routing/data.js +127 -0
  195. package/dist/utils/routing/index.d.ts +21 -0
  196. package/dist/utils/routing/index.js +106 -0
  197. package/dist/utils/routing/middleware.d.ts +11 -0
  198. package/dist/utils/routing/middleware.js +65 -0
  199. package/dist/utils/routing/types.d.ts +93 -0
  200. package/dist/utils/routing/types.js +1 -0
  201. package/dist/utils/slugs.d.ts +45 -0
  202. package/dist/utils/slugs.js +104 -0
  203. package/dist/utils/starlight-page.d.ts +36 -0
  204. package/dist/utils/starlight-page.js +120 -0
  205. package/dist/utils/translations-fs.d.ts +15 -0
  206. package/dist/utils/translations-fs.js +39 -0
  207. package/dist/utils/translations.d.ts +20 -0
  208. package/dist/utils/translations.js +29 -0
  209. package/dist/utils/types.d.ts +5 -0
  210. package/dist/utils/types.js +1 -0
  211. package/dist/utils/url.d.ts +7 -0
  212. package/{utils/url.ts → dist/utils/url.js} +5 -4
  213. package/dist/utils/user-config.d.ts +2055 -0
  214. package/dist/utils/user-config.js +136 -0
  215. package/dist/utils/validateLogoImports.d.ts +5 -0
  216. package/dist/utils/validateLogoImports.js +16 -0
  217. package/dist/utils/zodDeepMerge.d.ts +16 -0
  218. package/dist/utils/zodDeepMerge.js +53 -0
  219. package/package.json +60 -34
  220. package/CHANGELOG.md +0 -3051
  221. package/components/MobileMenuToggle.astro +0 -114
  222. package/components-internals/Icons.ts +0 -248
  223. package/components-internals/SidebarPersistState.ts +0 -71
  224. package/components-internals/TableOfContents/starlight-toc.ts +0 -127
  225. package/constants.ts +0 -4
  226. package/expressive-code.mjs +0 -23
  227. package/global.d.ts +0 -11
  228. package/i18n.d.ts +0 -18
  229. package/index.ts +0 -200
  230. package/integrations/aside-utils.ts +0 -41
  231. package/integrations/expressive-code/hast.d.ts +0 -5
  232. package/integrations/expressive-code/hast.mjs +0 -9
  233. package/integrations/expressive-code/index.ts +0 -125
  234. package/integrations/expressive-code/preprocessor.ts +0 -126
  235. package/integrations/expressive-code/themes/night-owl-dark.jsonc +0 -1796
  236. package/integrations/expressive-code/themes/night-owl-light.jsonc +0 -1695
  237. package/integrations/expressive-code/theming.ts +0 -105
  238. package/integrations/expressive-code/translations.ts +0 -36
  239. package/integrations/markdown-icon.ts +0 -13
  240. package/integrations/markdown-plugins.ts +0 -71
  241. package/integrations/markdown-processor.ts +0 -64
  242. package/integrations/pagefind.ts +0 -60
  243. package/integrations/rehype-code-rtl-support.ts +0 -37
  244. package/integrations/rehype-heading-links.ts +0 -79
  245. package/integrations/remark-asides.ts +0 -219
  246. package/integrations/remark-rehype.ts +0 -87
  247. package/integrations/satteri.ts +0 -265
  248. package/integrations/shared/absolutePathToLang.ts +0 -26
  249. package/integrations/shared/localeToLang.ts +0 -15
  250. package/integrations/shared/slugToLocale.ts +0 -18
  251. package/integrations/sitemap.ts +0 -23
  252. package/integrations/vite-layer-order.ts +0 -69
  253. package/integrations/vite-lazy-barrel-optimization.ts +0 -40
  254. package/integrations/vite-virtual-modules.ts +0 -175
  255. package/internal.ts +0 -6
  256. package/loaders.ts +0 -63
  257. package/locals.d.ts +0 -43
  258. package/locals.ts +0 -43
  259. package/route-data.ts +0 -11
  260. package/schema.ts +0 -167
  261. package/schemas/badge.ts +0 -40
  262. package/schemas/components.ts +0 -265
  263. package/schemas/expressiveCode.ts +0 -12
  264. package/schemas/favicon.ts +0 -40
  265. package/schemas/head.ts +0 -50
  266. package/schemas/hero.ts +0 -69
  267. package/schemas/i18n.ts +0 -244
  268. package/schemas/icon.ts +0 -7
  269. package/schemas/logo.ts +0 -28
  270. package/schemas/pagefind.ts +0 -128
  271. package/schemas/prevNextLink.ts +0 -18
  272. package/schemas/sidebar.ts +0 -163
  273. package/schemas/site-title.ts +0 -20
  274. package/schemas/social.ts +0 -23
  275. package/schemas/tableOfContents.ts +0 -21
  276. package/translations/README.md +0 -14
  277. package/translations/ar.json +0 -33
  278. package/translations/ca.json +0 -43
  279. package/translations/cs.json +0 -43
  280. package/translations/da.json +0 -30
  281. package/translations/de.json +0 -30
  282. package/translations/el.json +0 -30
  283. package/translations/en.json +0 -30
  284. package/translations/es.json +0 -43
  285. package/translations/fa.json +0 -30
  286. package/translations/fi.json +0 -30
  287. package/translations/fr.json +0 -33
  288. package/translations/gl.json +0 -43
  289. package/translations/he.json +0 -30
  290. package/translations/hi.json +0 -33
  291. package/translations/hu.json +0 -43
  292. package/translations/id.json +0 -30
  293. package/translations/index.ts +0 -76
  294. package/translations/it.json +0 -33
  295. package/translations/ja.json +0 -33
  296. package/translations/ko.json +0 -33
  297. package/translations/lv.json +0 -30
  298. package/translations/nb.json +0 -30
  299. package/translations/nl.json +0 -30
  300. package/translations/pl.json +0 -33
  301. package/translations/pt.json +0 -33
  302. package/translations/ro.json +0 -30
  303. package/translations/ru.json +0 -33
  304. package/translations/sk.json +0 -30
  305. package/translations/sv.json +0 -30
  306. package/translations/th.json +0 -30
  307. package/translations/tr.json +0 -30
  308. package/translations/uk.json +0 -30
  309. package/translations/vi.json +0 -30
  310. package/translations/zh-CN.json +0 -33
  311. package/translations/zh-TW.json +0 -33
  312. package/types.ts +0 -7
  313. package/user-components/file-tree-icons.ts +0 -782
  314. package/user-components/rehype-file-tree.ts +0 -251
  315. package/user-components/rehype-steps.ts +0 -85
  316. package/user-components/rehype-tabs.ts +0 -121
  317. package/utils/base.ts +0 -15
  318. package/utils/canonical.ts +0 -19
  319. package/utils/collection-fs.ts +0 -20
  320. package/utils/createPathFormatter.ts +0 -60
  321. package/utils/createTranslationSystem.ts +0 -137
  322. package/utils/error-map.ts +0 -222
  323. package/utils/format-path.ts +0 -7
  324. package/utils/generateToC.ts +0 -33
  325. package/utils/git.ts +0 -121
  326. package/utils/gitInlined.ts +0 -20
  327. package/utils/head.ts +0 -235
  328. package/utils/i18n.ts +0 -221
  329. package/utils/localizedUrl.ts +0 -51
  330. package/utils/navigation.ts +0 -574
  331. package/utils/path.ts +0 -58
  332. package/utils/plugins.ts +0 -498
  333. package/utils/routing/data.ts +0 -154
  334. package/utils/routing/index.ts +0 -139
  335. package/utils/routing/middleware.ts +0 -81
  336. package/utils/routing/types.ts +0 -101
  337. package/utils/slugs.ts +0 -119
  338. package/utils/starlight-page.ts +0 -205
  339. package/utils/translations-fs.ts +0 -54
  340. package/utils/translations.ts +0 -57
  341. package/utils/types.ts +0 -15
  342. package/utils/user-config.ts +0 -348
  343. package/utils/validateLogoImports.ts +0 -21
  344. package/utils/zodDeepMerge.ts +0 -144
  345. package/virtual-internal.d.ts +0 -149
  346. package/virtual.d.ts +0 -27
  347. /package/{components → dist/components}/AnchorHeading.astro +0 -0
  348. /package/{components → dist/components}/Banner.astro +0 -0
  349. /package/{components → dist/components}/ContentNotice.astro +0 -0
  350. /package/{components → dist/components}/ContentPanel.astro +0 -0
  351. /package/{components → dist/components}/DraftContentNotice.astro +0 -0
  352. /package/{components → dist/components}/EditLink.astro +0 -0
  353. /package/{components → dist/components}/FallbackContentNotice.astro +0 -0
  354. /package/{components → dist/components}/Footer.astro +0 -0
  355. /package/{components → dist/components}/Head.astro +0 -0
  356. /package/{components → dist/components}/Header.astro +0 -0
  357. /package/{components → dist/components}/Hero.astro +0 -0
  358. /package/{components → dist/components}/LanguageSelect.astro +0 -0
  359. /package/{components → dist/components}/LastUpdated.astro +0 -0
  360. /package/{components → dist/components}/MarkdownContent.astro +0 -0
  361. /package/{components → dist/components}/MobileMenuFooter.astro +0 -0
  362. /package/{components → dist/components}/MobileTableOfContents.astro +0 -0
  363. /package/{components → dist/components}/Page.astro +0 -0
  364. /package/{components → dist/components}/PageSidebar.astro +0 -0
  365. /package/{components → dist/components}/PageTitle.astro +0 -0
  366. /package/{components → dist/components}/Pagination.astro +0 -0
  367. /package/{components → dist/components}/Search.astro +0 -0
  368. /package/{components → dist/components}/Select.astro +0 -0
  369. /package/{components → dist/components}/Sidebar.astro +0 -0
  370. /package/{components → dist/components}/SidebarPersister.astro +0 -0
  371. /package/{components → dist/components}/SidebarRestorePoint.astro +0 -0
  372. /package/{components → dist/components}/SidebarSublist.astro +0 -0
  373. /package/{components → dist/components}/SiteTitle.astro +0 -0
  374. /package/{components → dist/components}/SkipLink.astro +0 -0
  375. /package/{components → dist/components}/SocialIcons.astro +0 -0
  376. /package/{components → dist/components}/StarlightPage.astro +0 -0
  377. /package/{components → dist/components}/TableOfContents.astro +0 -0
  378. /package/{components → dist/components}/ThemeProvider.astro +0 -0
  379. /package/{components → dist/components}/ThemeSelect.astro +0 -0
  380. /package/{components → dist/components}/TwoColumnContent.astro +0 -0
  381. /package/{components-internals → dist/components-internals}/TableOfContents/TableOfContentsList.astro +0 -0
  382. /package/{components.ts → dist/components.ts} +0 -0
  383. /package/{routes → dist/routes}/common.astro +0 -0
  384. /package/{routes → dist/routes}/ssr/404.astro +0 -0
  385. /package/{routes → dist/routes}/ssr/index.astro +0 -0
  386. /package/{routes → dist/routes}/static/404.astro +0 -0
  387. /package/{routes → dist/routes}/static/index.astro +0 -0
  388. /package/{style → dist/style}/anchor-links.css +0 -0
  389. /package/{style → dist/style}/asides.css +0 -0
  390. /package/{style → dist/style}/layers.css +0 -0
  391. /package/{style → dist/style}/markdown.css +0 -0
  392. /package/{style → dist/style}/print.css +0 -0
  393. /package/{style → dist/style}/props.css +0 -0
  394. /package/{style → dist/style}/reset.css +0 -0
  395. /package/{style → dist/style}/util.css +0 -0
  396. /package/{user-components → dist/user-components}/Aside.astro +0 -0
  397. /package/{user-components → dist/user-components}/Badge.astro +0 -0
  398. /package/{user-components → dist/user-components}/Card.astro +0 -0
  399. /package/{user-components → dist/user-components}/CardGrid.astro +0 -0
  400. /package/{user-components → dist/user-components}/Icon.astro +0 -0
  401. /package/{user-components → dist/user-components}/LinkButton.astro +0 -0
  402. /package/{user-components → dist/user-components}/LinkCard.astro +0 -0
@@ -1,265 +0,0 @@
1
- import { z } from 'astro/zod';
2
-
3
- export function ComponentConfigSchema() {
4
- return z
5
- .object({
6
- /*
7
- HEAD ----------------------------------------------------------------------------------------
8
- */
9
-
10
- /**
11
- * Component rendered inside each page’s `<head>`.
12
- * Includes important tags including `<title>`, and `<meta charset="utf-8">`.
13
- *
14
- * Override this component as a last resort. Prefer the `head` option Starlight config if possible.
15
- *
16
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Head.astro `Head` default implementation}
17
- */
18
- Head: z.string().default('@astrojs/starlight/components/Head.astro'),
19
-
20
- /**
21
- * Component rendered inside `<head>` that sets up dark/light theme support.
22
- * The default implementation includes an inline script and a `<template>` used by the
23
- * script in `ThemeSelect.astro`.
24
- *
25
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/ThemeProvider.astro `ThemeProvider` default implementation}
26
- */
27
- ThemeProvider: z.string().default('@astrojs/starlight/components/ThemeProvider.astro'),
28
-
29
- /*
30
- BODY ----------------------------------------------------------------------------------------
31
- */
32
-
33
- /**
34
- * Component rendered as the first element inside `<body>` which links to the main page
35
- * content for accessibility. The default implementation is hidden until a user focuses it
36
- * by tabbing with their keyboard.
37
- *
38
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/SkipLink.astro `SkipLink` default implementation}
39
- */
40
- SkipLink: z.string().default('@astrojs/starlight/components/SkipLink.astro'),
41
-
42
- /*
43
- LAYOUT --------------------------------------------------------------------------------------
44
- */
45
-
46
- /**
47
- * Layout component wrapped around most of the page content.
48
- * The default implementation sets up the header–sidebar–main layout and includes
49
- * `header` and `sidebar` named slots along with a default slot for the main content.
50
- * It also renders `<MobileMenuToggle />` to support toggling the sidebar navigation
51
- * on small (mobile) viewports.
52
- *
53
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageFrame.astro `PageFrame` default implementation}
54
- */
55
- PageFrame: z.string().default('@astrojs/starlight/components/PageFrame.astro'),
56
- /**
57
- * Component rendered inside `<PageFrame>` that is responsible for toggling the
58
- * sidebar navigation on small (mobile) viewports.
59
- *
60
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/MobileMenuToggle.astro `MobileMenuToggle` default implementation}
61
- */
62
- MobileMenuToggle: z.string().default('@astrojs/starlight/components/MobileMenuToggle.astro'),
63
-
64
- /**
65
- * Layout component wrapped around the main content column and right sidebar (table of contents).
66
- * The default implementation handles the switch between a single-column, small-viewport layout
67
- * and a two-column, larger-viewport layout.
68
- *
69
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/TwoColumnContent.astro `TwoColumnContent` default implementation}
70
- */
71
- TwoColumnContent: z.string().default('@astrojs/starlight/components/TwoColumnContent.astro'),
72
-
73
- /*
74
- HEADER --------------------------------------------------------------------------------------
75
- */
76
-
77
- /**
78
- * Header component displayed at the top of every page.
79
- * The default implementation displays `<SiteTitle />`, `<Search />`, `<SocialIcons />`,
80
- * `<ThemeSelect />`, and `<LanguageSelect />`.
81
- *
82
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Header.astro `Header` default implementation}
83
- */
84
- Header: z.string().default('@astrojs/starlight/components/Header.astro'),
85
- /**
86
- * Component rendered at the start of the site header to render the site title.
87
- * The default implementation includes logic for rendering logos defined in Starlight config.
88
- *
89
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/SiteTitle.astro `SiteTitle` default implementation}
90
- */
91
- SiteTitle: z.string().default('@astrojs/starlight/components/SiteTitle.astro'),
92
- /**
93
- * Component used to render Starlight’s search UI. The default implementation includes the
94
- * button in the header and the code for displaying a search modal when it is clicked.
95
- *
96
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Search.astro `Search` default implementation}
97
- */
98
- Search: z.string().default('@astrojs/starlight/components/Search.astro'),
99
- /**
100
- * Component rendered in the site header including social icon links. The default
101
- * implementation uses the `social` option in Starlight config to render icons and links.
102
- *
103
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/SocialIcons.astro `SocialIcons` default implementation}
104
- */
105
- SocialIcons: z.string().default('@astrojs/starlight/components/SocialIcons.astro'),
106
- /**
107
- * Component rendered in the site header that allows users to select their preferred color scheme.
108
- *
109
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/ThemeSelect.astro `ThemeSelect` default implementation}
110
- */
111
- ThemeSelect: z.string().default('@astrojs/starlight/components/ThemeSelect.astro'),
112
- /**
113
- * Component rendered in the site header that allows users to switch to a different language.
114
- *
115
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/LanguageSelect.astro `LanguageSelect` default implementation}
116
- */
117
- LanguageSelect: z.string().default('@astrojs/starlight/components/LanguageSelect.astro'),
118
-
119
- /*
120
- SIDEBAR -------------------------------------------------------------------------------------
121
- */
122
-
123
- /**
124
- * Component rendered before page content that contains global navigation.
125
- * The default implementation displays as a sidebar on wide enough viewports and inside a
126
- * drop-down menu on small (mobile) viewports. It also renders `<MobileMenuFooter />` to
127
- * show additional items inside the mobile menu.
128
- *
129
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Sidebar.astro `Sidebar` default implementation}
130
- */
131
- Sidebar: z.string().default('@astrojs/starlight/components/Sidebar.astro'),
132
- /**
133
- * Component rendered at the bottom of the mobile drop-down menu.
134
- * The default implementation renders `<ThemeSelect />` and `<LanguageSelect />`.
135
- *
136
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/MobileMenuFooter.astro `MobileMenuFooter` default implementation}
137
- */
138
- MobileMenuFooter: z.string().default('@astrojs/starlight/components/MobileMenuFooter.astro'),
139
-
140
- /*
141
- TOC -----------------------------------------------------------------------------------------
142
- */
143
-
144
- /**
145
- * Component rendered before the main page’s content to display a table of contents.
146
- * The default implementation renders `<TableOfContents />` and `<MobileTableOfContents />`.
147
- *
148
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageSidebar.astro `PageSidebar` default implementation}
149
- */
150
- PageSidebar: z.string().default('@astrojs/starlight/components/PageSidebar.astro'),
151
- /**
152
- * Component that renders the current page’s table of contents on wider viewports.
153
- *
154
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/TableOfContents.astro `TableOfContents` default implementation}
155
- */
156
- TableOfContents: z.string().default('@astrojs/starlight/components/TableOfContents.astro'),
157
- /**
158
- * Component that renders the current page’s table of contents on small (mobile) viewports.
159
- *
160
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/MobileTableOfContents.astro `MobileTableOfContents` default implementation}
161
- */
162
- MobileTableOfContents: z
163
- .string()
164
- .default('@astrojs/starlight/components/MobileTableOfContents.astro'),
165
-
166
- /*
167
- CONTENT HEADER ------------------------------------------------------------------------------
168
- */
169
-
170
- /**
171
- * Banner component rendered at the top of each page. The default implementation uses the
172
- * page’s `banner` frontmatter value to decide whether or not to render.
173
- *
174
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Banner.astro `Banner` default implementation}
175
- */
176
- Banner: z.string().default('@astrojs/starlight/components/Banner.astro'),
177
-
178
- /**
179
- * Layout component used to wrap sections of the main content column.
180
- *
181
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/ContentPanel.astro `ContentPanel` default implementation}
182
- */
183
- ContentPanel: z.string().default('@astrojs/starlight/components/ContentPanel.astro'),
184
-
185
- /**
186
- * Component containing the `<h1>` element for the current page.
187
- *
188
- * Implementations should ensure they set `id="_top"` on the `<h1>` element as in the default
189
- * implementation.
190
- *
191
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageTitle.astro `PageTitle` default implementation}
192
- */
193
- PageTitle: z.string().default('@astrojs/starlight/components/PageTitle.astro'),
194
-
195
- /**
196
- * Notice displayed to users on pages where a translation for the current language is not
197
- * available. Only used on multilingual sites.
198
- *
199
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/FallbackContentNotice.astro `FallbackContentNotice` default implementation}
200
- */
201
- FallbackContentNotice: z
202
- .string()
203
- .default('@astrojs/starlight/components/FallbackContentNotice.astro'),
204
-
205
- /**
206
- * Notice displayed to users on draft pages. Only used in development mode.
207
- *
208
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/DraftContentNotice.astro `DraftContentNotice` default implementation}
209
- */
210
- DraftContentNotice: z
211
- .string()
212
- .default('@astrojs/starlight/components/DraftContentNotice.astro'),
213
-
214
- /**
215
- * Component rendered at the top of the page when `hero` is set in frontmatter. The default
216
- * implementation shows a large title, tagline, and call-to-action links alongside an optional image.
217
- *
218
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Hero.astro `Hero` default implementation}
219
- */
220
- Hero: z.string().default('@astrojs/starlight/components/Hero.astro'),
221
-
222
- /*
223
- CONTENT -------------------------------------------------------------------------------------
224
- */
225
-
226
- /**
227
- * Component rendered around each page’s main content.
228
- * The default implementation sets up basic styles to apply to Markdown content.
229
- *
230
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/MarkdownContent.astro `MarkdownContent` default implementation}
231
- */
232
- MarkdownContent: z.string().default('@astrojs/starlight/components/MarkdownContent.astro'),
233
-
234
- /*
235
- CONTENT FOOTER ------------------------------------------------------------------------------
236
- */
237
-
238
- /**
239
- * Footer component displayed at the bottom of each documentation page.
240
- * The default implementation displays `<LastUpdated />`, `<Pagination />`, and `<EditLink />`.
241
- *
242
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Footer.astro `Footer` default implementation}
243
- */
244
- Footer: z.string().default('@astrojs/starlight/components/Footer.astro'),
245
- /**
246
- * Component rendered in the page footer to display the last-updated date.
247
- *
248
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/LastUpdated.astro `LastUpdated` default implementation}
249
- */
250
- LastUpdated: z.string().default('@astrojs/starlight/components/LastUpdated.astro'),
251
- /**
252
- * Component rendered in the page footer to display navigation arrows between previous/next pages.
253
- *
254
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Pagination.astro `Pagination` default implementation}
255
- */
256
- Pagination: z.string().default('@astrojs/starlight/components/Pagination.astro'),
257
- /**
258
- * Component rendered in the page footer to display a link to where the page can be edited.
259
- *
260
- * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/EditLink.astro `EditLink` default implementation}
261
- */
262
- EditLink: z.string().default('@astrojs/starlight/components/EditLink.astro'),
263
- })
264
- .prefault({});
265
- }
@@ -1,12 +0,0 @@
1
- import { z } from 'astro/zod';
2
- import type { StarlightExpressiveCodeOptions } from '../integrations/expressive-code';
3
-
4
- export const ExpressiveCodeSchema = () =>
5
- z
6
- .union([
7
- z.custom<StarlightExpressiveCodeOptions>(
8
- (value) => typeof value === 'object' && (value as StarlightExpressiveCodeOptions)
9
- ),
10
- z.boolean(),
11
- ])
12
- .optional();
@@ -1,40 +0,0 @@
1
- import { extname } from 'node:path';
2
- import { z } from 'astro/zod';
3
-
4
- const faviconTypeMap = {
5
- '.ico': 'image/x-icon',
6
- '.gif': 'image/gif',
7
- '.jpeg': 'image/jpeg',
8
- '.jpg': 'image/jpeg',
9
- '.png': 'image/png',
10
- '.svg': 'image/svg+xml',
11
- };
12
-
13
- export const FaviconSchema = () =>
14
- z
15
- .string()
16
- .default('/favicon.svg')
17
- .transform((favicon, ctx) => {
18
- // favicon can be absolute or relative url
19
- const { pathname } = new URL(favicon, 'https://example.com');
20
- const ext = extname(pathname).toLowerCase();
21
-
22
- if (!isFaviconExt(ext)) {
23
- ctx.issues.push({
24
- code: 'custom',
25
- message: 'favicon must be a .ico, .gif, .jpg, .png, or .svg file',
26
- input: favicon,
27
- });
28
-
29
- return z.NEVER;
30
- }
31
-
32
- return {
33
- href: favicon,
34
- type: faviconTypeMap[ext],
35
- };
36
- });
37
-
38
- function isFaviconExt(ext: string): ext is keyof typeof faviconTypeMap {
39
- return ext in faviconTypeMap;
40
- }
package/schemas/head.ts DELETED
@@ -1,50 +0,0 @@
1
- import { z } from 'astro/zod';
2
- import yaml from 'js-yaml';
3
-
4
- export const HeadConfigSchema = ({
5
- source,
6
- }: {
7
- /**
8
- * Depending on the content being validated, either a user's config or a page's frontmatter,
9
- * different error messages will be shown.
10
- */
11
- source: 'config' | 'content';
12
- }) =>
13
- z
14
- .array(
15
- z
16
- .object({
17
- /** Name of the HTML tag to add to `<head>`, e.g. `'meta'`, `'link'`, or `'script'`. */
18
- tag: z.enum(['title', 'base', 'link', 'style', 'meta', 'script', 'noscript', 'template']),
19
- /** Attributes to set on the tag, e.g. `{ rel: 'stylesheet', href: '/custom.css' }`. */
20
- attrs: z.record(z.string(), z.union([z.string(), z.boolean(), z.undefined()])).optional(),
21
- /** Content to place inside the tag (optional). */
22
- content: z.string().optional(),
23
- })
24
- .superRefine((config, ctx) => {
25
- if (config.tag !== 'meta' || config.content === undefined) return;
26
- const { content, ...rest } = config;
27
- const correctTag = {
28
- ...rest,
29
- attrs: { ...(config.attrs ?? { name: 'identifier' }), content: config.content },
30
- };
31
- const code =
32
- source === 'config' ? JSON.stringify(correctTag, null, 2) : yaml.dump([correctTag]);
33
- ctx.issues.push({
34
- code: 'custom',
35
- message:
36
- `The \`head\` configuration includes a \`meta\` tag with \`content\` which is invalid HTML.\n` +
37
- `You should instead use a \`content\` attribute ` +
38
- (Object.keys(rest.attrs ?? {}).length === 0
39
- ? 'with an additional attribute such as `name`, `property`, or `http-equiv` to identify the kind of metadata it represents '
40
- : '') +
41
- `in the \`attrs\` object:\n\n` +
42
- code,
43
- input: config,
44
- });
45
- })
46
- )
47
- .default([]);
48
-
49
- export type HeadUserConfig = z.input<ReturnType<typeof HeadConfigSchema>>;
50
- export type HeadConfig = z.output<ReturnType<typeof HeadConfigSchema>>;
package/schemas/hero.ts DELETED
@@ -1,69 +0,0 @@
1
- import { z } from 'astro/zod';
2
- import type { SchemaContext } from 'astro:content';
3
- import { IconSchema } from './icon';
4
-
5
- export const HeroSchema = ({ image }: SchemaContext) =>
6
- z.object({
7
- /**
8
- * The large title text to show. If not provided, will default to the top-level `title`.
9
- * Can include HTML.
10
- */
11
- title: z.string().optional(),
12
- /**
13
- * A short bit of text about your project.
14
- * Will be displayed in a smaller size below the title.
15
- */
16
- tagline: z.string().optional(),
17
- /** The image to use in the hero. You can provide either a relative `file` path or raw `html`. */
18
- image: z
19
- .union([
20
- z.object({
21
- /** Alt text for screenreaders and other assistive technologies describing your hero image. */
22
- alt: z.string().default(''),
23
- /** Relative path to an image file in your repo, e.g. `../../assets/hero.png`. */
24
- file: image(),
25
- }),
26
- z.object({
27
- /** Alt text for screenreaders and other assistive technologies describing your hero image. */
28
- alt: z.string().default(''),
29
- /** Relative path to an image file in your repo to use in dark mode, e.g. `../../assets/hero-dark.png`. */
30
- dark: image(),
31
- /** Relative path to an image file in your repo to use in light mode, e.g. `../../assets/hero-light.png`. */
32
- light: image(),
33
- }),
34
- z
35
- .object({
36
- /** Raw HTML string instead of an image file. Useful for inline SVGs or more complex hero content. */
37
- html: z.string(),
38
- })
39
- .transform(({ html }) => ({ html, alt: '' })),
40
- ])
41
- .optional(),
42
- /** An array of call-to-action links displayed at the bottom of the hero. */
43
- actions: z
44
- .object({
45
- /** Text label displayed in the link. */
46
- text: z.string(),
47
- /** Value for the link’s `href` attribute, e.g. `/page` or `https://mysite.com`. */
48
- link: z.string(),
49
- /** Button style to use. One of `primary` (the default), `secondary`, or `minimal`. */
50
- variant: z.enum(['primary', 'secondary', 'minimal']).default('primary'),
51
- /**
52
- * An optional icon to display alongside the link text.
53
- * Can be an inline `<svg>` or the name of one of Starlight’s built-in icons.
54
- */
55
- icon: z
56
- .union([IconSchema(), z.string().startsWith('<svg')])
57
- .transform((icon) => {
58
- const parsedIcon = IconSchema().safeParse(icon);
59
- return parsedIcon.success
60
- ? ({ type: 'icon', name: parsedIcon.data } as const)
61
- : ({ type: 'raw', html: icon } as const);
62
- })
63
- .optional(),
64
- /** HTML attributes to add to the link */
65
- attrs: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).optional(),
66
- })
67
- .array()
68
- .default([]),
69
- });
package/schemas/i18n.ts DELETED
@@ -1,244 +0,0 @@
1
- import { z } from 'astro/zod';
2
-
3
- interface i18nSchemaOpts<T extends z.ZodObject = BaseExtendSchema> {
4
- /**
5
- * Extend Starlight’s i18n schema with additional fields.
6
- *
7
- * @example
8
- * // Add two optional fields to the default schema.
9
- * i18nSchema({
10
- * extend: z
11
- * .object({
12
- * 'customUi.heading': z.string(),
13
- * 'customUi.text': z.string(),
14
- * })
15
- * .partial(),
16
- * })
17
- */
18
- extend?: T;
19
- }
20
-
21
- const defaultI18nSchema = () =>
22
- z.object({
23
- ...starlightI18nSchema().shape,
24
- ...pagefindI18nSchema().shape,
25
- ...expressiveCodeI18nSchema().shape,
26
- });
27
- /** Type of Starlight’s default i18n schema, including extensions from Pagefind and Expressive Code. */
28
- type DefaultI18nSchema = ReturnType<typeof defaultI18nSchema>;
29
-
30
- /**
31
- * Based on the the return type of Zod’s `extend()` method. Adds fields from one `z.object()` schema
32
- * to another.
33
- * Also sets the resulting schema as “loose” as that’s how we use it. In practice whether or not
34
- * the types are loose or not doesn’t matter too much.
35
- *
36
- * @see https://github.com/colinhacks/zod/blob/9712a6707f3d4584f222729965f3b78f076f0435/packages/zod/src/v4/classic/schemas.ts#L1187
37
- */
38
- type MergeSchemas<A extends z.ZodObject, B extends z.ZodObject> = z.ZodObject<
39
- z.util.Extend<A['shape'], B['shape']>,
40
- z.core.$loose
41
- >;
42
- /** Type that extends Starlight’s default i18n schema with an optional, user-defined schema. */
43
- type ExtendedSchema<T extends z.ZodObject> = T extends z.ZodObject
44
- ? MergeSchemas<DefaultI18nSchema, T>
45
- : DefaultI18nSchema;
46
- /** Type representing an empty Zod object schema used as the default for the `extend` option. */
47
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
48
- type BaseExtendSchema = z.ZodObject<{}>;
49
-
50
- /** Content collection schema for Starlight’s optional `i18n` collection. */
51
- export function i18nSchema<T extends z.ZodObject = BaseExtendSchema>({
52
- extend = z.object({}) as T,
53
- }: i18nSchemaOpts<T> = {}): ExtendedSchema<T> {
54
- return z.looseObject({
55
- ...defaultI18nSchema().shape,
56
- ...extend.shape,
57
- }) as ExtendedSchema<T>;
58
- }
59
- export type i18nSchemaOutput = z.output<ExtendedSchema<BaseExtendSchema>>;
60
-
61
- export function builtinI18nSchema() {
62
- return z.object({
63
- ...z.strictObject({ ...starlightI18nSchema().required().shape }).shape,
64
- ...pagefindI18nSchema().shape,
65
- ...expressiveCodeI18nSchema().shape,
66
- });
67
- }
68
-
69
- function starlightI18nSchema() {
70
- return z
71
- .object({
72
- 'skipLink.label': z.string().meta({
73
- description:
74
- 'Text displayed in the accessible “Skip link” when a keyboard user first tabs into a page.',
75
- }),
76
-
77
- 'search.label': z.string().meta({ description: 'Text displayed in the search bar.' }),
78
-
79
- 'search.ctrlKey': z.string().meta({
80
- description:
81
- 'Visible representation of the Control key potentially used in the shortcut key to open the search modal.',
82
- }),
83
-
84
- 'search.cancelLabel': z
85
- .string()
86
- .meta({ description: 'Text for the “Cancel” button that closes the search modal.' }),
87
-
88
- 'search.devWarning': z.string().meta({
89
- description: 'Warning displayed when opening the Search in a dev environment.',
90
- }),
91
-
92
- 'themeSelect.accessibleLabel': z
93
- .string()
94
- .meta({ description: 'Accessible label for the theme selection dropdown.' }),
95
-
96
- 'themeSelect.dark': z.string().meta({ description: 'Name of the dark color theme.' }),
97
-
98
- 'themeSelect.light': z.string().meta({ description: 'Name of the light color theme.' }),
99
-
100
- 'themeSelect.auto': z.string().meta({
101
- description: 'Name of the automatic color theme that syncs with system preferences.',
102
- }),
103
-
104
- 'languageSelect.accessibleLabel': z
105
- .string()
106
- .meta({ description: 'Accessible label for the language selection dropdown.' }),
107
-
108
- 'menuButton.accessibleLabel': z
109
- .string()
110
- .meta({ description: 'Accessible label for the mobile menu button.' }),
111
-
112
- 'sidebarNav.accessibleLabel': z.string().meta({
113
- description:
114
- 'Accessible label for the main sidebar `<nav>` element to distinguish it from other `<nav>` landmarks on the page.',
115
- }),
116
-
117
- 'tableOfContents.onThisPage': z
118
- .string()
119
- .meta({ description: 'Title for the table of contents component.' }),
120
-
121
- 'tableOfContents.overview': z.string().meta({
122
- description:
123
- 'Label used for the first link in the table of contents, linking to the page title.',
124
- }),
125
-
126
- 'i18n.untranslatedContent': z.string().meta({
127
- description:
128
- 'Notice informing users they are on a page that is not yet translated to their language.',
129
- }),
130
-
131
- 'page.editLink': z.string().meta({ description: 'Text for the link to edit a page.' }),
132
-
133
- 'page.lastUpdated': z.string().meta({
134
- description: 'Text displayed in front of the last updated date in the page footer.',
135
- }),
136
-
137
- 'page.previousLink': z.string().meta({
138
- description: 'Label shown on the “previous page” pagination arrow in the page footer.',
139
- }),
140
-
141
- 'page.nextLink': z.string().meta({
142
- description: 'Label shown on the “next page” pagination arrow in the page footer.',
143
- }),
144
-
145
- 'page.draft': z.string().meta({
146
- description:
147
- 'Development-only notice informing users they are on a page that is a draft which will not be included in production builds.',
148
- }),
149
-
150
- '404.text': z.string().meta({ description: 'Text shown on Starlight’s default 404 page' }),
151
- 'aside.tip': z.string().meta({ description: 'Text shown on the tip aside variant' }),
152
- 'aside.note': z.string().meta({ description: 'Text shown on the note aside variant' }),
153
- 'aside.caution': z.string().meta({ description: 'Text shown on the warning aside variant' }),
154
- 'aside.danger': z.string().meta({ description: 'Text shown on the danger aside variant' }),
155
-
156
- 'fileTree.directory': z
157
- .string()
158
- .meta({ description: 'Label for the directory icon in the file tree component.' }),
159
-
160
- 'builtWithStarlight.label': z.string().meta({
161
- description:
162
- 'Label for the “Built with Starlight” badge optionally displayed in the site footer.',
163
- }),
164
-
165
- 'heading.anchorLabel': z
166
- .string()
167
- .meta({ description: 'Label for anchor links in Markdown content.' }),
168
- })
169
- .partial();
170
- }
171
-
172
- function pagefindI18nSchema() {
173
- return z
174
- .object({
175
- 'pagefind.clear_search': z.string().meta({
176
- description:
177
- 'Pagefind UI translation. English default value: `"Clear"`. See https://pagefind.app/docs/ui/#translations',
178
- }),
179
-
180
- 'pagefind.load_more': z.string().meta({
181
- description:
182
- 'Pagefind UI translation. English default value: `"Load more results"`. See https://pagefind.app/docs/ui/#translations',
183
- }),
184
-
185
- 'pagefind.search_label': z.string().meta({
186
- description:
187
- 'Pagefind UI translation. English default value: `"Search this site"`. See https://pagefind.app/docs/ui/#translations',
188
- }),
189
-
190
- 'pagefind.filters_label': z.string().meta({
191
- description:
192
- 'Pagefind UI translation. English default value: `"Filters"`. See https://pagefind.app/docs/ui/#translations',
193
- }),
194
-
195
- 'pagefind.zero_results': z.string().meta({
196
- description:
197
- 'Pagefind UI translation. English default value: `"No results for [SEARCH_TERM]"`. See https://pagefind.app/docs/ui/#translations',
198
- }),
199
-
200
- 'pagefind.many_results': z.string().meta({
201
- description:
202
- 'Pagefind UI translation. English default value: `"[COUNT] results for [SEARCH_TERM]"`. See https://pagefind.app/docs/ui/#translations',
203
- }),
204
-
205
- 'pagefind.one_result': z.string().meta({
206
- description:
207
- 'Pagefind UI translation. English default value: `"[COUNT] result for [SEARCH_TERM]"`. See https://pagefind.app/docs/ui/#translations',
208
- }),
209
-
210
- 'pagefind.alt_search': z.string().meta({
211
- description:
212
- 'Pagefind UI translation. English default value: `"No results for [SEARCH_TERM]. Showing results for [DIFFERENT_TERM] instead"`. See https://pagefind.app/docs/ui/#translations',
213
- }),
214
-
215
- 'pagefind.search_suggestion': z.string().meta({
216
- description:
217
- 'Pagefind UI translation. English default value: `"No results for [SEARCH_TERM]. Try one of the following searches:"`. See https://pagefind.app/docs/ui/#translations',
218
- }),
219
-
220
- 'pagefind.searching': z.string().meta({
221
- description:
222
- 'Pagefind UI translation. English default value: `"Searching for [SEARCH_TERM]..."`. See https://pagefind.app/docs/ui/#translations',
223
- }),
224
- })
225
- .partial();
226
- }
227
-
228
- function expressiveCodeI18nSchema() {
229
- return z
230
- .object({
231
- 'expressiveCode.copyButtonCopied': z.string().meta({
232
- description: 'Expressive Code UI translation. English default value: `"Copied!"`',
233
- }),
234
-
235
- 'expressiveCode.copyButtonTooltip': z.string().meta({
236
- description: 'Expressive Code UI translation. English default value: `"Copy to clipboard"`',
237
- }),
238
-
239
- 'expressiveCode.terminalWindowFallbackTitle': z.string().meta({
240
- description: 'Expressive Code UI translation. English default value: `"Terminal window"`',
241
- }),
242
- })
243
- .partial();
244
- }