@astrojs/starlight 0.41.10 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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/{style → dist/style}/anchor-links.css +13 -1
  110. package/dist/translations/ar.js +36 -0
  111. package/dist/translations/ca.js +46 -0
  112. package/dist/translations/cs.js +46 -0
  113. package/dist/translations/da.js +33 -0
  114. package/dist/translations/de.js +33 -0
  115. package/dist/translations/el.js +33 -0
  116. package/dist/translations/en.js +33 -0
  117. package/dist/translations/es.js +46 -0
  118. package/dist/translations/fa.js +33 -0
  119. package/dist/translations/fi.js +33 -0
  120. package/dist/translations/fr.js +36 -0
  121. package/dist/translations/gl.js +46 -0
  122. package/dist/translations/he.js +33 -0
  123. package/dist/translations/hi.js +36 -0
  124. package/dist/translations/hu.js +46 -0
  125. package/dist/translations/id.js +33 -0
  126. package/dist/translations/index.d.ts +48 -0
  127. package/dist/translations/index.js +75 -0
  128. package/dist/translations/it.js +36 -0
  129. package/dist/translations/ja.js +36 -0
  130. package/dist/translations/ko.js +36 -0
  131. package/dist/translations/lv.js +33 -0
  132. package/dist/translations/nb.js +33 -0
  133. package/dist/translations/nl.js +33 -0
  134. package/dist/translations/pl.js +36 -0
  135. package/dist/translations/pt.js +36 -0
  136. package/dist/translations/ro.js +33 -0
  137. package/dist/translations/ru.js +36 -0
  138. package/dist/translations/sk.js +33 -0
  139. package/dist/translations/sv.js +33 -0
  140. package/dist/translations/th.js +33 -0
  141. package/dist/translations/tr.js +33 -0
  142. package/dist/translations/uk.js +33 -0
  143. package/dist/translations/vi.js +33 -0
  144. package/dist/translations/zh-CN.js +36 -0
  145. package/dist/translations/zh-TW.js +36 -0
  146. package/dist/types.d.ts +4 -0
  147. package/dist/types.js +1 -0
  148. package/{user-components → dist/user-components}/FileTree.astro +1 -1
  149. package/{user-components → dist/user-components}/Steps.astro +1 -1
  150. package/{user-components → dist/user-components}/TabItem.astro +1 -1
  151. package/{user-components → dist/user-components}/Tabs.astro +1 -1
  152. package/dist/user-components/file-tree-icons.d.ts +178 -0
  153. package/dist/user-components/file-tree-icons.js +632 -0
  154. package/dist/user-components/file-tree-processor.d.ts +16 -0
  155. package/dist/user-components/file-tree-processor.js +132 -0
  156. package/dist/user-components/steps-processor.d.ts +10 -0
  157. package/dist/user-components/steps-processor.js +39 -0
  158. package/dist/user-components/tabs-processor.d.ts +23 -0
  159. package/dist/user-components/tabs-processor.js +70 -0
  160. package/dist/utils/base.d.ts +7 -0
  161. package/dist/utils/base.js +15 -0
  162. package/dist/utils/canonical.d.ts +10 -0
  163. package/dist/utils/canonical.js +14 -0
  164. package/dist/utils/collection-fs.d.ts +13 -0
  165. package/dist/utils/collection-fs.js +19 -0
  166. package/{utils/collection.ts → dist/utils/collection.d.ts} +9 -20
  167. package/dist/utils/collection.js +26 -0
  168. package/dist/utils/createPathFormatter.d.ts +9 -0
  169. package/dist/utils/createPathFormatter.js +35 -0
  170. package/dist/utils/createTranslationSystem.d.ts +23 -0
  171. package/dist/utils/createTranslationSystem.js +84 -0
  172. package/dist/utils/error-map.d.ts +23 -0
  173. package/dist/utils/error-map.js +125 -0
  174. package/dist/utils/format-path.d.ts +4 -0
  175. package/dist/utils/format-path.js +9 -0
  176. package/dist/utils/generateToC.d.ts +14 -0
  177. package/dist/utils/generateToC.js +25 -0
  178. package/dist/utils/git.d.ts +12 -0
  179. package/dist/utils/git.js +71 -0
  180. package/dist/utils/gitInlined.d.ts +6 -0
  181. package/dist/utils/gitInlined.js +11 -0
  182. package/dist/utils/head.d.ts +7 -0
  183. package/dist/utils/head.js +233 -0
  184. package/dist/utils/i18n.d.ts +50 -0
  185. package/dist/utils/i18n.js +141 -0
  186. package/dist/utils/localizedUrl.d.ts +8 -0
  187. package/dist/utils/localizedUrl.js +28 -0
  188. package/dist/utils/navigation.d.ts +19 -0
  189. package/dist/utils/navigation.js +353 -0
  190. package/dist/utils/path.d.ts +21 -0
  191. package/dist/utils/path.js +51 -0
  192. package/dist/utils/plugins.d.ts +721 -0
  193. package/dist/utils/plugins.js +174 -0
  194. package/dist/utils/routing/data.d.ts +20 -0
  195. package/dist/utils/routing/data.js +127 -0
  196. package/dist/utils/routing/index.d.ts +21 -0
  197. package/dist/utils/routing/index.js +106 -0
  198. package/dist/utils/routing/middleware.d.ts +11 -0
  199. package/dist/utils/routing/middleware.js +65 -0
  200. package/dist/utils/routing/types.d.ts +93 -0
  201. package/dist/utils/routing/types.js +1 -0
  202. package/dist/utils/slugs.d.ts +45 -0
  203. package/dist/utils/slugs.js +104 -0
  204. package/dist/utils/starlight-page.d.ts +36 -0
  205. package/dist/utils/starlight-page.js +120 -0
  206. package/dist/utils/translations-fs.d.ts +15 -0
  207. package/dist/utils/translations-fs.js +39 -0
  208. package/dist/utils/translations.d.ts +20 -0
  209. package/dist/utils/translations.js +29 -0
  210. package/dist/utils/types.d.ts +5 -0
  211. package/dist/utils/types.js +1 -0
  212. package/dist/utils/url.d.ts +7 -0
  213. package/{utils/url.ts → dist/utils/url.js} +5 -4
  214. package/dist/utils/user-config.d.ts +2055 -0
  215. package/dist/utils/user-config.js +136 -0
  216. package/dist/utils/validateLogoImports.d.ts +5 -0
  217. package/dist/utils/validateLogoImports.js +16 -0
  218. package/dist/utils/zodDeepMerge.d.ts +16 -0
  219. package/dist/utils/zodDeepMerge.js +53 -0
  220. package/package.json +62 -33
  221. package/CHANGELOG.md +0 -3043
  222. package/components/MobileMenuToggle.astro +0 -114
  223. package/components-internals/Icons.ts +0 -248
  224. package/components-internals/SidebarPersistState.ts +0 -71
  225. package/components-internals/TableOfContents/starlight-toc.ts +0 -127
  226. package/constants.ts +0 -4
  227. package/expressive-code.mjs +0 -23
  228. package/global.d.ts +0 -11
  229. package/i18n.d.ts +0 -18
  230. package/index.ts +0 -200
  231. package/integrations/aside-utils.ts +0 -41
  232. package/integrations/expressive-code/hast.d.ts +0 -5
  233. package/integrations/expressive-code/hast.mjs +0 -9
  234. package/integrations/expressive-code/index.ts +0 -125
  235. package/integrations/expressive-code/preprocessor.ts +0 -126
  236. package/integrations/expressive-code/themes/night-owl-dark.jsonc +0 -1796
  237. package/integrations/expressive-code/themes/night-owl-light.jsonc +0 -1695
  238. package/integrations/expressive-code/theming.ts +0 -105
  239. package/integrations/expressive-code/translations.ts +0 -36
  240. package/integrations/markdown-icon.ts +0 -13
  241. package/integrations/markdown-plugins.ts +0 -71
  242. package/integrations/markdown-processor.ts +0 -64
  243. package/integrations/pagefind.ts +0 -60
  244. package/integrations/rehype-code-rtl-support.ts +0 -37
  245. package/integrations/rehype-heading-links.ts +0 -79
  246. package/integrations/remark-asides.ts +0 -219
  247. package/integrations/remark-rehype.ts +0 -87
  248. package/integrations/satteri.ts +0 -265
  249. package/integrations/shared/absolutePathToLang.ts +0 -26
  250. package/integrations/shared/localeToLang.ts +0 -15
  251. package/integrations/shared/slugToLocale.ts +0 -18
  252. package/integrations/sitemap.ts +0 -23
  253. package/integrations/vite-layer-order.ts +0 -69
  254. package/integrations/vite-lazy-barrel-optimization.ts +0 -40
  255. package/integrations/vite-virtual-modules.ts +0 -175
  256. package/internal.ts +0 -6
  257. package/loaders.ts +0 -63
  258. package/locals.d.ts +0 -43
  259. package/locals.ts +0 -43
  260. package/route-data.ts +0 -11
  261. package/schema.ts +0 -167
  262. package/schemas/badge.ts +0 -40
  263. package/schemas/components.ts +0 -265
  264. package/schemas/expressiveCode.ts +0 -12
  265. package/schemas/favicon.ts +0 -40
  266. package/schemas/head.ts +0 -50
  267. package/schemas/hero.ts +0 -69
  268. package/schemas/i18n.ts +0 -244
  269. package/schemas/icon.ts +0 -7
  270. package/schemas/logo.ts +0 -28
  271. package/schemas/pagefind.ts +0 -128
  272. package/schemas/prevNextLink.ts +0 -18
  273. package/schemas/sidebar.ts +0 -163
  274. package/schemas/site-title.ts +0 -20
  275. package/schemas/social.ts +0 -23
  276. package/schemas/tableOfContents.ts +0 -21
  277. package/translations/README.md +0 -14
  278. package/translations/ar.json +0 -33
  279. package/translations/ca.json +0 -43
  280. package/translations/cs.json +0 -43
  281. package/translations/da.json +0 -30
  282. package/translations/de.json +0 -30
  283. package/translations/el.json +0 -30
  284. package/translations/en.json +0 -30
  285. package/translations/es.json +0 -43
  286. package/translations/fa.json +0 -30
  287. package/translations/fi.json +0 -30
  288. package/translations/fr.json +0 -33
  289. package/translations/gl.json +0 -43
  290. package/translations/he.json +0 -30
  291. package/translations/hi.json +0 -33
  292. package/translations/hu.json +0 -43
  293. package/translations/id.json +0 -30
  294. package/translations/index.ts +0 -76
  295. package/translations/it.json +0 -33
  296. package/translations/ja.json +0 -33
  297. package/translations/ko.json +0 -33
  298. package/translations/lv.json +0 -30
  299. package/translations/nb.json +0 -30
  300. package/translations/nl.json +0 -30
  301. package/translations/pl.json +0 -33
  302. package/translations/pt.json +0 -33
  303. package/translations/ro.json +0 -30
  304. package/translations/ru.json +0 -33
  305. package/translations/sk.json +0 -30
  306. package/translations/sv.json +0 -30
  307. package/translations/th.json +0 -30
  308. package/translations/tr.json +0 -30
  309. package/translations/uk.json +0 -30
  310. package/translations/vi.json +0 -30
  311. package/translations/zh-CN.json +0 -33
  312. package/translations/zh-TW.json +0 -33
  313. package/types.ts +0 -7
  314. package/user-components/file-tree-icons.ts +0 -782
  315. package/user-components/rehype-file-tree.ts +0 -251
  316. package/user-components/rehype-steps.ts +0 -85
  317. package/user-components/rehype-tabs.ts +0 -121
  318. package/utils/base.ts +0 -15
  319. package/utils/canonical.ts +0 -19
  320. package/utils/collection-fs.ts +0 -20
  321. package/utils/createPathFormatter.ts +0 -60
  322. package/utils/createTranslationSystem.ts +0 -137
  323. package/utils/error-map.ts +0 -222
  324. package/utils/format-path.ts +0 -7
  325. package/utils/generateToC.ts +0 -33
  326. package/utils/git.ts +0 -121
  327. package/utils/gitInlined.ts +0 -20
  328. package/utils/head.ts +0 -235
  329. package/utils/i18n.ts +0 -221
  330. package/utils/localizedUrl.ts +0 -51
  331. package/utils/navigation.ts +0 -566
  332. package/utils/path.ts +0 -58
  333. package/utils/plugins.ts +0 -498
  334. package/utils/routing/data.ts +0 -154
  335. package/utils/routing/index.ts +0 -135
  336. package/utils/routing/middleware.ts +0 -81
  337. package/utils/routing/types.ts +0 -101
  338. package/utils/slugs.ts +0 -119
  339. package/utils/starlight-page.ts +0 -205
  340. package/utils/translations-fs.ts +0 -54
  341. package/utils/translations.ts +0 -57
  342. package/utils/types.ts +0 -15
  343. package/utils/user-config.ts +0 -348
  344. package/utils/validateLogoImports.ts +0 -21
  345. package/utils/zodDeepMerge.ts +0 -144
  346. package/virtual-internal.d.ts +0 -149
  347. package/virtual.d.ts +0 -27
  348. /package/{components → dist/components}/AnchorHeading.astro +0 -0
  349. /package/{components → dist/components}/Banner.astro +0 -0
  350. /package/{components → dist/components}/ContentNotice.astro +0 -0
  351. /package/{components → dist/components}/ContentPanel.astro +0 -0
  352. /package/{components → dist/components}/DraftContentNotice.astro +0 -0
  353. /package/{components → dist/components}/EditLink.astro +0 -0
  354. /package/{components → dist/components}/FallbackContentNotice.astro +0 -0
  355. /package/{components → dist/components}/Footer.astro +0 -0
  356. /package/{components → dist/components}/Head.astro +0 -0
  357. /package/{components → dist/components}/Header.astro +0 -0
  358. /package/{components → dist/components}/Hero.astro +0 -0
  359. /package/{components → dist/components}/LanguageSelect.astro +0 -0
  360. /package/{components → dist/components}/LastUpdated.astro +0 -0
  361. /package/{components → dist/components}/MarkdownContent.astro +0 -0
  362. /package/{components → dist/components}/MobileMenuFooter.astro +0 -0
  363. /package/{components → dist/components}/MobileTableOfContents.astro +0 -0
  364. /package/{components → dist/components}/Page.astro +0 -0
  365. /package/{components → dist/components}/PageSidebar.astro +0 -0
  366. /package/{components → dist/components}/PageTitle.astro +0 -0
  367. /package/{components → dist/components}/Pagination.astro +0 -0
  368. /package/{components → dist/components}/Search.astro +0 -0
  369. /package/{components → dist/components}/Select.astro +0 -0
  370. /package/{components → dist/components}/Sidebar.astro +0 -0
  371. /package/{components → dist/components}/SidebarPersister.astro +0 -0
  372. /package/{components → dist/components}/SidebarRestorePoint.astro +0 -0
  373. /package/{components → dist/components}/SidebarSublist.astro +0 -0
  374. /package/{components → dist/components}/SiteTitle.astro +0 -0
  375. /package/{components → dist/components}/SkipLink.astro +0 -0
  376. /package/{components → dist/components}/SocialIcons.astro +0 -0
  377. /package/{components → dist/components}/StarlightPage.astro +0 -0
  378. /package/{components → dist/components}/TableOfContents.astro +0 -0
  379. /package/{components → dist/components}/ThemeProvider.astro +0 -0
  380. /package/{components → dist/components}/ThemeSelect.astro +0 -0
  381. /package/{components → dist/components}/TwoColumnContent.astro +0 -0
  382. /package/{components-internals → dist/components-internals}/TableOfContents/TableOfContentsList.astro +0 -0
  383. /package/{components.ts → dist/components.ts} +0 -0
  384. /package/{routes → dist/routes}/common.astro +0 -0
  385. /package/{routes → dist/routes}/ssr/404.astro +0 -0
  386. /package/{routes → dist/routes}/ssr/index.astro +0 -0
  387. /package/{routes → dist/routes}/static/404.astro +0 -0
  388. /package/{routes → dist/routes}/static/index.astro +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,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll };
@@ -0,0 +1,65 @@
1
+ ---
2
+ import Icon from '../user-components/Icon.astro';
3
+ ---
4
+
5
+ <button popovertarget="starlight__sidebar" class="sl-menu-button sl-flex md:sl-hidden print:hidden">
6
+ <Icon name="bars" class="open-menu" />
7
+ <Icon name="close" class="close-menu" />
8
+ <span class="sr-only">{Astro.locals.t('menuButton.accessibleLabel')}</span>
9
+ </button>
10
+
11
+ <style>
12
+ @layer starlight.core {
13
+ button {
14
+ position: fixed;
15
+ top: calc((var(--sl-nav-height) - var(--sl-menu-button-size)) / 2);
16
+ inset-inline-end: var(--sl-nav-pad-x);
17
+ z-index: var(--sl-z-index-navbar);
18
+ border: 0;
19
+ border-radius: 50%;
20
+ width: var(--sl-menu-button-size);
21
+ height: var(--sl-menu-button-size);
22
+ padding: 0.5rem;
23
+ background-color: var(--sl-color-white);
24
+ color: var(--sl-color-black);
25
+ box-shadow: var(--sl-shadow-md);
26
+ cursor: pointer;
27
+ }
28
+
29
+ button:has(~ :popover-open) {
30
+ background-color: var(--sl-color-gray-2);
31
+ box-shadow: none;
32
+ }
33
+
34
+ button:has(~ :popover-open) .open-menu {
35
+ display: none;
36
+ }
37
+
38
+ button:not(:has(~ :popover-open)) .close-menu {
39
+ display: none;
40
+ }
41
+
42
+ :global([data-theme='light']) button {
43
+ background-color: var(--sl-color-black);
44
+ color: var(--sl-color-white);
45
+ }
46
+
47
+ :global([data-theme='light']) button:has(~ :popover-open) {
48
+ background-color: var(--sl-color-gray-5);
49
+ }
50
+ }
51
+ </style>
52
+
53
+ <style is:global>
54
+ @layer starlight.core {
55
+ body:has(#starlight__sidebar:popover-open) {
56
+ overflow: hidden;
57
+ }
58
+
59
+ @media (min-width: 50rem) {
60
+ body:has(#starlight__sidebar:popover-open) {
61
+ overflow: auto;
62
+ }
63
+ }
64
+ }
65
+ </style>
@@ -10,11 +10,33 @@ const { hasSidebar } = Astro.locals.starlightRoute;
10
10
  hasSidebar && (
11
11
  <nav class="sidebar print:hidden" aria-label={Astro.locals.t('sidebarNav.accessibleLabel')}>
12
12
  <MobileMenuToggle />
13
- <div id="starlight__sidebar" class="sidebar-pane">
13
+ <script>
14
+ // The mobile menu uses the popover API to open and close without JavaScript. We enhance this
15
+ // behaviour with focus trapping while the menu is open.
16
+ class StarlightSidebarPane extends HTMLElement {
17
+ constructor() {
18
+ super();
19
+
20
+ // Close the menu when the viewport is resized between mobile and desktop sizes.
21
+ matchMedia('(min-width: 50em)').addEventListener('change', () => this.hidePopover());
22
+
23
+ // Update the menu state when the sidebar popover is toggled.
24
+ this.addEventListener('toggle', ({ newState }) => this.trapFocus(newState === 'open'));
25
+ }
26
+ /** Trap keyboard focus inside the header and menu when the menu is expanded. */
27
+ trapFocus(shouldTrap: boolean) {
28
+ document.querySelectorAll<HTMLElement>('.main-frame, .sl-skip-link').forEach((el) => {
29
+ el.toggleAttribute('inert', shouldTrap);
30
+ });
31
+ }
32
+ }
33
+ customElements.define('sl-sidebar-pane', StarlightSidebarPane);
34
+ </script>
35
+ <sl-sidebar-pane popover="" id="starlight__sidebar" class="sidebar-pane">
14
36
  <div class="sidebar-content sl-flex">
15
37
  <slot name="sidebar" />
16
38
  </div>
17
- </div>
39
+ </sl-sidebar-pane>
18
40
  </nav>
19
41
  )
20
42
  }
@@ -48,7 +70,12 @@ const { hasSidebar } = Astro.locals.starlightRoute;
48
70
  }
49
71
 
50
72
  .sidebar-pane {
51
- visibility: var(--sl-sidebar-visibility, hidden);
73
+ /* By default, user agents apply some opinionated styles to popovers, which we don’t want. */
74
+ border: unset;
75
+ padding: unset;
76
+ height: unset;
77
+ color: unset;
78
+
52
79
  position: fixed;
53
80
  z-index: var(--sl-z-index-menu);
54
81
  inset-block: var(--sl-nav-height) 0;
@@ -59,10 +86,6 @@ const { hasSidebar } = Astro.locals.starlightRoute;
59
86
  scrollbar-gutter: stable;
60
87
  }
61
88
 
62
- :global([aria-expanded='true']) ~ .sidebar-pane {
63
- --sl-sidebar-visibility: visible;
64
- }
65
-
66
89
  .sidebar-content {
67
90
  height: 100%;
68
91
  min-height: max-content;
@@ -88,7 +111,8 @@ const { hasSidebar } = Astro.locals.starlightRoute;
88
111
  padding-inline-end: var(--sl-nav-pad-x);
89
112
  }
90
113
  .sidebar-pane {
91
- --sl-sidebar-visibility: visible;
114
+ /* Make the sidebar visible on larger screens instead of deferring to popover state. */
115
+ display: block;
92
116
  width: var(--sl-sidebar-width);
93
117
  background-color: var(--sl-color-bg-sidebar);
94
118
  border-inline-end: 1px solid var(--sl-color-hairline-shade);
@@ -0,0 +1,415 @@
1
+ import { FileIcon } from "../user-components/file-tree-icons.js";
2
+ //#region src/components-internals/Icons.d.ts
3
+ declare const BuiltInIcons: {
4
+ 'up-caret': string;
5
+ 'down-caret': string;
6
+ 'right-caret': string;
7
+ 'left-caret': string;
8
+ 'up-arrow': string;
9
+ 'down-arrow': string;
10
+ 'right-arrow': string;
11
+ 'left-arrow': string;
12
+ bars: string;
13
+ translate: string;
14
+ pencil: string;
15
+ pen: string;
16
+ document: string;
17
+ 'add-document': string;
18
+ setting: string;
19
+ link: string;
20
+ 'link-alt': string;
21
+ external: string;
22
+ download: string;
23
+ 'cloud-download': string;
24
+ moon: string;
25
+ sun: string;
26
+ clock: string;
27
+ laptop: string;
28
+ desktop: string;
29
+ 'mobile-android': string;
30
+ window: string;
31
+ database: string;
32
+ server: string;
33
+ 'code-branch': string;
34
+ 'open-book': string;
35
+ notes: string;
36
+ information: string;
37
+ magnifier: string;
38
+ 'forward-slash': string;
39
+ close: string;
40
+ error: string;
41
+ warning: string;
42
+ 'approve-check-circle': string;
43
+ 'approve-check': string;
44
+ 'question-circle': string;
45
+ question: string;
46
+ rocket: string;
47
+ star: string;
48
+ puzzle: string;
49
+ 'list-format': string;
50
+ analytics: string;
51
+ random: string;
52
+ padlock: string;
53
+ comment: string;
54
+ 'comment-alt': string;
55
+ heart: string;
56
+ github: string;
57
+ gitlab: string;
58
+ bitbucket: string;
59
+ forgejo: string;
60
+ codePen: string;
61
+ farcaster: string;
62
+ discord: string;
63
+ gitter: string;
64
+ twitter: string;
65
+ 'x.com': string;
66
+ mastodon: string;
67
+ codeberg: string;
68
+ youtube: string;
69
+ threads: string;
70
+ linkedin: string;
71
+ twitch: string;
72
+ azureDevOps: string;
73
+ microsoftTeams: string;
74
+ instagram: string;
75
+ stackOverflow: string;
76
+ telegram: string;
77
+ whatsApp: string;
78
+ rss: string;
79
+ facebook: string;
80
+ email: string;
81
+ phone: string;
82
+ reddit: string;
83
+ patreon: string;
84
+ signal: string;
85
+ slack: string;
86
+ matrix: string;
87
+ hackerOne: string;
88
+ openCollective: string;
89
+ blueSky: string;
90
+ discourse: string;
91
+ zulip: string;
92
+ pinterest: string;
93
+ tiktok: string;
94
+ goodreads: string;
95
+ hypothesis: string;
96
+ astro: string;
97
+ solidjs: string;
98
+ alpine: string;
99
+ pnpm: string;
100
+ biome: string;
101
+ bun: string;
102
+ mdx: string;
103
+ apple: string;
104
+ linux: string;
105
+ homebrew: string;
106
+ nix: string;
107
+ starlight: string;
108
+ pkl: string;
109
+ node: string;
110
+ cloudflare: string;
111
+ vercel: string;
112
+ netlify: string;
113
+ deno: string;
114
+ jsr: string;
115
+ nostr: string;
116
+ backstage: string;
117
+ confluence: string;
118
+ jira: string;
119
+ storybook: string;
120
+ vscode: string;
121
+ jetbrains: string;
122
+ zed: string;
123
+ vim: string;
124
+ figma: string;
125
+ sketch: string;
126
+ npm: string;
127
+ npmx: string;
128
+ sourcehut: string;
129
+ substack: string;
130
+ chrome: string;
131
+ edge: string;
132
+ firefox: string;
133
+ safari: string;
134
+ };
135
+ type BuiltInIcon = 'up-caret' | 'down-caret' | 'right-caret' | 'left-caret' | 'up-arrow' | 'down-arrow' | 'right-arrow' | 'left-arrow' | 'bars' | 'translate' | 'pencil' | 'pen' | 'document' | 'add-document' | 'setting' | 'link' | 'link-alt' | 'external' | 'download' | 'cloud-download' | 'moon' | 'sun' | 'clock' | 'laptop' | 'desktop' | 'mobile-android' | 'window' | 'database' | 'server' | 'code-branch' | 'open-book' | 'notes' | 'information' | 'magnifier' | 'forward-slash' | 'close' | 'error' | 'warning' | 'approve-check-circle' | 'approve-check' | 'question-circle' | 'question' | 'rocket' | 'star' | 'puzzle' | 'list-format' | 'analytics' | 'random' | 'padlock' | 'comment' | 'comment-alt' | 'heart' | 'github' | 'gitlab' | 'bitbucket' | 'forgejo' | 'codePen' | 'farcaster' | 'discord' | 'gitter' | 'twitter' | 'x.com' | 'mastodon' | 'codeberg' | 'youtube' | 'threads' | 'linkedin' | 'twitch' | 'azureDevOps' | 'microsoftTeams' | 'instagram' | 'stackOverflow' | 'telegram' | 'whatsApp' | 'rss' | 'facebook' | 'email' | 'phone' | 'reddit' | 'patreon' | 'signal' | 'slack' | 'matrix' | 'hackerOne' | 'openCollective' | 'blueSky' | 'discourse' | 'zulip' | 'pinterest' | 'tiktok' | 'goodreads' | 'hypothesis' | 'astro' | 'solidjs' | 'alpine' | 'pnpm' | 'biome' | 'bun' | 'mdx' | 'apple' | 'linux' | 'homebrew' | 'nix' | 'starlight' | 'pkl' | 'node' | 'cloudflare' | 'vercel' | 'netlify' | 'deno' | 'jsr' | 'nostr' | 'backstage' | 'confluence' | 'jira' | 'storybook' | 'vscode' | 'jetbrains' | 'zed' | 'vim' | 'figma' | 'sketch' | 'npm' | 'npmx' | 'sourcehut' | 'substack' | 'chrome' | 'edge' | 'firefox' | 'safari';
136
+ declare const Icons: {
137
+ 'seti:folder': string;
138
+ 'seti:bsl': string;
139
+ 'seti:mdo': string;
140
+ 'seti:salesforce': string;
141
+ 'seti:asm': string;
142
+ 'seti:bicep': string;
143
+ 'seti:bazel': string;
144
+ 'seti:c': string;
145
+ 'seti:c-sharp': string;
146
+ 'seti:html': string;
147
+ 'seti:cpp': string;
148
+ 'seti:clojure': string;
149
+ 'seti:coldfusion': string;
150
+ 'seti:config': string;
151
+ 'seti:crystal': string;
152
+ 'seti:crystal_embedded': string;
153
+ 'seti:json': string;
154
+ 'seti:css': string;
155
+ 'seti:csv': string;
156
+ 'seti:xls': string;
157
+ 'seti:cu': string;
158
+ 'seti:cake': string;
159
+ 'seti:cake_php': string;
160
+ 'seti:d': string;
161
+ 'seti:word': string;
162
+ 'seti:elixir': string;
163
+ 'seti:elixir_script': string;
164
+ 'seti:hex': string;
165
+ 'seti:elm': string;
166
+ 'seti:favicon': string;
167
+ 'seti:f-sharp': string;
168
+ 'seti:git': string;
169
+ 'seti:go': string;
170
+ 'seti:godot': string;
171
+ 'seti:gradle': string;
172
+ 'seti:grails': string;
173
+ 'seti:graphql': string;
174
+ 'seti:hacklang': string;
175
+ 'seti:haml': string;
176
+ 'seti:mustache': string;
177
+ 'seti:haskell': string;
178
+ 'seti:haxe': string;
179
+ 'seti:jade': string;
180
+ 'seti:java': string;
181
+ 'seti:javascript': string;
182
+ 'seti:jinja': string;
183
+ 'seti:julia': string;
184
+ 'seti:karma': string;
185
+ 'seti:kotlin': string;
186
+ 'seti:dart': string;
187
+ 'seti:liquid': string;
188
+ 'seti:livescript': string;
189
+ 'seti:lua': string;
190
+ 'seti:markdown': string;
191
+ 'seti:argdown': string;
192
+ 'seti:info': string;
193
+ 'seti:clock': string;
194
+ 'seti:maven': string;
195
+ 'seti:nim': string;
196
+ 'seti:github': string;
197
+ 'seti:notebook': string;
198
+ 'seti:nunjucks': string;
199
+ 'seti:npm': string;
200
+ 'seti:ocaml': string;
201
+ 'seti:odata': string;
202
+ 'seti:perl': string;
203
+ 'seti:php': string;
204
+ 'seti:pipeline': string;
205
+ 'seti:pddl': string;
206
+ 'seti:plan': string;
207
+ 'seti:happenings': string;
208
+ 'seti:powershell': string;
209
+ 'seti:prisma': string;
210
+ 'seti:pug': string;
211
+ 'seti:puppet': string;
212
+ 'seti:purescript': string;
213
+ 'seti:python': string;
214
+ 'seti:react': string;
215
+ 'seti:rescript': string;
216
+ 'seti:R': string;
217
+ 'seti:ruby': string;
218
+ 'seti:rust': string;
219
+ 'seti:sass': string;
220
+ 'seti:spring': string;
221
+ 'seti:slim': string;
222
+ 'seti:smarty': string;
223
+ 'seti:sbt': string;
224
+ 'seti:scala': string;
225
+ 'seti:ethereum': string;
226
+ 'seti:stylus': string;
227
+ 'seti:svelte': string;
228
+ 'seti:swift': string;
229
+ 'seti:db': string;
230
+ 'seti:terraform': string;
231
+ 'seti:tex': string;
232
+ 'seti:default': string;
233
+ 'seti:twig': string;
234
+ 'seti:typescript': string;
235
+ 'seti:tsconfig': string;
236
+ 'seti:vala': string;
237
+ 'seti:vite': string;
238
+ 'seti:vue': string;
239
+ 'seti:wasm': string;
240
+ 'seti:wat': string;
241
+ 'seti:xml': string;
242
+ 'seti:yml': string;
243
+ 'seti:prolog': string;
244
+ 'seti:zig': string;
245
+ 'seti:zip': string;
246
+ 'seti:wgt': string;
247
+ 'seti:illustrator': string;
248
+ 'seti:photoshop': string;
249
+ 'seti:pdf': string;
250
+ 'seti:font': string;
251
+ 'seti:image': string;
252
+ 'seti:svg': string;
253
+ 'seti:sublime': string;
254
+ 'seti:code-search': string;
255
+ 'seti:shell': string;
256
+ 'seti:video': string;
257
+ 'seti:audio': string;
258
+ 'seti:windows': string;
259
+ 'seti:jenkins': string;
260
+ 'seti:babel': string;
261
+ 'seti:bower': string;
262
+ 'seti:docker': string;
263
+ 'seti:code-climate': string;
264
+ 'seti:eslint': string;
265
+ 'seti:firebase': string;
266
+ 'seti:firefox': string;
267
+ 'seti:gitlab': string;
268
+ 'seti:grunt': string;
269
+ 'seti:gulp': string;
270
+ 'seti:ionic': string;
271
+ 'seti:platformio': string;
272
+ 'seti:rollup': string;
273
+ 'seti:stylelint': string;
274
+ 'seti:yarn': string;
275
+ 'seti:webpack': string;
276
+ 'seti:lock': string;
277
+ 'seti:license': string;
278
+ 'seti:makefile': string;
279
+ 'seti:heroku': string;
280
+ 'seti:todo': string;
281
+ 'seti:ignored': string;
282
+ 'up-caret': string;
283
+ 'down-caret': string;
284
+ 'right-caret': string;
285
+ 'left-caret': string;
286
+ 'up-arrow': string;
287
+ 'down-arrow': string;
288
+ 'right-arrow': string;
289
+ 'left-arrow': string;
290
+ bars: string;
291
+ translate: string;
292
+ pencil: string;
293
+ pen: string;
294
+ document: string;
295
+ 'add-document': string;
296
+ setting: string;
297
+ link: string;
298
+ 'link-alt': string;
299
+ external: string;
300
+ download: string;
301
+ 'cloud-download': string;
302
+ moon: string;
303
+ sun: string;
304
+ clock: string;
305
+ laptop: string;
306
+ desktop: string;
307
+ 'mobile-android': string;
308
+ window: string;
309
+ database: string;
310
+ server: string;
311
+ 'code-branch': string;
312
+ 'open-book': string;
313
+ notes: string;
314
+ information: string;
315
+ magnifier: string;
316
+ 'forward-slash': string;
317
+ close: string;
318
+ error: string;
319
+ warning: string;
320
+ 'approve-check-circle': string;
321
+ 'approve-check': string;
322
+ 'question-circle': string;
323
+ question: string;
324
+ rocket: string;
325
+ star: string;
326
+ puzzle: string;
327
+ 'list-format': string;
328
+ analytics: string;
329
+ random: string;
330
+ padlock: string;
331
+ comment: string;
332
+ 'comment-alt': string;
333
+ heart: string;
334
+ github: string;
335
+ gitlab: string;
336
+ bitbucket: string;
337
+ forgejo: string;
338
+ codePen: string;
339
+ farcaster: string;
340
+ discord: string;
341
+ gitter: string;
342
+ twitter: string;
343
+ 'x.com': string;
344
+ mastodon: string;
345
+ codeberg: string;
346
+ youtube: string;
347
+ threads: string;
348
+ linkedin: string;
349
+ twitch: string;
350
+ azureDevOps: string;
351
+ microsoftTeams: string;
352
+ instagram: string;
353
+ stackOverflow: string;
354
+ telegram: string;
355
+ whatsApp: string;
356
+ rss: string;
357
+ facebook: string;
358
+ email: string;
359
+ phone: string;
360
+ reddit: string;
361
+ patreon: string;
362
+ signal: string;
363
+ slack: string;
364
+ matrix: string;
365
+ hackerOne: string;
366
+ openCollective: string;
367
+ blueSky: string;
368
+ discourse: string;
369
+ zulip: string;
370
+ pinterest: string;
371
+ tiktok: string;
372
+ goodreads: string;
373
+ hypothesis: string;
374
+ astro: string;
375
+ solidjs: string;
376
+ alpine: string;
377
+ pnpm: string;
378
+ biome: string;
379
+ bun: string;
380
+ mdx: string;
381
+ apple: string;
382
+ linux: string;
383
+ homebrew: string;
384
+ nix: string;
385
+ starlight: string;
386
+ pkl: string;
387
+ node: string;
388
+ cloudflare: string;
389
+ vercel: string;
390
+ netlify: string;
391
+ deno: string;
392
+ jsr: string;
393
+ nostr: string;
394
+ backstage: string;
395
+ confluence: string;
396
+ jira: string;
397
+ storybook: string;
398
+ vscode: string;
399
+ jetbrains: string;
400
+ zed: string;
401
+ vim: string;
402
+ figma: string;
403
+ sketch: string;
404
+ npm: string;
405
+ npmx: string;
406
+ sourcehut: string;
407
+ substack: string;
408
+ chrome: string;
409
+ edge: string;
410
+ firefox: string;
411
+ safari: string;
412
+ };
413
+ type StarlightIcon = BuiltInIcon | FileIcon;
414
+ //#endregion
415
+ export { BuiltInIcon, BuiltInIcons, Icons, StarlightIcon };