@treeseed/core 0.1.2

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 (384) hide show
  1. package/README.md +145 -0
  2. package/dist/agents/index.js +5 -0
  3. package/dist/agents/registry-helper.js +14 -0
  4. package/dist/agents/registry.js +88 -0
  5. package/dist/components/DevWatchReload.astro +45 -0
  6. package/dist/components/SiteTitle.astro +51 -0
  7. package/dist/components/content/ContentStatusLegend.astro +18 -0
  8. package/dist/components/content/StatusBadge.astro +11 -0
  9. package/dist/components/docs/BookFontControls.astro +180 -0
  10. package/dist/components/docs/DesktopSidebarToggle.astro +88 -0
  11. package/dist/components/docs/DownloadBook.astro +34 -0
  12. package/dist/components/docs/Footer.astro +196 -0
  13. package/dist/components/docs/Header.astro +150 -0
  14. package/dist/components/docs/PageFrame.astro +260 -0
  15. package/dist/components/docs/PageSidebar.astro +63 -0
  16. package/dist/components/docs/PageTitle.astro +39 -0
  17. package/dist/components/docs/Sidebar.astro +41 -0
  18. package/dist/components/docs/ThemeSelect.astro +3 -0
  19. package/dist/components/forms/ContactForm.astro +234 -0
  20. package/dist/components/forms/FooterSubscribeForm.astro +189 -0
  21. package/dist/components/site/BookList.astro +27 -0
  22. package/dist/components/site/CTASection.astro +24 -0
  23. package/dist/components/site/ChronicleList.astro +33 -0
  24. package/dist/components/site/Hero.astro +18 -0
  25. package/dist/components/site/NotesList.astro +18 -0
  26. package/dist/components/site/PathCard.astro +16 -0
  27. package/dist/components/site/ProfileList.astro +30 -0
  28. package/dist/components/site/SectionIntro.astro +9 -0
  29. package/dist/components/site/StageBanner.astro +8 -0
  30. package/dist/components/site/TrustCallout.astro +9 -0
  31. package/dist/components/starlight.js +6 -0
  32. package/dist/config.js +8 -0
  33. package/dist/content-config.js +9 -0
  34. package/dist/content.js +230 -0
  35. package/dist/contracts.d.ts +130 -0
  36. package/dist/contracts.js +0 -0
  37. package/dist/deploy/config.d.ts +4 -0
  38. package/dist/deploy/config.js +154 -0
  39. package/dist/deploy/runtime.js +77 -0
  40. package/dist/env.yaml +322 -0
  41. package/dist/environment.d.ts +130 -0
  42. package/dist/environment.js +324 -0
  43. package/dist/index.js +81 -0
  44. package/dist/layouts/AuthoredEntryLayout.astro +87 -0
  45. package/dist/layouts/BookLayout.astro +35 -0
  46. package/dist/layouts/BridgeLayout.astro +11 -0
  47. package/dist/layouts/ContentLayout.astro +24 -0
  48. package/dist/layouts/MainLayout.astro +203 -0
  49. package/dist/layouts/NoteLayout.astro +26 -0
  50. package/dist/layouts/ProfileLayout.astro +81 -0
  51. package/dist/middleware/starlightRouteData.js +45 -0
  52. package/dist/pages/404.astro +29 -0
  53. package/dist/pages/[slug].astro +30 -0
  54. package/dist/pages/agents/[slug].astro +29 -0
  55. package/dist/pages/agents/index.astro +27 -0
  56. package/dist/pages/api/form/submit.js +14 -0
  57. package/dist/pages/books/[slug].astro +19 -0
  58. package/dist/pages/books/index.astro +28 -0
  59. package/dist/pages/contact.astro +27 -0
  60. package/dist/pages/feed.xml.js +34 -0
  61. package/dist/pages/index.astro +290 -0
  62. package/dist/pages/notes/[slug].astro +19 -0
  63. package/dist/pages/notes/index.astro +21 -0
  64. package/dist/pages/objectives/[slug].astro +31 -0
  65. package/dist/pages/objectives/index.astro +30 -0
  66. package/dist/pages/people/[slug].astro +29 -0
  67. package/dist/pages/people/index.astro +28 -0
  68. package/dist/pages/questions/[slug].astro +31 -0
  69. package/dist/pages/questions/index.astro +30 -0
  70. package/dist/plugin-default.js +4 -0
  71. package/dist/plugins/builtin/default-plugin.d.ts +21 -0
  72. package/dist/plugins/builtin/default-plugin.js +32 -0
  73. package/dist/plugins/constants.d.ts +21 -0
  74. package/dist/plugins/constants.js +28 -0
  75. package/dist/plugins/plugin.d.ts +42 -0
  76. package/dist/plugins/plugin.js +6 -0
  77. package/dist/plugins/runtime.d.ts +31 -0
  78. package/dist/plugins/runtime.js +120 -0
  79. package/dist/scripts/aggregate-book.js +112 -0
  80. package/dist/scripts/assert-release-tag-version.js +21 -0
  81. package/dist/scripts/build-dist.js +384 -0
  82. package/dist/scripts/build-tenant-worker.js +36 -0
  83. package/dist/scripts/package-tools.js +88 -0
  84. package/dist/scripts/patch-starlight-content-path.js +172 -0
  85. package/dist/scripts/paths.js +11 -0
  86. package/dist/scripts/publish-package.js +20 -0
  87. package/dist/scripts/release-verify.js +52 -0
  88. package/dist/scripts/run-fixture-astro-command.js +21 -0
  89. package/dist/scripts/tenant-astro-command.js +3 -0
  90. package/dist/scripts/tenant-build.js +16 -0
  91. package/dist/scripts/tenant-check.js +7 -0
  92. package/dist/scripts/test-smoke.js +105 -0
  93. package/dist/server.js +53 -0
  94. package/dist/site-resources.d.ts +29 -0
  95. package/dist/site-resources.js +127 -0
  96. package/dist/site.js +313 -0
  97. package/dist/styles/global.css +683 -0
  98. package/dist/styles/prose.css +89 -0
  99. package/dist/styles/tokens.css +24 -0
  100. package/dist/tenant/bridge.js +5 -0
  101. package/dist/tenant/config.d.ts +9 -0
  102. package/dist/tenant/config.js +124 -0
  103. package/dist/tenant/runtime-config.js +20 -0
  104. package/dist/tsconfigs/strict.json +3 -0
  105. package/dist/types/agents.d.ts +1 -0
  106. package/dist/types/agents.js +1 -0
  107. package/dist/types/astro-build.d.js +0 -0
  108. package/dist/types/cloudflare-sockets.d.js +0 -0
  109. package/dist/types/cloudflare.d.ts +1 -0
  110. package/dist/types/cloudflare.js +1 -0
  111. package/dist/types/forms.js +4 -0
  112. package/dist/utils/agents/adapters/execution.js +90 -0
  113. package/dist/utils/agents/adapters/mutations.js +30 -0
  114. package/dist/utils/agents/adapters/notification.js +16 -0
  115. package/dist/utils/agents/adapters/repository.js +61 -0
  116. package/dist/utils/agents/adapters/research.js +25 -0
  117. package/dist/utils/agents/adapters/verification.js +62 -0
  118. package/dist/utils/agents/cli-tools.js +5 -0
  119. package/dist/utils/agents/contracts/messages.d.ts +88 -0
  120. package/dist/utils/agents/contracts/messages.js +138 -0
  121. package/dist/utils/agents/contracts/run.d.ts +20 -0
  122. package/dist/utils/agents/contracts/run.js +0 -0
  123. package/dist/utils/agents/runtime-types.d.ts +117 -0
  124. package/dist/utils/agents/runtime-types.js +4 -0
  125. package/dist/utils/books-data.js +82 -0
  126. package/dist/utils/content-status.js +38 -0
  127. package/dist/utils/forms/config.js +87 -0
  128. package/dist/utils/forms/constants.js +27 -0
  129. package/dist/utils/forms/contact-submissions-local.js +19 -0
  130. package/dist/utils/forms/contact-submissions.js +72 -0
  131. package/dist/utils/forms/crypto.js +64 -0
  132. package/dist/utils/forms/guard.js +76 -0
  133. package/dist/utils/forms/http.js +51 -0
  134. package/dist/utils/forms/provider-core.js +88 -0
  135. package/dist/utils/forms/routing-core.js +7 -0
  136. package/dist/utils/forms/routing.js +13 -0
  137. package/dist/utils/forms/runtime-core.js +17 -0
  138. package/dist/utils/forms/runtime.js +27 -0
  139. package/dist/utils/forms/service-core.js +256 -0
  140. package/dist/utils/forms/service.js +55 -0
  141. package/dist/utils/forms/session.js +57 -0
  142. package/dist/utils/forms/smtp-cloudflare.js +107 -0
  143. package/dist/utils/forms/smtp-node.js +27 -0
  144. package/dist/utils/forms/smtp.js +10 -0
  145. package/dist/utils/forms/subscribers-local.js +21 -0
  146. package/dist/utils/forms/subscribers.js +53 -0
  147. package/dist/utils/forms/turnstile.js +31 -0
  148. package/dist/utils/forms/validation.js +58 -0
  149. package/dist/utils/hub-content.js +28 -0
  150. package/dist/utils/plugin-runtime.js +158 -0
  151. package/dist/utils/routes.js +17 -0
  152. package/dist/utils/seo.js +4 -0
  153. package/dist/utils/site-config-schema.js +282 -0
  154. package/dist/utils/site-config.js +122 -0
  155. package/dist/utils/starlight-nav.js +62 -0
  156. package/dist/utils/theme.js +49 -0
  157. package/dist/vendor/starlight/components/AnchorHeading.astro +53 -0
  158. package/dist/vendor/starlight/components/Banner.astro +23 -0
  159. package/dist/vendor/starlight/components/ContentNotice.astro +33 -0
  160. package/dist/vendor/starlight/components/ContentPanel.astro +27 -0
  161. package/dist/vendor/starlight/components/DraftContentNotice.astro +5 -0
  162. package/dist/vendor/starlight/components/EditLink.astro +28 -0
  163. package/dist/vendor/starlight/components/FallbackContentNotice.astro +5 -0
  164. package/dist/vendor/starlight/components/Footer.astro +61 -0
  165. package/dist/vendor/starlight/components/Head.astro +5 -0
  166. package/dist/vendor/starlight/components/Header.astro +94 -0
  167. package/dist/vendor/starlight/components/Hero.astro +143 -0
  168. package/dist/vendor/starlight/components/Icons.js +121 -0
  169. package/dist/vendor/starlight/components/LanguageSelect.astro +57 -0
  170. package/dist/vendor/starlight/components/LastUpdated.astro +14 -0
  171. package/dist/vendor/starlight/components/MarkdownContent.astro +5 -0
  172. package/dist/vendor/starlight/components/MobileMenuFooter.astro +35 -0
  173. package/dist/vendor/starlight/components/MobileMenuToggle.astro +107 -0
  174. package/dist/vendor/starlight/components/MobileTableOfContents.astro +151 -0
  175. package/dist/vendor/starlight/components/Page.astro +126 -0
  176. package/dist/vendor/starlight/components/PageFrame.astro +97 -0
  177. package/dist/vendor/starlight/components/PageSidebar.astro +59 -0
  178. package/dist/vendor/starlight/components/PageTitle.astro +17 -0
  179. package/dist/vendor/starlight/components/Pagination.astro +79 -0
  180. package/dist/vendor/starlight/components/Search.astro +488 -0
  181. package/dist/vendor/starlight/components/Select.astro +99 -0
  182. package/dist/vendor/starlight/components/Sidebar.astro +15 -0
  183. package/dist/vendor/starlight/components/SidebarPersistState.js +43 -0
  184. package/dist/vendor/starlight/components/SidebarPersister.astro +78 -0
  185. package/dist/vendor/starlight/components/SidebarRestorePoint.astro +12 -0
  186. package/dist/vendor/starlight/components/SidebarSublist.astro +154 -0
  187. package/dist/vendor/starlight/components/SiteTitle.astro +59 -0
  188. package/dist/vendor/starlight/components/SkipLink.astro +26 -0
  189. package/dist/vendor/starlight/components/SocialIcons.astro +32 -0
  190. package/dist/vendor/starlight/components/StarlightPage.astro +17 -0
  191. package/dist/vendor/starlight/components/TableOfContents/TableOfContentsList.astro +79 -0
  192. package/dist/vendor/starlight/components/TableOfContents/starlight-toc.js +93 -0
  193. package/dist/vendor/starlight/components/TableOfContents.astro +18 -0
  194. package/dist/vendor/starlight/components/ThemeProvider.astro +38 -0
  195. package/dist/vendor/starlight/components/ThemeSelect.astro +73 -0
  196. package/dist/vendor/starlight/components/TwoColumnContent.astro +54 -0
  197. package/dist/vendor/starlight/components.js +26 -0
  198. package/dist/vendor/starlight/constants.js +4 -0
  199. package/dist/vendor/starlight/expressive-code.d.js +1 -0
  200. package/dist/vendor/starlight/global.d.js +0 -0
  201. package/dist/vendor/starlight/i18n.d.js +1 -0
  202. package/dist/vendor/starlight/index.js +119 -0
  203. package/dist/vendor/starlight/integrations/asides-error.js +12 -0
  204. package/dist/vendor/starlight/integrations/asides.js +179 -0
  205. package/dist/vendor/starlight/integrations/code-rtl-support.js +21 -0
  206. package/dist/vendor/starlight/integrations/expressive-code/hast.d.js +1 -0
  207. package/dist/vendor/starlight/integrations/expressive-code/index.js +63 -0
  208. package/dist/vendor/starlight/integrations/expressive-code/preprocessor.js +92 -0
  209. package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-dark.jsonc +1796 -0
  210. package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-dark.jsonc.js +1 -0
  211. package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-light.jsonc +1695 -0
  212. package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-light.jsonc.js +1 -0
  213. package/dist/vendor/starlight/integrations/expressive-code/theming.js +62 -0
  214. package/dist/vendor/starlight/integrations/expressive-code/translations.js +29 -0
  215. package/dist/vendor/starlight/integrations/heading-links.js +61 -0
  216. package/dist/vendor/starlight/integrations/pagefind.js +43 -0
  217. package/dist/vendor/starlight/integrations/remark-rehype.js +68 -0
  218. package/dist/vendor/starlight/integrations/shared/absolutePathToLang.js +15 -0
  219. package/dist/vendor/starlight/integrations/shared/localeToLang.js +9 -0
  220. package/dist/vendor/starlight/integrations/shared/slugToLocale.js +10 -0
  221. package/dist/vendor/starlight/integrations/sitemap.js +20 -0
  222. package/dist/vendor/starlight/integrations/virtual-user-config.js +110 -0
  223. package/dist/vendor/starlight/integrations/vite-layer-order.js +42 -0
  224. package/dist/vendor/starlight/internal.js +6 -0
  225. package/dist/vendor/starlight/loaders.js +36 -0
  226. package/dist/vendor/starlight/locals.d.js +0 -0
  227. package/dist/vendor/starlight/locals.js +30 -0
  228. package/dist/vendor/starlight/package.json +231 -0
  229. package/dist/vendor/starlight/package.json.js +248 -0
  230. package/dist/vendor/starlight/props.js +0 -0
  231. package/dist/vendor/starlight/route-data.js +6 -0
  232. package/dist/vendor/starlight/routes/common.astro +23 -0
  233. package/dist/vendor/starlight/routes/ssr/404.astro +7 -0
  234. package/dist/vendor/starlight/routes/ssr/index.astro +14 -0
  235. package/dist/vendor/starlight/routes/static/404.astro +7 -0
  236. package/dist/vendor/starlight/routes/static/index.astro +12 -0
  237. package/dist/vendor/starlight/schema.js +102 -0
  238. package/dist/vendor/starlight/schemas/badge.js +26 -0
  239. package/dist/vendor/starlight/schemas/components.js +235 -0
  240. package/dist/vendor/starlight/schemas/expressiveCode.js +12 -0
  241. package/dist/vendor/starlight/schemas/favicon.js +33 -0
  242. package/dist/vendor/starlight/schemas/head.js +32 -0
  243. package/dist/vendor/starlight/schemas/hero.js +57 -0
  244. package/dist/vendor/starlight/schemas/i18n.js +101 -0
  245. package/dist/vendor/starlight/schemas/icon.js +7 -0
  246. package/dist/vendor/starlight/schemas/logo.js +24 -0
  247. package/dist/vendor/starlight/schemas/pagefind.js +108 -0
  248. package/dist/vendor/starlight/schemas/prevNextLink.js +14 -0
  249. package/dist/vendor/starlight/schemas/sidebar.js +80 -0
  250. package/dist/vendor/starlight/schemas/site-title.js +19 -0
  251. package/dist/vendor/starlight/schemas/social.js +19 -0
  252. package/dist/vendor/starlight/schemas/tableOfContents.js +16 -0
  253. package/dist/vendor/starlight/style/anchor-links.css +131 -0
  254. package/dist/vendor/starlight/style/asides.css +51 -0
  255. package/dist/vendor/starlight/style/layers.css +1 -0
  256. package/dist/vendor/starlight/style/markdown.css +253 -0
  257. package/dist/vendor/starlight/style/print.css +175 -0
  258. package/dist/vendor/starlight/style/props.css +188 -0
  259. package/dist/vendor/starlight/style/reset.css +52 -0
  260. package/dist/vendor/starlight/style/util.css +63 -0
  261. package/dist/vendor/starlight/translations/ar.json +30 -0
  262. package/dist/vendor/starlight/translations/ar.json.js +32 -0
  263. package/dist/vendor/starlight/translations/ca.json +43 -0
  264. package/dist/vendor/starlight/translations/ca.json.js +45 -0
  265. package/dist/vendor/starlight/translations/cs.json +43 -0
  266. package/dist/vendor/starlight/translations/cs.json.js +45 -0
  267. package/dist/vendor/starlight/translations/da.json +30 -0
  268. package/dist/vendor/starlight/translations/da.json.js +32 -0
  269. package/dist/vendor/starlight/translations/de.json +30 -0
  270. package/dist/vendor/starlight/translations/de.json.js +32 -0
  271. package/dist/vendor/starlight/translations/el.json +30 -0
  272. package/dist/vendor/starlight/translations/el.json.js +32 -0
  273. package/dist/vendor/starlight/translations/en.json +30 -0
  274. package/dist/vendor/starlight/translations/en.json.js +32 -0
  275. package/dist/vendor/starlight/translations/es.json +43 -0
  276. package/dist/vendor/starlight/translations/es.json.js +45 -0
  277. package/dist/vendor/starlight/translations/fa.json +30 -0
  278. package/dist/vendor/starlight/translations/fa.json.js +32 -0
  279. package/dist/vendor/starlight/translations/fi.json +30 -0
  280. package/dist/vendor/starlight/translations/fi.json.js +32 -0
  281. package/dist/vendor/starlight/translations/fr.json +33 -0
  282. package/dist/vendor/starlight/translations/fr.json.js +35 -0
  283. package/dist/vendor/starlight/translations/gl.json +43 -0
  284. package/dist/vendor/starlight/translations/gl.json.js +45 -0
  285. package/dist/vendor/starlight/translations/he.json +30 -0
  286. package/dist/vendor/starlight/translations/he.json.js +32 -0
  287. package/dist/vendor/starlight/translations/hi.json +30 -0
  288. package/dist/vendor/starlight/translations/hi.json.js +32 -0
  289. package/dist/vendor/starlight/translations/hu.json +43 -0
  290. package/dist/vendor/starlight/translations/hu.json.js +45 -0
  291. package/dist/vendor/starlight/translations/id.json +30 -0
  292. package/dist/vendor/starlight/translations/id.json.js +32 -0
  293. package/dist/vendor/starlight/translations/index.js +77 -0
  294. package/dist/vendor/starlight/translations/it.json +30 -0
  295. package/dist/vendor/starlight/translations/it.json.js +32 -0
  296. package/dist/vendor/starlight/translations/ja.json +30 -0
  297. package/dist/vendor/starlight/translations/ja.json.js +32 -0
  298. package/dist/vendor/starlight/translations/ko.json +30 -0
  299. package/dist/vendor/starlight/translations/ko.json.js +32 -0
  300. package/dist/vendor/starlight/translations/lv.json +30 -0
  301. package/dist/vendor/starlight/translations/lv.json.js +32 -0
  302. package/dist/vendor/starlight/translations/nb.json +30 -0
  303. package/dist/vendor/starlight/translations/nb.json.js +32 -0
  304. package/dist/vendor/starlight/translations/nl.json +30 -0
  305. package/dist/vendor/starlight/translations/nl.json.js +32 -0
  306. package/dist/vendor/starlight/translations/pl.json +33 -0
  307. package/dist/vendor/starlight/translations/pl.json.js +35 -0
  308. package/dist/vendor/starlight/translations/pt.json +30 -0
  309. package/dist/vendor/starlight/translations/pt.json.js +32 -0
  310. package/dist/vendor/starlight/translations/ro.json +30 -0
  311. package/dist/vendor/starlight/translations/ro.json.js +32 -0
  312. package/dist/vendor/starlight/translations/ru.json +33 -0
  313. package/dist/vendor/starlight/translations/ru.json.js +35 -0
  314. package/dist/vendor/starlight/translations/sk.json +30 -0
  315. package/dist/vendor/starlight/translations/sk.json.js +32 -0
  316. package/dist/vendor/starlight/translations/sv.json +30 -0
  317. package/dist/vendor/starlight/translations/sv.json.js +32 -0
  318. package/dist/vendor/starlight/translations/th.json +30 -0
  319. package/dist/vendor/starlight/translations/th.json.js +32 -0
  320. package/dist/vendor/starlight/translations/tr.json +30 -0
  321. package/dist/vendor/starlight/translations/tr.json.js +32 -0
  322. package/dist/vendor/starlight/translations/uk.json +30 -0
  323. package/dist/vendor/starlight/translations/uk.json.js +32 -0
  324. package/dist/vendor/starlight/translations/vi.json +30 -0
  325. package/dist/vendor/starlight/translations/vi.json.js +32 -0
  326. package/dist/vendor/starlight/translations/zh-CN.json +30 -0
  327. package/dist/vendor/starlight/translations/zh-CN.json.js +32 -0
  328. package/dist/vendor/starlight/translations/zh-TW.json +30 -0
  329. package/dist/vendor/starlight/translations/zh-TW.json.js +32 -0
  330. package/dist/vendor/starlight/types.js +0 -0
  331. package/dist/vendor/starlight/user-components/Aside.astro +40 -0
  332. package/dist/vendor/starlight/user-components/Badge.astro +148 -0
  333. package/dist/vendor/starlight/user-components/Card.astro +68 -0
  334. package/dist/vendor/starlight/user-components/CardGrid.astro +38 -0
  335. package/dist/vendor/starlight/user-components/FileTree.astro +137 -0
  336. package/dist/vendor/starlight/user-components/Icon.astro +42 -0
  337. package/dist/vendor/starlight/user-components/LinkButton.astro +78 -0
  338. package/dist/vendor/starlight/user-components/LinkCard.astro +78 -0
  339. package/dist/vendor/starlight/user-components/Steps.astro +90 -0
  340. package/dist/vendor/starlight/user-components/TabItem.astro +19 -0
  341. package/dist/vendor/starlight/user-components/Tabs.astro +268 -0
  342. package/dist/vendor/starlight/user-components/file-tree-icons.js +608 -0
  343. package/dist/vendor/starlight/user-components/rehype-file-tree.js +160 -0
  344. package/dist/vendor/starlight/user-components/rehype-steps.js +53 -0
  345. package/dist/vendor/starlight/user-components/rehype-tabs.js +73 -0
  346. package/dist/vendor/starlight/utils/base.js +14 -0
  347. package/dist/vendor/starlight/utils/canonical.js +13 -0
  348. package/dist/vendor/starlight/utils/collection-fs.js +13 -0
  349. package/dist/vendor/starlight/utils/collection.js +16 -0
  350. package/dist/vendor/starlight/utils/createPathFormatter.js +39 -0
  351. package/dist/vendor/starlight/utils/createTranslationSystem.js +60 -0
  352. package/dist/vendor/starlight/utils/error-map.js +110 -0
  353. package/dist/vendor/starlight/utils/format-path.js +9 -0
  354. package/dist/vendor/starlight/utils/generateToC.js +18 -0
  355. package/dist/vendor/starlight/utils/git.js +92 -0
  356. package/dist/vendor/starlight/utils/gitInlined.js +13 -0
  357. package/dist/vendor/starlight/utils/head.js +156 -0
  358. package/dist/vendor/starlight/utils/i18n.js +121 -0
  359. package/dist/vendor/starlight/utils/localizedUrl.js +37 -0
  360. package/dist/vendor/starlight/utils/navigation.js +320 -0
  361. package/dist/vendor/starlight/utils/path.js +52 -0
  362. package/dist/vendor/starlight/utils/plugins.js +355 -0
  363. package/dist/vendor/starlight/utils/routing/data.js +116 -0
  364. package/dist/vendor/starlight/utils/routing/index.js +107 -0
  365. package/dist/vendor/starlight/utils/routing/middleware.js +40 -0
  366. package/dist/vendor/starlight/utils/routing/types.js +0 -0
  367. package/dist/vendor/starlight/utils/routing.js +1 -0
  368. package/dist/vendor/starlight/utils/slugs.js +70 -0
  369. package/dist/vendor/starlight/utils/starlight-page.js +123 -0
  370. package/dist/vendor/starlight/utils/translations-fs.js +31 -0
  371. package/dist/vendor/starlight/utils/translations.js +31 -0
  372. package/dist/vendor/starlight/utils/types.js +0 -0
  373. package/dist/vendor/starlight/utils/url.js +5 -0
  374. package/dist/vendor/starlight/utils/user-config.js +255 -0
  375. package/dist/vendor/starlight/utils/validateLogoImports.js +22 -0
  376. package/dist/vendor/starlight/virtual-internal.d.js +0 -0
  377. package/dist/vendor/starlight/virtual.d.js +0 -0
  378. package/dist/worker/forms-worker.js +141 -0
  379. package/package.json +156 -0
  380. package/style/anchor-links.css +131 -0
  381. package/templates/github/deploy.workflow.yml +47 -0
  382. package/tsconfigs/strict.json +3 -0
  383. package/utils/git.ts +121 -0
  384. package/utils/gitInlined.ts +20 -0
@@ -0,0 +1,102 @@
1
+ import { z } from "astro/zod";
2
+ import { HeadConfigSchema } from "./schemas/head.js";
3
+ import { PrevNextLinkConfigSchema } from "./schemas/prevNextLink.js";
4
+ import { TableOfContentsSchema } from "./schemas/tableOfContents.js";
5
+ import { BadgeConfigSchema } from "./schemas/badge.js";
6
+ import { HeroSchema } from "./schemas/hero.js";
7
+ import { SidebarLinkItemHTMLAttributesSchema } from "./schemas/sidebar.js";
8
+ import { i18nSchema } from "./schemas/i18n.js";
9
+ const StarlightFrontmatterSchema = (context) => z.object({
10
+ /** The title of the current page. Required. */
11
+ title: z.string(),
12
+ /**
13
+ * A short description of the current page’s content. Optional, but recommended.
14
+ * A good description is 150–160 characters long and outlines the key content
15
+ * of the page in a clear and engaging way.
16
+ */
17
+ description: z.string().optional(),
18
+ /**
19
+ * Custom URL where a reader can edit this page.
20
+ * Overrides the `editLink.baseUrl` global config if set.
21
+ *
22
+ * Can also be set to `false` to disable showing an edit link on this page.
23
+ */
24
+ editUrl: z.union([z.string().url(), z.boolean()]).optional().default(true),
25
+ /** Set custom `<head>` tags just for this page. */
26
+ head: HeadConfigSchema({ source: "content" }),
27
+ /** Override global table of contents configuration for this page. */
28
+ tableOfContents: TableOfContentsSchema().optional(),
29
+ /**
30
+ * Set the layout style for this page.
31
+ * Can be `'doc'` (the default) or `'splash'` for a wider layout without any sidebars.
32
+ */
33
+ template: z.enum(["doc", "splash"]).default("doc"),
34
+ /** Display a hero section on this page. */
35
+ hero: HeroSchema(context).optional(),
36
+ /**
37
+ * The last update date of the current page.
38
+ * Overrides the `lastUpdated` global config or the date generated from the Git history.
39
+ */
40
+ lastUpdated: z.union([z.date(), z.boolean()]).optional(),
41
+ /**
42
+ * The previous navigation link configuration.
43
+ * Overrides the `pagination` global config or the link text and/or URL.
44
+ */
45
+ prev: PrevNextLinkConfigSchema(),
46
+ /**
47
+ * The next navigation link configuration.
48
+ * Overrides the `pagination` global config or the link text and/or URL.
49
+ */
50
+ next: PrevNextLinkConfigSchema(),
51
+ sidebar: z.object({
52
+ /**
53
+ * The order of this page in the navigation.
54
+ * Pages are sorted by this value in ascending order. Then by slug.
55
+ * If not provided, pages will be sorted alphabetically by slug.
56
+ * If two pages have the same order value, they will be sorted alphabetically by slug.
57
+ */
58
+ order: z.number().optional(),
59
+ /**
60
+ * The label for this page in the navigation.
61
+ * Defaults to the page `title` if not set.
62
+ */
63
+ label: z.string().optional(),
64
+ /**
65
+ * Prevents this page from being included in autogenerated sidebar groups.
66
+ */
67
+ hidden: z.boolean().default(false),
68
+ /**
69
+ * Adds a badge to the sidebar link.
70
+ * Can be a string or an object with a variant and text.
71
+ * Variants include 'note', 'tip', 'caution', 'danger', 'success', and 'default'.
72
+ * Passing only a string defaults to the 'default' variant which uses the site accent color.
73
+ */
74
+ badge: BadgeConfigSchema(),
75
+ /** HTML attributes to add to the sidebar link. */
76
+ attrs: SidebarLinkItemHTMLAttributesSchema()
77
+ }).default({}),
78
+ /** Display an announcement banner at the top of this page. */
79
+ banner: z.object({
80
+ /** The content of the banner. Supports HTML syntax. */
81
+ content: z.string()
82
+ }).optional(),
83
+ /** Pagefind indexing for this page - set to false to disable. */
84
+ pagefind: z.boolean().default(true),
85
+ /**
86
+ * Indicates that this page is a draft and will not be included in production builds.
87
+ * Note that the page will still be available when running Astro in development mode.
88
+ */
89
+ draft: z.boolean().default(false)
90
+ });
91
+ function docsSchema(...args) {
92
+ const [options = {}] = args;
93
+ const { extend } = options;
94
+ return (context) => {
95
+ const UserSchema = typeof extend === "function" ? extend(context) : extend;
96
+ return UserSchema ? StarlightFrontmatterSchema(context).and(UserSchema) : StarlightFrontmatterSchema(context);
97
+ };
98
+ }
99
+ export {
100
+ docsSchema,
101
+ i18nSchema
102
+ };
@@ -0,0 +1,26 @@
1
+ import { z } from "astro/zod";
2
+ const badgeBaseSchema = z.object({
3
+ variant: z.enum(["note", "danger", "success", "caution", "tip", "default"]).default("default"),
4
+ class: z.string().optional()
5
+ });
6
+ const badgeSchema = badgeBaseSchema.extend({
7
+ text: z.string()
8
+ });
9
+ const i18nBadgeSchema = badgeBaseSchema.extend({
10
+ text: z.union([z.string(), z.record(z.string())])
11
+ });
12
+ const BadgeComponentSchema = badgeSchema.extend({
13
+ size: z.enum(["small", "medium", "large"]).default("small")
14
+ }).passthrough();
15
+ const BadgeConfigSchema = () => z.union([z.string(), badgeSchema]).transform((badge) => {
16
+ if (typeof badge === "string") {
17
+ return { variant: "default", text: badge };
18
+ }
19
+ return badge;
20
+ }).optional();
21
+ const I18nBadgeConfigSchema = () => z.union([z.string(), i18nBadgeSchema]).optional();
22
+ export {
23
+ BadgeComponentSchema,
24
+ BadgeConfigSchema,
25
+ I18nBadgeConfigSchema
26
+ };
@@ -0,0 +1,235 @@
1
+ import { z } from "astro/zod";
2
+ function ComponentConfigSchema() {
3
+ return z.object({
4
+ /*
5
+ HEAD ----------------------------------------------------------------------------------------
6
+ */
7
+ /**
8
+ * Component rendered inside each page’s `<head>`.
9
+ * Includes important tags including `<title>`, and `<meta charset="utf-8">`.
10
+ *
11
+ * Override this component as a last resort. Prefer the `head` option Starlight config if possible.
12
+ *
13
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Head.astro `Head` default implementation}
14
+ */
15
+ Head: z.string().default("@astrojs/starlight/components/Head.astro"),
16
+ /**
17
+ * Component rendered inside `<head>` that sets up dark/light theme support.
18
+ * The default implementation includes an inline script and a `<template>` used by the
19
+ * script in `ThemeSelect.astro`.
20
+ *
21
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/ThemeProvider.astro `ThemeProvider` default implementation}
22
+ */
23
+ ThemeProvider: z.string().default("@astrojs/starlight/components/ThemeProvider.astro"),
24
+ /*
25
+ BODY ----------------------------------------------------------------------------------------
26
+ */
27
+ /**
28
+ * Component rendered as the first element inside `<body>` which links to the main page
29
+ * content for accessibility. The default implementation is hidden until a user focuses it
30
+ * by tabbing with their keyboard.
31
+ *
32
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/SkipLink.astro `SkipLink` default implementation}
33
+ */
34
+ SkipLink: z.string().default("@astrojs/starlight/components/SkipLink.astro"),
35
+ /*
36
+ LAYOUT --------------------------------------------------------------------------------------
37
+ */
38
+ /**
39
+ * Layout component wrapped around most of the page content.
40
+ * The default implementation sets up the header–sidebar–main layout and includes
41
+ * `header` and `sidebar` named slots along with a default slot for the main content.
42
+ * It also renders `<MobileMenuToggle />` to support toggling the sidebar navigation
43
+ * on small (mobile) viewports.
44
+ *
45
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageFrame.astro `PageFrame` default implementation}
46
+ */
47
+ PageFrame: z.string().default("@astrojs/starlight/components/PageFrame.astro"),
48
+ /**
49
+ * Component rendered inside `<PageFrame>` that is responsible for toggling the
50
+ * sidebar navigation on small (mobile) viewports.
51
+ *
52
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/MobileMenuToggle.astro `MobileMenuToggle` default implementation}
53
+ */
54
+ MobileMenuToggle: z.string().default("@astrojs/starlight/components/MobileMenuToggle.astro"),
55
+ /**
56
+ * Layout component wrapped around the main content column and right sidebar (table of contents).
57
+ * The default implementation handles the switch between a single-column, small-viewport layout
58
+ * and a two-column, larger-viewport layout.
59
+ *
60
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/TwoColumnContent.astro `TwoColumnContent` default implementation}
61
+ */
62
+ TwoColumnContent: z.string().default("@astrojs/starlight/components/TwoColumnContent.astro"),
63
+ /*
64
+ HEADER --------------------------------------------------------------------------------------
65
+ */
66
+ /**
67
+ * Header component displayed at the top of every page.
68
+ * The default implementation displays `<SiteTitle />`, `<Search />`, `<SocialIcons />`,
69
+ * `<ThemeSelect />`, and `<LanguageSelect />`.
70
+ *
71
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Header.astro `Header` default implementation}
72
+ */
73
+ Header: z.string().default("@astrojs/starlight/components/Header.astro"),
74
+ /**
75
+ * Component rendered at the start of the site header to render the site title.
76
+ * The default implementation includes logic for rendering logos defined in Starlight config.
77
+ *
78
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/SiteTitle.astro `SiteTitle` default implementation}
79
+ */
80
+ SiteTitle: z.string().default("@astrojs/starlight/components/SiteTitle.astro"),
81
+ /**
82
+ * Component used to render Starlight’s search UI. The default implementation includes the
83
+ * button in the header and the code for displaying a search modal when it is clicked.
84
+ *
85
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Search.astro `Search` default implementation}
86
+ */
87
+ Search: z.string().default("@astrojs/starlight/components/Search.astro"),
88
+ /**
89
+ * Component rendered in the site header including social icon links. The default
90
+ * implementation uses the `social` option in Starlight config to render icons and links.
91
+ *
92
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/SocialIcons.astro `SocialIcons` default implementation}
93
+ */
94
+ SocialIcons: z.string().default("@astrojs/starlight/components/SocialIcons.astro"),
95
+ /**
96
+ * Component rendered in the site header that allows users to select their preferred color scheme.
97
+ *
98
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/ThemeSelect.astro `ThemeSelect` default implementation}
99
+ */
100
+ ThemeSelect: z.string().default("@astrojs/starlight/components/ThemeSelect.astro"),
101
+ /**
102
+ * Component rendered in the site header that allows users to switch to a different language.
103
+ *
104
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/LanguageSelect.astro `LanguageSelect` default implementation}
105
+ */
106
+ LanguageSelect: z.string().default("@astrojs/starlight/components/LanguageSelect.astro"),
107
+ /*
108
+ SIDEBAR -------------------------------------------------------------------------------------
109
+ */
110
+ /**
111
+ * Component rendered before page content that contains global navigation.
112
+ * The default implementation displays as a sidebar on wide enough viewports and inside a
113
+ * drop-down menu on small (mobile) viewports. It also renders `<MobileMenuFooter />` to
114
+ * show additional items inside the mobile menu.
115
+ *
116
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Sidebar.astro `Sidebar` default implementation}
117
+ */
118
+ Sidebar: z.string().default("@astrojs/starlight/components/Sidebar.astro"),
119
+ /**
120
+ * Component rendered at the bottom of the mobile drop-down menu.
121
+ * The default implementation renders `<ThemeSelect />` and `<LanguageSelect />`.
122
+ *
123
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/MobileMenuFooter.astro `MobileMenuFooter` default implementation}
124
+ */
125
+ MobileMenuFooter: z.string().default("@astrojs/starlight/components/MobileMenuFooter.astro"),
126
+ /*
127
+ TOC -----------------------------------------------------------------------------------------
128
+ */
129
+ /**
130
+ * Component rendered before the main page’s content to display a table of contents.
131
+ * The default implementation renders `<TableOfContents />` and `<MobileTableOfContents />`.
132
+ *
133
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageSidebar.astro `PageSidebar` default implementation}
134
+ */
135
+ PageSidebar: z.string().default("@astrojs/starlight/components/PageSidebar.astro"),
136
+ /**
137
+ * Component that renders the current page’s table of contents on wider viewports.
138
+ *
139
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/TableOfContents.astro `TableOfContents` default implementation}
140
+ */
141
+ TableOfContents: z.string().default("@astrojs/starlight/components/TableOfContents.astro"),
142
+ /**
143
+ * Component that renders the current page’s table of contents on small (mobile) viewports.
144
+ *
145
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/MobileTableOfContents.astro `MobileTableOfContents` default implementation}
146
+ */
147
+ MobileTableOfContents: z.string().default("@astrojs/starlight/components/MobileTableOfContents.astro"),
148
+ /*
149
+ CONTENT HEADER ------------------------------------------------------------------------------
150
+ */
151
+ /**
152
+ * Banner component rendered at the top of each page. The default implementation uses the
153
+ * page’s `banner` frontmatter value to decide whether or not to render.
154
+ *
155
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Banner.astro `Banner` default implementation}
156
+ */
157
+ Banner: z.string().default("@astrojs/starlight/components/Banner.astro"),
158
+ /**
159
+ * Layout component used to wrap sections of the main content column.
160
+ *
161
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/ContentPanel.astro `ContentPanel` default implementation}
162
+ */
163
+ ContentPanel: z.string().default("@astrojs/starlight/components/ContentPanel.astro"),
164
+ /**
165
+ * Component containing the `<h1>` element for the current page.
166
+ *
167
+ * Implementations should ensure they set `id="_top"` on the `<h1>` element as in the default
168
+ * implementation.
169
+ *
170
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/PageTitle.astro `PageTitle` default implementation}
171
+ */
172
+ PageTitle: z.string().default("@astrojs/starlight/components/PageTitle.astro"),
173
+ /**
174
+ * Notice displayed to users on pages where a translation for the current language is not
175
+ * available. Only used on multilingual sites.
176
+ *
177
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/FallbackContentNotice.astro `FallbackContentNotice` default implementation}
178
+ */
179
+ FallbackContentNotice: z.string().default("@astrojs/starlight/components/FallbackContentNotice.astro"),
180
+ /**
181
+ * Notice displayed to users on draft pages. Only used in development mode.
182
+ *
183
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/DraftContentNotice.astro `DraftContentNotice` default implementation}
184
+ */
185
+ DraftContentNotice: z.string().default("@astrojs/starlight/components/DraftContentNotice.astro"),
186
+ /**
187
+ * Component rendered at the top of the page when `hero` is set in frontmatter. The default
188
+ * implementation shows a large title, tagline, and call-to-action links alongside an optional image.
189
+ *
190
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Hero.astro `Hero` default implementation}
191
+ */
192
+ Hero: z.string().default("@astrojs/starlight/components/Hero.astro"),
193
+ /*
194
+ CONTENT -------------------------------------------------------------------------------------
195
+ */
196
+ /**
197
+ * Component rendered around each page’s main content.
198
+ * The default implementation sets up basic styles to apply to Markdown content.
199
+ *
200
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/MarkdownContent.astro `MarkdownContent` default implementation}
201
+ */
202
+ MarkdownContent: z.string().default("@astrojs/starlight/components/MarkdownContent.astro"),
203
+ /*
204
+ CONTENT FOOTER ------------------------------------------------------------------------------
205
+ */
206
+ /**
207
+ * Footer component displayed at the bottom of each documentation page.
208
+ * The default implementation displays `<LastUpdated />`, `<Pagination />`, and `<EditLink />`.
209
+ *
210
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Footer.astro `Footer` default implementation}
211
+ */
212
+ Footer: z.string().default("@astrojs/starlight/components/Footer.astro"),
213
+ /**
214
+ * Component rendered in the page footer to display the last-updated date.
215
+ *
216
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/LastUpdated.astro `LastUpdated` default implementation}
217
+ */
218
+ LastUpdated: z.string().default("@astrojs/starlight/components/LastUpdated.astro"),
219
+ /**
220
+ * Component rendered in the page footer to display navigation arrows between previous/next pages.
221
+ *
222
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/Pagination.astro `Pagination` default implementation}
223
+ */
224
+ Pagination: z.string().default("@astrojs/starlight/components/Pagination.astro"),
225
+ /**
226
+ * Component rendered in the page footer to display a link to where the page can be edited.
227
+ *
228
+ * @see {@link https://github.com/withastro/starlight/blob/main/packages/starlight/components/EditLink.astro `EditLink` default implementation}
229
+ */
230
+ EditLink: z.string().default("@astrojs/starlight/components/EditLink.astro")
231
+ }).default({});
232
+ }
233
+ export {
234
+ ComponentConfigSchema
235
+ };
@@ -0,0 +1,12 @@
1
+ import { z } from "astro/zod";
2
+ const ExpressiveCodeSchema = () => z.union([
3
+ z.custom(
4
+ (value) => typeof value === "object" && value
5
+ ),
6
+ z.boolean()
7
+ ]).describe(
8
+ "Define how code blocks are rendered by passing options to Expressive Code, or disable the integration by passing `false`."
9
+ ).optional();
10
+ export {
11
+ ExpressiveCodeSchema
12
+ };
@@ -0,0 +1,33 @@
1
+ import { extname } from "node:path";
2
+ import { z } from "astro/zod";
3
+ const faviconTypeMap = {
4
+ ".ico": "image/x-icon",
5
+ ".gif": "image/gif",
6
+ ".jpeg": "image/jpeg",
7
+ ".jpg": "image/jpeg",
8
+ ".png": "image/png",
9
+ ".svg": "image/svg+xml"
10
+ };
11
+ const FaviconSchema = () => z.string().default("/favicon.svg").transform((favicon, ctx) => {
12
+ const { pathname } = new URL(favicon, "https://example.com");
13
+ const ext = extname(pathname).toLowerCase();
14
+ if (!isFaviconExt(ext)) {
15
+ ctx.addIssue({
16
+ code: z.ZodIssueCode.custom,
17
+ message: "favicon must be a .ico, .gif, .jpg, .png, or .svg file"
18
+ });
19
+ return z.NEVER;
20
+ }
21
+ return {
22
+ href: favicon,
23
+ type: faviconTypeMap[ext]
24
+ };
25
+ }).describe(
26
+ "The default favicon for your site which should be a path to an image in the `public/` directory."
27
+ );
28
+ function isFaviconExt(ext) {
29
+ return ext in faviconTypeMap;
30
+ }
31
+ export {
32
+ FaviconSchema
33
+ };
@@ -0,0 +1,32 @@
1
+ import { z } from "astro/zod";
2
+ import yaml from "js-yaml";
3
+ const HeadConfigSchema = ({
4
+ source
5
+ }) => z.array(
6
+ z.object({
7
+ /** Name of the HTML tag to add to `<head>`, e.g. `'meta'`, `'link'`, or `'script'`. */
8
+ tag: z.enum(["title", "base", "link", "style", "meta", "script", "noscript", "template"]),
9
+ /** Attributes to set on the tag, e.g. `{ rel: 'stylesheet', href: '/custom.css' }`. */
10
+ attrs: z.record(z.union([z.string(), z.boolean(), z.undefined()])).optional(),
11
+ /** Content to place inside the tag (optional). */
12
+ content: z.string().optional()
13
+ }).superRefine((config, ctx) => {
14
+ if (config.tag !== "meta" || config.content === void 0) return;
15
+ const { content, ...rest } = config;
16
+ const correctTag = {
17
+ ...rest,
18
+ attrs: { ...config.attrs ?? { name: "identifier" }, content: config.content }
19
+ };
20
+ const code = source === "config" ? JSON.stringify(correctTag, null, 2) : yaml.dump([correctTag]);
21
+ ctx.addIssue({
22
+ code: "custom",
23
+ message: `The \`head\` configuration includes a \`meta\` tag with \`content\` which is invalid HTML.
24
+ You should instead use a \`content\` attribute ` + (Object.keys(rest.attrs ?? {}).length === 0 ? "with an additional attribute such as `name`, `property`, or `http-equiv` to identify the kind of metadata it represents " : "") + `in the \`attrs\` object:
25
+
26
+ ` + code
27
+ });
28
+ })
29
+ ).default([]);
30
+ export {
31
+ HeadConfigSchema
32
+ };
@@ -0,0 +1,57 @@
1
+ import { z } from "astro/zod";
2
+ import { IconSchema } from "./icon.js";
3
+ const HeroSchema = ({ image }) => z.object({
4
+ /**
5
+ * The large title text to show. If not provided, will default to the top-level `title`.
6
+ * Can include HTML.
7
+ */
8
+ title: z.string().optional(),
9
+ /**
10
+ * A short bit of text about your project.
11
+ * Will be displayed in a smaller size below the title.
12
+ */
13
+ tagline: z.string().optional(),
14
+ /** The image to use in the hero. You can provide either a relative `file` path or raw `html`. */
15
+ image: z.union([
16
+ z.object({
17
+ /** Alt text for screenreaders and other assistive technologies describing your hero image. */
18
+ alt: z.string().default(""),
19
+ /** Relative path to an image file in your repo, e.g. `../../assets/hero.png`. */
20
+ file: image()
21
+ }),
22
+ z.object({
23
+ /** Alt text for screenreaders and other assistive technologies describing your hero image. */
24
+ alt: z.string().default(""),
25
+ /** Relative path to an image file in your repo to use in dark mode, e.g. `../../assets/hero-dark.png`. */
26
+ dark: image(),
27
+ /** Relative path to an image file in your repo to use in light mode, e.g. `../../assets/hero-light.png`. */
28
+ light: image()
29
+ }),
30
+ z.object({
31
+ /** Raw HTML string instead of an image file. Useful for inline SVGs or more complex hero content. */
32
+ html: z.string()
33
+ }).transform(({ html }) => ({ html, alt: "" }))
34
+ ]).optional(),
35
+ /** An array of call-to-action links displayed at the bottom of the hero. */
36
+ actions: z.object({
37
+ /** Text label displayed in the link. */
38
+ text: z.string(),
39
+ /** Value for the link’s `href` attribute, e.g. `/page` or `https://mysite.com`. */
40
+ link: z.string(),
41
+ /** Button style to use. One of `primary` (the default), `secondary`, or `minimal`. */
42
+ variant: z.enum(["primary", "secondary", "minimal"]).default("primary"),
43
+ /**
44
+ * An optional icon to display alongside the link text.
45
+ * Can be an inline `<svg>` or the name of one of Starlight’s built-in icons.
46
+ */
47
+ icon: z.union([IconSchema(), z.string().startsWith("<svg")]).transform((icon) => {
48
+ const parsedIcon = IconSchema().safeParse(icon);
49
+ return parsedIcon.success ? { type: "icon", name: parsedIcon.data } : { type: "raw", html: icon };
50
+ }).optional(),
51
+ /** HTML attributes to add to the link */
52
+ attrs: z.record(z.union([z.string(), z.number(), z.boolean()])).optional()
53
+ }).array().default([])
54
+ });
55
+ export {
56
+ HeroSchema
57
+ };
@@ -0,0 +1,101 @@
1
+ import { z } from "astro/zod";
2
+ const defaultI18nSchema = () => starlightI18nSchema().merge(pagefindI18nSchema()).merge(expressiveCodeI18nSchema());
3
+ function i18nSchema({
4
+ extend = z.object({})
5
+ } = {}) {
6
+ return defaultI18nSchema().merge(extend).passthrough();
7
+ }
8
+ function builtinI18nSchema() {
9
+ return starlightI18nSchema().required().strict().merge(pagefindI18nSchema()).merge(expressiveCodeI18nSchema());
10
+ }
11
+ function starlightI18nSchema() {
12
+ return z.object({
13
+ "skipLink.label": z.string().describe(
14
+ "Text displayed in the accessible \u201CSkip link\u201D when a keyboard user first tabs into a page."
15
+ ),
16
+ "search.label": z.string().describe("Text displayed in the search bar."),
17
+ "search.ctrlKey": z.string().describe(
18
+ "Visible representation of the Control key potentially used in the shortcut key to open the search modal."
19
+ ),
20
+ "search.cancelLabel": z.string().describe("Text for the \u201CCancel\u201D button that closes the search modal."),
21
+ "search.devWarning": z.string().describe("Warning displayed when opening the Search in a dev environment."),
22
+ "themeSelect.accessibleLabel": z.string().describe("Accessible label for the theme selection dropdown."),
23
+ "themeSelect.dark": z.string().describe("Name of the dark color theme."),
24
+ "themeSelect.light": z.string().describe("Name of the light color theme."),
25
+ "themeSelect.auto": z.string().describe("Name of the automatic color theme that syncs with system preferences."),
26
+ "languageSelect.accessibleLabel": z.string().describe("Accessible label for the language selection dropdown."),
27
+ "menuButton.accessibleLabel": z.string().describe("Accessible label for the mobile menu button."),
28
+ "sidebarNav.accessibleLabel": z.string().describe(
29
+ "Accessible label for the main sidebar `<nav>` element to distinguish it from other `<nav>` landmarks on the page."
30
+ ),
31
+ "tableOfContents.onThisPage": z.string().describe("Title for the table of contents component."),
32
+ "tableOfContents.overview": z.string().describe(
33
+ "Label used for the first link in the table of contents, linking to the page title."
34
+ ),
35
+ "i18n.untranslatedContent": z.string().describe(
36
+ "Notice informing users they are on a page that is not yet translated to their language."
37
+ ),
38
+ "page.editLink": z.string().describe("Text for the link to edit a page."),
39
+ "page.lastUpdated": z.string().describe("Text displayed in front of the last updated date in the page footer."),
40
+ "page.previousLink": z.string().describe("Label shown on the \u201Cprevious page\u201D pagination arrow in the page footer."),
41
+ "page.nextLink": z.string().describe("Label shown on the \u201Cnext page\u201D pagination arrow in the page footer."),
42
+ "page.draft": z.string().describe(
43
+ "Development-only notice informing users they are on a page that is a draft which will not be included in production builds."
44
+ ),
45
+ "404.text": z.string().describe("Text shown on Starlight\u2019s default 404 page"),
46
+ "aside.tip": z.string().describe("Text shown on the tip aside variant"),
47
+ "aside.note": z.string().describe("Text shown on the note aside variant"),
48
+ "aside.caution": z.string().describe("Text shown on the warning aside variant"),
49
+ "aside.danger": z.string().describe("Text shown on the danger aside variant"),
50
+ "fileTree.directory": z.string().describe("Label for the directory icon in the file tree component."),
51
+ "builtWithStarlight.label": z.string().describe(
52
+ "Label for the \u201CBuilt with Starlight\u201D badge optionally displayed in the site footer."
53
+ ),
54
+ "heading.anchorLabel": z.string().describe("Label for anchor links in Markdown content.")
55
+ }).partial();
56
+ }
57
+ function pagefindI18nSchema() {
58
+ return z.object({
59
+ "pagefind.clear_search": z.string().describe(
60
+ 'Pagefind UI translation. English default value: `"Clear"`. See https://pagefind.app/docs/ui/#translations'
61
+ ),
62
+ "pagefind.load_more": z.string().describe(
63
+ 'Pagefind UI translation. English default value: `"Load more results"`. See https://pagefind.app/docs/ui/#translations'
64
+ ),
65
+ "pagefind.search_label": z.string().describe(
66
+ 'Pagefind UI translation. English default value: `"Search this site"`. See https://pagefind.app/docs/ui/#translations'
67
+ ),
68
+ "pagefind.filters_label": z.string().describe(
69
+ 'Pagefind UI translation. English default value: `"Filters"`. See https://pagefind.app/docs/ui/#translations'
70
+ ),
71
+ "pagefind.zero_results": z.string().describe(
72
+ 'Pagefind UI translation. English default value: `"No results for [SEARCH_TERM]"`. See https://pagefind.app/docs/ui/#translations'
73
+ ),
74
+ "pagefind.many_results": z.string().describe(
75
+ 'Pagefind UI translation. English default value: `"[COUNT] results for [SEARCH_TERM]"`. See https://pagefind.app/docs/ui/#translations'
76
+ ),
77
+ "pagefind.one_result": z.string().describe(
78
+ 'Pagefind UI translation. English default value: `"[COUNT] result for [SEARCH_TERM]"`. See https://pagefind.app/docs/ui/#translations'
79
+ ),
80
+ "pagefind.alt_search": z.string().describe(
81
+ 'Pagefind UI translation. English default value: `"No results for [SEARCH_TERM]. Showing results for [DIFFERENT_TERM] instead"`. See https://pagefind.app/docs/ui/#translations'
82
+ ),
83
+ "pagefind.search_suggestion": z.string().describe(
84
+ 'Pagefind UI translation. English default value: `"No results for [SEARCH_TERM]. Try one of the following searches:"`. See https://pagefind.app/docs/ui/#translations'
85
+ ),
86
+ "pagefind.searching": z.string().describe(
87
+ 'Pagefind UI translation. English default value: `"Searching for [SEARCH_TERM]..."`. See https://pagefind.app/docs/ui/#translations'
88
+ )
89
+ }).partial();
90
+ }
91
+ function expressiveCodeI18nSchema() {
92
+ return z.object({
93
+ "expressiveCode.copyButtonCopied": z.string().describe('Expressive Code UI translation. English default value: `"Copied!"`'),
94
+ "expressiveCode.copyButtonTooltip": z.string().describe('Expressive Code UI translation. English default value: `"Copy to clipboard"`'),
95
+ "expressiveCode.terminalWindowFallbackTitle": z.string().describe('Expressive Code UI translation. English default value: `"Terminal window"`')
96
+ }).partial();
97
+ }
98
+ export {
99
+ builtinI18nSchema,
100
+ i18nSchema
101
+ };
@@ -0,0 +1,7 @@
1
+ import { z } from "astro/zod";
2
+ import { Icons } from "../components/Icons.js";
3
+ const iconNames = Object.keys(Icons);
4
+ const IconSchema = () => z.enum(iconNames);
5
+ export {
6
+ IconSchema
7
+ };
@@ -0,0 +1,24 @@
1
+ import { z } from "astro/zod";
2
+ const LogoConfigSchema = () => z.union([
3
+ z.object({
4
+ /** Source of the image file to use. */
5
+ src: z.string(),
6
+ /** Alternative text description of the logo. */
7
+ alt: z.string().default(""),
8
+ /** Set to `true` to hide the site title text and only show the logo. */
9
+ replacesTitle: z.boolean().default(false)
10
+ }),
11
+ z.object({
12
+ /** Source of the image file to use in dark mode. */
13
+ dark: z.string(),
14
+ /** Source of the image file to use in light mode. */
15
+ light: z.string(),
16
+ /** Alternative text description of the logo. */
17
+ alt: z.string().default(""),
18
+ /** Set to `true` to hide the site title text and only show the logo. */
19
+ replacesTitle: z.boolean().default(false)
20
+ })
21
+ ]).optional();
22
+ export {
23
+ LogoConfigSchema
24
+ };