@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
@@ -0,0 +1,205 @@
1
+ import { I18nBadgeUserConfig } from "./badge.js";
2
+ import { z } from "astro/zod";
3
+ import { AstroBuiltinAttributes } from "astro";
4
+ import { HTMLAttributes } from "astro/types";
5
+ //#region src/schemas/sidebar.d.ts
6
+ interface SidebarBaseUserConfig {
7
+ /** The visible label for this item in the sidebar. */
8
+ label: string;
9
+ /** Translations of the `label` for each supported language. */
10
+ translations?: Record<string, string> | undefined;
11
+ /** Adds a badge to the item */
12
+ badge?: I18nBadgeUserConfig;
13
+ }
14
+ interface SidebarGroupUserConfig extends SidebarBaseUserConfig {
15
+ /**
16
+ * Explicitly prevent custom attributes on groups as the final type for supported sidebar item
17
+ * is a non-discriminated union where TypeScript will not perform excess property checks.
18
+ * This means that a user could define a sidebar group with custom attributes, not getting a
19
+ * TypeScript error, and only have it fail at runtime.
20
+ * @see https://github.com/microsoft/TypeScript/issues/20863
21
+ */
22
+ attrs?: undefined;
23
+ /** Whether this item should be collapsed by default. */
24
+ collapsed?: boolean | undefined;
25
+ }
26
+ declare const SidebarGroupSchema: z.ZodObject<{
27
+ attrs: z.ZodOptional<z.ZodNever>;
28
+ collapsed: z.ZodDefault<z.ZodBoolean>;
29
+ label: z.ZodString;
30
+ translations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
31
+ badge: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
32
+ text: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
33
+ variant: z.ZodDefault<z.ZodEnum<{
34
+ default: "default";
35
+ success: "success";
36
+ note: "note";
37
+ tip: "tip";
38
+ caution: "caution";
39
+ danger: "danger";
40
+ }>>;
41
+ class: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strip>]>>;
43
+ }, z.core.$strip>;
44
+ type LinkHTMLAttributes = Omit<HTMLAttributes<'a'>, keyof AstroBuiltinAttributes | 'children'>;
45
+ declare const SidebarLinkItemHTMLAttributesSchema: () => z.ZodDefault<z.ZodType<LinkHTMLAttributes, LinkHTMLAttributes, z.core.$ZodTypeInternals<LinkHTMLAttributes, LinkHTMLAttributes>>>;
46
+ interface SidebarLinkItemUserConfig extends SidebarBaseUserConfig {
47
+ /** The link to this item’s content. Can be a relative link to local files or the full URL of an external page. */
48
+ link: string;
49
+ /** HTML attributes to add to the link item. */
50
+ attrs?: LinkHTMLAttributes | undefined;
51
+ }
52
+ declare const SidebarLinkItemSchema: z.ZodObject<{
53
+ link: z.ZodString;
54
+ attrs: z.ZodDefault<z.ZodType<LinkHTMLAttributes, LinkHTMLAttributes, z.core.$ZodTypeInternals<LinkHTMLAttributes, LinkHTMLAttributes>>>;
55
+ label: z.ZodString;
56
+ translations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
57
+ badge: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
58
+ text: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
59
+ variant: z.ZodDefault<z.ZodEnum<{
60
+ default: "default";
61
+ success: "success";
62
+ note: "note";
63
+ tip: "tip";
64
+ caution: "caution";
65
+ danger: "danger";
66
+ }>>;
67
+ class: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>]>>;
69
+ }, z.core.$strict>;
70
+ type SidebarLinkItem = z.infer<typeof SidebarLinkItemSchema>;
71
+ interface AutoSidebarEntriesUserConfig {
72
+ /**
73
+ * Explicitly prevent autogenerated groups which are no longer supported as the final type for
74
+ * supported sidebar item is a non-discriminated union where TypeScript will not perform excess
75
+ * property checks. This means that a user could define a sidebar group with an autogenerated
76
+ * property, not getting a TypeScript error, and only have it fail at runtime.
77
+ * @see https://github.com/microsoft/TypeScript/issues/20863
78
+ */
79
+ label?: undefined;
80
+ /** Enable autogenerating entries from a specific docs directory. */
81
+ autogenerate: {
82
+ /** The directory to generate sidebar items for. */
83
+ directory: string;
84
+ /** Whether autogenerated subgroups should be collapsed. Default: `false`. */
85
+ collapsed?: boolean | undefined;
86
+ /** HTML attributes to add to autogenerated link items. */
87
+ attrs?: LinkHTMLAttributes | undefined;
88
+ };
89
+ }
90
+ declare const AutoSidebarEntriesSchema: z.ZodObject<{
91
+ label: z.ZodOptional<z.ZodCustom<never, never>>;
92
+ autogenerate: z.ZodObject<{
93
+ directory: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
94
+ collapsed: z.ZodOptional<z.ZodBoolean>;
95
+ attrs: z.ZodDefault<z.ZodType<LinkHTMLAttributes, LinkHTMLAttributes, z.core.$ZodTypeInternals<LinkHTMLAttributes, LinkHTMLAttributes>>>;
96
+ }, z.core.$strip>;
97
+ }, z.core.$strict>;
98
+ type AutoSidebarEntries = z.infer<typeof AutoSidebarEntriesSchema>;
99
+ type ManualSidebarGroupInput = z.input<typeof SidebarGroupSchema> & {
100
+ /** Array of links and subcategories to display in this category. */
101
+ items: Array<z.input<typeof SidebarLinkItemSchema> | z.input<typeof AutoSidebarEntriesSchema> | z.input<typeof InternalSidebarLinkItemSchema> | z.input<typeof InternalSidebarLinkItemShorthandSchema> | ManualSidebarGroupInput>;
102
+ };
103
+ type ManualSidebarGroupOutput = z.output<typeof SidebarGroupSchema> & {
104
+ /** Array of links and subcategories to display in this category. */
105
+ items: Array<z.output<typeof SidebarLinkItemSchema> | z.output<typeof AutoSidebarEntriesSchema> | z.output<typeof InternalSidebarLinkItemSchema> | z.output<typeof InternalSidebarLinkItemShorthandSchema> | ManualSidebarGroupOutput>;
106
+ };
107
+ type ManualSidebarGroupUserConfig = SidebarGroupUserConfig & {
108
+ /** Array of links and subcategories to display in this category. */
109
+ items: SidebarItemUserConfig[];
110
+ };
111
+ interface InternalSidebarLinkItemUserConfig extends Omit<SidebarBaseUserConfig, 'label'> {
112
+ /** The visible label for this item in the sidebar. */
113
+ label?: SidebarBaseUserConfig['label'] | undefined;
114
+ /** The link to this item’s content. Must be a slug of a Content Collection entry. */
115
+ slug: string;
116
+ /** HTML attributes to add to the link item. */
117
+ attrs?: LinkHTMLAttributes | undefined;
118
+ }
119
+ declare const InternalSidebarLinkItemSchema: z.ZodObject<{
120
+ slug: z.ZodString;
121
+ attrs: z.ZodDefault<z.ZodType<LinkHTMLAttributes, LinkHTMLAttributes, z.core.$ZodTypeInternals<LinkHTMLAttributes, LinkHTMLAttributes>>>;
122
+ label: z.ZodOptional<z.ZodString>;
123
+ translations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
124
+ badge: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
125
+ text: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
126
+ variant: z.ZodDefault<z.ZodEnum<{
127
+ default: "default";
128
+ success: "success";
129
+ note: "note";
130
+ tip: "tip";
131
+ caution: "caution";
132
+ danger: "danger";
133
+ }>>;
134
+ class: z.ZodOptional<z.ZodString>;
135
+ }, z.core.$strip>]>>;
136
+ }, z.core.$strip>;
137
+ type InternalSidebarLinkItemShorthandUserConfig = string;
138
+ declare const InternalSidebarLinkItemShorthandSchema: z.ZodPipe<z.ZodString, z.ZodTransform<{
139
+ slug: string;
140
+ attrs: LinkHTMLAttributes;
141
+ translations: Record<string, string>;
142
+ label?: string | undefined;
143
+ badge?: string | {
144
+ text: string | Record<string, string>;
145
+ variant: "default" | "success" | "note" | "tip" | "caution" | "danger";
146
+ class?: string | undefined;
147
+ } | undefined;
148
+ }, string>>;
149
+ type InternalSidebarLinkItem = z.output<typeof InternalSidebarLinkItemSchema>;
150
+ type SidebarItemUserConfig = SidebarLinkItemUserConfig | ManualSidebarGroupUserConfig | AutoSidebarEntriesUserConfig | InternalSidebarLinkItemUserConfig | InternalSidebarLinkItemShorthandUserConfig;
151
+ declare const SidebarItemSchema: z.ZodUnion<readonly [z.ZodObject<{
152
+ link: z.ZodString;
153
+ attrs: z.ZodDefault<z.ZodType<LinkHTMLAttributes, LinkHTMLAttributes, z.core.$ZodTypeInternals<LinkHTMLAttributes, LinkHTMLAttributes>>>;
154
+ label: z.ZodString;
155
+ translations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
156
+ badge: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
157
+ text: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
158
+ variant: z.ZodDefault<z.ZodEnum<{
159
+ default: "default";
160
+ success: "success";
161
+ note: "note";
162
+ tip: "tip";
163
+ caution: "caution";
164
+ danger: "danger";
165
+ }>>;
166
+ class: z.ZodOptional<z.ZodString>;
167
+ }, z.core.$strip>]>>;
168
+ }, z.core.$strict>, z.ZodType<ManualSidebarGroupOutput, ManualSidebarGroupInput, z.core.$ZodTypeInternals<ManualSidebarGroupOutput, ManualSidebarGroupInput>>, z.ZodObject<{
169
+ label: z.ZodOptional<z.ZodCustom<never, never>>;
170
+ autogenerate: z.ZodObject<{
171
+ directory: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
172
+ collapsed: z.ZodOptional<z.ZodBoolean>;
173
+ attrs: z.ZodDefault<z.ZodType<LinkHTMLAttributes, LinkHTMLAttributes, z.core.$ZodTypeInternals<LinkHTMLAttributes, LinkHTMLAttributes>>>;
174
+ }, z.core.$strip>;
175
+ }, z.core.$strict>, z.ZodObject<{
176
+ slug: z.ZodString;
177
+ attrs: z.ZodDefault<z.ZodType<LinkHTMLAttributes, LinkHTMLAttributes, z.core.$ZodTypeInternals<LinkHTMLAttributes, LinkHTMLAttributes>>>;
178
+ label: z.ZodOptional<z.ZodString>;
179
+ translations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
180
+ badge: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
181
+ text: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
182
+ variant: z.ZodDefault<z.ZodEnum<{
183
+ default: "default";
184
+ success: "success";
185
+ note: "note";
186
+ tip: "tip";
187
+ caution: "caution";
188
+ danger: "danger";
189
+ }>>;
190
+ class: z.ZodOptional<z.ZodString>;
191
+ }, z.core.$strip>]>>;
192
+ }, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
193
+ slug: string;
194
+ attrs: LinkHTMLAttributes;
195
+ translations: Record<string, string>;
196
+ label?: string | undefined;
197
+ badge?: string | {
198
+ text: string | Record<string, string>;
199
+ variant: "default" | "success" | "note" | "tip" | "caution" | "danger";
200
+ class?: string | undefined;
201
+ } | undefined;
202
+ }, string>>]>;
203
+ type SidebarItem = z.infer<typeof SidebarItemSchema>;
204
+ //#endregion
205
+ export { AutoSidebarEntries, InternalSidebarLinkItem, LinkHTMLAttributes, SidebarItem, SidebarItemSchema, SidebarItemUserConfig, SidebarLinkItem, SidebarLinkItemHTMLAttributesSchema };
@@ -0,0 +1,71 @@
1
+ import { stripLeadingAndTrailingSlashes } from "../utils/path.js";
2
+ import { I18nBadgeConfigSchema } from "./badge.js";
3
+ import { z } from "astro/zod";
4
+ //#region src/schemas/sidebar.ts
5
+ const SidebarBaseSchema = z.object({
6
+ label: z.string(),
7
+ translations: z.record(z.string(), z.string()).default({}),
8
+ badge: I18nBadgeConfigSchema()
9
+ });
10
+ const SidebarGroupSchema = z.object({
11
+ ...SidebarBaseSchema.shape,
12
+ attrs: z.never().optional(),
13
+ collapsed: z.boolean().default(false)
14
+ });
15
+ const linkHTMLAttributesSchema = z.record(z.string(), z.union([
16
+ z.string(),
17
+ z.number(),
18
+ z.boolean(),
19
+ z.undefined(),
20
+ z.null()
21
+ ]));
22
+ const SidebarLinkItemHTMLAttributesSchema = () => linkHTMLAttributesSchema.default({});
23
+ const SidebarLinkItemSchema = z.strictObject({
24
+ ...SidebarBaseSchema.shape,
25
+ link: z.string(),
26
+ attrs: SidebarLinkItemHTMLAttributesSchema()
27
+ });
28
+ const AutoSidebarEntriesSchema = z.object({
29
+ label: z.custom().optional(),
30
+ autogenerate: z.object({
31
+ directory: z.string().transform(stripLeadingAndTrailingSlashes),
32
+ collapsed: z.boolean().optional(),
33
+ attrs: SidebarLinkItemHTMLAttributesSchema()
34
+ })
35
+ }).strict().superRefine((config, ctx) => {
36
+ if (!("label" in config)) return;
37
+ ctx.addIssue({
38
+ code: "custom",
39
+ message: `Found an \`autogenerate\` object with a \`label\`. Support for autogenerated sidebar groups was removed in Starlight v0.39.0.
40
+ You should instead create a group with the desired \`label\` and an \`items\` array containing the autogenerate config:
41
+
42
+ {
43
+ label: '${config.label}',\n items: [{ autogenerate: ${JSON.stringify(config.autogenerate, (key, value) => key === "attrs" && typeof value === "object" && value !== null && Object.keys(value).length === 0 ? void 0 : value, " ").replace(/\n\s*/g, " ")} }]\n}`
44
+ });
45
+ });
46
+ const ManualSidebarGroupSchema = z.strictObject({
47
+ ...SidebarGroupSchema.shape,
48
+ /** Array of links and subcategories to display in this category. */
49
+ items: z.lazy(() => z.union([
50
+ SidebarLinkItemSchema,
51
+ ManualSidebarGroupSchema,
52
+ AutoSidebarEntriesSchema,
53
+ InternalSidebarLinkItemSchema,
54
+ InternalSidebarLinkItemShorthandSchema
55
+ ]).array())
56
+ });
57
+ const InternalSidebarLinkItemSchema = z.object({
58
+ ...SidebarBaseSchema.partial({ label: true }).shape,
59
+ slug: z.string(),
60
+ attrs: SidebarLinkItemHTMLAttributesSchema()
61
+ });
62
+ const InternalSidebarLinkItemShorthandSchema = z.string().transform((slug) => InternalSidebarLinkItemSchema.parse({ slug }));
63
+ const SidebarItemSchema = z.union([
64
+ SidebarLinkItemSchema,
65
+ ManualSidebarGroupSchema,
66
+ AutoSidebarEntriesSchema,
67
+ InternalSidebarLinkItemSchema,
68
+ InternalSidebarLinkItemShorthandSchema
69
+ ]);
70
+ //#endregion
71
+ export { SidebarItemSchema, SidebarLinkItemHTMLAttributesSchema };
@@ -0,0 +1,7 @@
1
+ import { z } from "astro/zod";
2
+ //#region src/schemas/site-title.d.ts
3
+ type TitleUserConfig = string | Record<string, string>;
4
+ declare const TitleConfigSchema: () => z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
5
+ declare const TitleTransformConfigSchema: (defaultLang: string) => z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>, z.ZodTransform<Record<string, string>, string | Record<string, string>>>;
6
+ //#endregion
7
+ export { TitleConfigSchema, TitleTransformConfigSchema, TitleUserConfig };
@@ -0,0 +1,17 @@
1
+ import { z } from "astro/zod";
2
+ //#region src/schemas/site-title.ts
3
+ const TitleConfigSchema = () => z.union([z.string(), z.record(z.string(), z.string())]);
4
+ const TitleTransformConfigSchema = (defaultLang) => TitleConfigSchema().transform((title, ctx) => {
5
+ if (typeof title === "string") return { [defaultLang]: title };
6
+ if (!title[defaultLang] && title[defaultLang] !== "") {
7
+ ctx.issues.push({
8
+ code: "custom",
9
+ message: `Title must have a key for the default language "${defaultLang}"`,
10
+ input: title
11
+ });
12
+ return z.NEVER;
13
+ }
14
+ return title;
15
+ });
16
+ //#endregion
17
+ export { TitleConfigSchema, TitleTransformConfigSchema };
@@ -0,0 +1,292 @@
1
+ import { IconUserConfig } from "./icon.js";
2
+ import { z } from "astro/zod";
3
+ //#region src/schemas/social.d.ts
4
+ type SocialLinksUserConfig = {
5
+ icon: IconUserConfig;
6
+ label: string;
7
+ href: string;
8
+ }[] | undefined;
9
+ declare const LinksSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
10
+ icon: z.ZodEnum<{
11
+ server: "server";
12
+ external: "external";
13
+ error: "error";
14
+ link: "link";
15
+ "up-caret": "up-caret";
16
+ "down-caret": "down-caret";
17
+ "right-caret": "right-caret";
18
+ "left-caret": "left-caret";
19
+ "up-arrow": "up-arrow";
20
+ "down-arrow": "down-arrow";
21
+ "right-arrow": "right-arrow";
22
+ "left-arrow": "left-arrow";
23
+ bars: "bars";
24
+ translate: "translate";
25
+ pencil: "pencil";
26
+ pen: "pen";
27
+ document: "document";
28
+ "add-document": "add-document";
29
+ setting: "setting";
30
+ "link-alt": "link-alt";
31
+ download: "download";
32
+ "cloud-download": "cloud-download";
33
+ moon: "moon";
34
+ sun: "sun";
35
+ clock: "clock";
36
+ laptop: "laptop";
37
+ desktop: "desktop";
38
+ "mobile-android": "mobile-android";
39
+ window: "window";
40
+ database: "database";
41
+ "code-branch": "code-branch";
42
+ "open-book": "open-book";
43
+ notes: "notes";
44
+ information: "information";
45
+ magnifier: "magnifier";
46
+ "forward-slash": "forward-slash";
47
+ close: "close";
48
+ warning: "warning";
49
+ "approve-check-circle": "approve-check-circle";
50
+ "approve-check": "approve-check";
51
+ "question-circle": "question-circle";
52
+ question: "question";
53
+ rocket: "rocket";
54
+ star: "star";
55
+ puzzle: "puzzle";
56
+ "list-format": "list-format";
57
+ analytics: "analytics";
58
+ random: "random";
59
+ padlock: "padlock";
60
+ comment: "comment";
61
+ "comment-alt": "comment-alt";
62
+ heart: "heart";
63
+ github: "github";
64
+ gitlab: "gitlab";
65
+ bitbucket: "bitbucket";
66
+ forgejo: "forgejo";
67
+ codePen: "codePen";
68
+ farcaster: "farcaster";
69
+ discord: "discord";
70
+ gitter: "gitter";
71
+ twitter: "twitter";
72
+ "x.com": "x.com";
73
+ mastodon: "mastodon";
74
+ codeberg: "codeberg";
75
+ youtube: "youtube";
76
+ threads: "threads";
77
+ linkedin: "linkedin";
78
+ twitch: "twitch";
79
+ azureDevOps: "azureDevOps";
80
+ microsoftTeams: "microsoftTeams";
81
+ instagram: "instagram";
82
+ stackOverflow: "stackOverflow";
83
+ telegram: "telegram";
84
+ whatsApp: "whatsApp";
85
+ rss: "rss";
86
+ facebook: "facebook";
87
+ email: "email";
88
+ phone: "phone";
89
+ reddit: "reddit";
90
+ patreon: "patreon";
91
+ signal: "signal";
92
+ slack: "slack";
93
+ matrix: "matrix";
94
+ hackerOne: "hackerOne";
95
+ openCollective: "openCollective";
96
+ blueSky: "blueSky";
97
+ discourse: "discourse";
98
+ zulip: "zulip";
99
+ pinterest: "pinterest";
100
+ tiktok: "tiktok";
101
+ goodreads: "goodreads";
102
+ hypothesis: "hypothesis";
103
+ astro: "astro";
104
+ solidjs: "solidjs";
105
+ alpine: "alpine";
106
+ pnpm: "pnpm";
107
+ biome: "biome";
108
+ bun: "bun";
109
+ mdx: "mdx";
110
+ apple: "apple";
111
+ linux: "linux";
112
+ homebrew: "homebrew";
113
+ nix: "nix";
114
+ starlight: "starlight";
115
+ pkl: "pkl";
116
+ node: "node";
117
+ cloudflare: "cloudflare";
118
+ vercel: "vercel";
119
+ netlify: "netlify";
120
+ deno: "deno";
121
+ jsr: "jsr";
122
+ nostr: "nostr";
123
+ backstage: "backstage";
124
+ confluence: "confluence";
125
+ jira: "jira";
126
+ storybook: "storybook";
127
+ vscode: "vscode";
128
+ jetbrains: "jetbrains";
129
+ zed: "zed";
130
+ vim: "vim";
131
+ figma: "figma";
132
+ sketch: "sketch";
133
+ npm: "npm";
134
+ npmx: "npmx";
135
+ sourcehut: "sourcehut";
136
+ substack: "substack";
137
+ chrome: "chrome";
138
+ edge: "edge";
139
+ firefox: "firefox";
140
+ safari: "safari";
141
+ "seti:folder": "seti:folder";
142
+ "seti:bsl": "seti:bsl";
143
+ "seti:mdo": "seti:mdo";
144
+ "seti:salesforce": "seti:salesforce";
145
+ "seti:asm": "seti:asm";
146
+ "seti:bicep": "seti:bicep";
147
+ "seti:bazel": "seti:bazel";
148
+ "seti:c": "seti:c";
149
+ "seti:c-sharp": "seti:c-sharp";
150
+ "seti:html": "seti:html";
151
+ "seti:cpp": "seti:cpp";
152
+ "seti:clojure": "seti:clojure";
153
+ "seti:coldfusion": "seti:coldfusion";
154
+ "seti:config": "seti:config";
155
+ "seti:crystal": "seti:crystal";
156
+ "seti:crystal_embedded": "seti:crystal_embedded";
157
+ "seti:json": "seti:json";
158
+ "seti:css": "seti:css";
159
+ "seti:csv": "seti:csv";
160
+ "seti:xls": "seti:xls";
161
+ "seti:cu": "seti:cu";
162
+ "seti:cake": "seti:cake";
163
+ "seti:cake_php": "seti:cake_php";
164
+ "seti:d": "seti:d";
165
+ "seti:word": "seti:word";
166
+ "seti:elixir": "seti:elixir";
167
+ "seti:elixir_script": "seti:elixir_script";
168
+ "seti:hex": "seti:hex";
169
+ "seti:elm": "seti:elm";
170
+ "seti:favicon": "seti:favicon";
171
+ "seti:f-sharp": "seti:f-sharp";
172
+ "seti:git": "seti:git";
173
+ "seti:go": "seti:go";
174
+ "seti:godot": "seti:godot";
175
+ "seti:gradle": "seti:gradle";
176
+ "seti:grails": "seti:grails";
177
+ "seti:graphql": "seti:graphql";
178
+ "seti:hacklang": "seti:hacklang";
179
+ "seti:haml": "seti:haml";
180
+ "seti:mustache": "seti:mustache";
181
+ "seti:haskell": "seti:haskell";
182
+ "seti:haxe": "seti:haxe";
183
+ "seti:jade": "seti:jade";
184
+ "seti:java": "seti:java";
185
+ "seti:javascript": "seti:javascript";
186
+ "seti:jinja": "seti:jinja";
187
+ "seti:julia": "seti:julia";
188
+ "seti:karma": "seti:karma";
189
+ "seti:kotlin": "seti:kotlin";
190
+ "seti:dart": "seti:dart";
191
+ "seti:liquid": "seti:liquid";
192
+ "seti:livescript": "seti:livescript";
193
+ "seti:lua": "seti:lua";
194
+ "seti:markdown": "seti:markdown";
195
+ "seti:argdown": "seti:argdown";
196
+ "seti:info": "seti:info";
197
+ "seti:clock": "seti:clock";
198
+ "seti:maven": "seti:maven";
199
+ "seti:nim": "seti:nim";
200
+ "seti:github": "seti:github";
201
+ "seti:notebook": "seti:notebook";
202
+ "seti:nunjucks": "seti:nunjucks";
203
+ "seti:npm": "seti:npm";
204
+ "seti:ocaml": "seti:ocaml";
205
+ "seti:odata": "seti:odata";
206
+ "seti:perl": "seti:perl";
207
+ "seti:php": "seti:php";
208
+ "seti:pipeline": "seti:pipeline";
209
+ "seti:pddl": "seti:pddl";
210
+ "seti:plan": "seti:plan";
211
+ "seti:happenings": "seti:happenings";
212
+ "seti:powershell": "seti:powershell";
213
+ "seti:prisma": "seti:prisma";
214
+ "seti:pug": "seti:pug";
215
+ "seti:puppet": "seti:puppet";
216
+ "seti:purescript": "seti:purescript";
217
+ "seti:python": "seti:python";
218
+ "seti:react": "seti:react";
219
+ "seti:rescript": "seti:rescript";
220
+ "seti:R": "seti:R";
221
+ "seti:ruby": "seti:ruby";
222
+ "seti:rust": "seti:rust";
223
+ "seti:sass": "seti:sass";
224
+ "seti:spring": "seti:spring";
225
+ "seti:slim": "seti:slim";
226
+ "seti:smarty": "seti:smarty";
227
+ "seti:sbt": "seti:sbt";
228
+ "seti:scala": "seti:scala";
229
+ "seti:ethereum": "seti:ethereum";
230
+ "seti:stylus": "seti:stylus";
231
+ "seti:svelte": "seti:svelte";
232
+ "seti:swift": "seti:swift";
233
+ "seti:db": "seti:db";
234
+ "seti:terraform": "seti:terraform";
235
+ "seti:tex": "seti:tex";
236
+ "seti:default": "seti:default";
237
+ "seti:twig": "seti:twig";
238
+ "seti:typescript": "seti:typescript";
239
+ "seti:tsconfig": "seti:tsconfig";
240
+ "seti:vala": "seti:vala";
241
+ "seti:vite": "seti:vite";
242
+ "seti:vue": "seti:vue";
243
+ "seti:wasm": "seti:wasm";
244
+ "seti:wat": "seti:wat";
245
+ "seti:xml": "seti:xml";
246
+ "seti:yml": "seti:yml";
247
+ "seti:prolog": "seti:prolog";
248
+ "seti:zig": "seti:zig";
249
+ "seti:zip": "seti:zip";
250
+ "seti:wgt": "seti:wgt";
251
+ "seti:illustrator": "seti:illustrator";
252
+ "seti:photoshop": "seti:photoshop";
253
+ "seti:pdf": "seti:pdf";
254
+ "seti:font": "seti:font";
255
+ "seti:image": "seti:image";
256
+ "seti:svg": "seti:svg";
257
+ "seti:sublime": "seti:sublime";
258
+ "seti:code-search": "seti:code-search";
259
+ "seti:shell": "seti:shell";
260
+ "seti:video": "seti:video";
261
+ "seti:audio": "seti:audio";
262
+ "seti:windows": "seti:windows";
263
+ "seti:jenkins": "seti:jenkins";
264
+ "seti:babel": "seti:babel";
265
+ "seti:bower": "seti:bower";
266
+ "seti:docker": "seti:docker";
267
+ "seti:code-climate": "seti:code-climate";
268
+ "seti:eslint": "seti:eslint";
269
+ "seti:firebase": "seti:firebase";
270
+ "seti:firefox": "seti:firefox";
271
+ "seti:gitlab": "seti:gitlab";
272
+ "seti:grunt": "seti:grunt";
273
+ "seti:gulp": "seti:gulp";
274
+ "seti:ionic": "seti:ionic";
275
+ "seti:platformio": "seti:platformio";
276
+ "seti:rollup": "seti:rollup";
277
+ "seti:stylelint": "seti:stylelint";
278
+ "seti:yarn": "seti:yarn";
279
+ "seti:webpack": "seti:webpack";
280
+ "seti:lock": "seti:lock";
281
+ "seti:license": "seti:license";
282
+ "seti:makefile": "seti:makefile";
283
+ "seti:heroku": "seti:heroku";
284
+ "seti:todo": "seti:todo";
285
+ "seti:ignored": "seti:ignored";
286
+ }>;
287
+ label: z.ZodString;
288
+ href: z.ZodString;
289
+ }, z.core.$strip>>>;
290
+ declare const SocialLinksSchema: () => typeof LinksSchema;
291
+ //#endregion
292
+ export { SocialLinksSchema, SocialLinksUserConfig };
@@ -0,0 +1,18 @@
1
+ import { IconSchema } from "./icon.js";
2
+ import { z } from "astro/zod";
3
+ //#region src/schemas/social.ts
4
+ const LinksSchema = z.object({
5
+ icon: IconSchema(),
6
+ label: z.string().min(1),
7
+ href: z.string()
8
+ }).array().optional();
9
+ const SocialLinksSchema = () => z.preprocess((value, ctx) => {
10
+ if (value && typeof value === "object" && !Array.isArray(value)) ctx.issues.push({
11
+ code: "custom",
12
+ message: "Starlight v0.33.0 changed the `social` configuration syntax. Please specify an array of link items instead of an object.\nSee the Starlight changelog for details: https://github.com/withastro/starlight/blob/main/packages/starlight/CHANGELOG.md#0330\n",
13
+ input: value
14
+ });
15
+ return value;
16
+ }, LinksSchema);
17
+ //#endregion
18
+ export { SocialLinksSchema };
@@ -0,0 +1,24 @@
1
+ import { z } from "astro/zod";
2
+ //#region src/schemas/tableOfContents.d.ts
3
+ type TableOfContentsUserConfig = boolean | {
4
+ /** The level to start including headings at in the table of contents. Default: 2. */
5
+ minHeadingLevel?: number | undefined;
6
+ /** The level to stop including headings at in the table of contents. Default: 3. */
7
+ maxHeadingLevel?: number | undefined;
8
+ } | undefined;
9
+ declare const UserConfigTableOfContentsSchema: () => z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
10
+ minHeadingLevel: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
11
+ maxHeadingLevel: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
12
+ }, z.core.$strip>, z.ZodPipe<z.ZodBoolean, z.ZodTransform<false | {
13
+ minHeadingLevel: number;
14
+ maxHeadingLevel: number;
15
+ }, boolean>>]>>;
16
+ declare const FrontmatterTableOfContentsSchema: () => z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
17
+ minHeadingLevel: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
18
+ maxHeadingLevel: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
19
+ }, z.core.$strip>, z.ZodPipe<z.ZodBoolean, z.ZodTransform<false | {
20
+ minHeadingLevel: number;
21
+ maxHeadingLevel: number;
22
+ }, boolean>>]>>;
23
+ //#endregion
24
+ export { FrontmatterTableOfContentsSchema, TableOfContentsUserConfig, UserConfigTableOfContentsSchema };
@@ -0,0 +1,16 @@
1
+ import { z } from "astro/zod";
2
+ //#region src/schemas/tableOfContents.ts
3
+ const defaults = {
4
+ minHeadingLevel: 2,
5
+ maxHeadingLevel: 3
6
+ };
7
+ const TableOfContentsBaseSchema = z.union([z.object({
8
+ /** The level to start including headings at in the table of contents. Default: 2. */
9
+ minHeadingLevel: z.int().min(1).max(6).optional().default(2),
10
+ /** The level to stop including headings at in the table of contents. Default: 3. */
11
+ maxHeadingLevel: z.int().min(1).max(6).optional().default(3)
12
+ }), z.boolean().transform((enabled) => enabled ? defaults : false)]).refine((toc) => toc ? toc.minHeadingLevel <= toc.maxHeadingLevel : true, { error: "minHeadingLevel must be less than or equal to maxHeadingLevel" });
13
+ const UserConfigTableOfContentsSchema = () => TableOfContentsBaseSchema.default(defaults);
14
+ const FrontmatterTableOfContentsSchema = () => TableOfContentsBaseSchema.optional();
15
+ //#endregion
16
+ export { FrontmatterTableOfContentsSchema, UserConfigTableOfContentsSchema };