@astrojs/starlight 0.5.6 → 0.6.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 (76) hide show
  1. package/404.astro +17 -17
  2. package/CHANGELOG.md +40 -2
  3. package/components/CallToAction.astro +32 -35
  4. package/components/ContentPanel.astro +18 -18
  5. package/components/EditLink.astro +23 -23
  6. package/components/FallbackContentNotice.astro +16 -18
  7. package/components/Footer.astro +28 -34
  8. package/components/HeadSEO.astro +69 -75
  9. package/components/Header.astro +47 -51
  10. package/components/Hero.astro +108 -121
  11. package/components/Icons.ts +73 -71
  12. package/components/LanguageSelect.astro +31 -31
  13. package/components/LastUpdated.astro +16 -18
  14. package/components/MarkdownContent.astro +105 -117
  15. package/components/MobileMenuToggle.astro +80 -80
  16. package/components/PrevNextLinks.astro +60 -60
  17. package/components/RightSidebar.astro +17 -17
  18. package/components/RightSidebarPanel.astro +41 -41
  19. package/components/Search.astro +293 -306
  20. package/components/Select.astro +64 -65
  21. package/components/Sidebar.astro +23 -23
  22. package/components/SidebarSublist.astro +96 -95
  23. package/components/SiteTitle.astro +65 -63
  24. package/components/SkipLink.astro +17 -17
  25. package/components/SocialIcons.astro +36 -34
  26. package/components/TableOfContents/MobileTableOfContents.astro +124 -124
  27. package/components/TableOfContents/TableOfContentsList.astro +64 -69
  28. package/components/TableOfContents/generateToC.ts +41 -43
  29. package/components/TableOfContents/starlight-toc.ts +84 -90
  30. package/components/TableOfContents.astro +8 -8
  31. package/components/ThemeProvider.astro +28 -32
  32. package/components/ThemeSelect.astro +66 -71
  33. package/global.d.ts +3 -3
  34. package/index.astro +1 -1
  35. package/index.ts +52 -59
  36. package/integrations/asides.ts +109 -111
  37. package/integrations/sitemap.ts +10 -13
  38. package/integrations/virtual-user-config.ts +37 -37
  39. package/layout/Page.astro +84 -72
  40. package/layout/PageFrame.astro +67 -69
  41. package/layout/TwoColumnContent.astro +40 -42
  42. package/package.json +2 -2
  43. package/schema.ts +126 -113
  44. package/schemas/favicon.ts +40 -0
  45. package/schemas/head.ts +12 -23
  46. package/schemas/i18n.ts +146 -160
  47. package/schemas/logo.ts +22 -22
  48. package/schemas/prevNextLink.ts +14 -14
  49. package/schemas/tableOfContents.ts +14 -18
  50. package/style/asides.css +27 -27
  51. package/style/props.css +168 -172
  52. package/style/reset.css +13 -13
  53. package/style/shiki.css +11 -11
  54. package/style/util.css +30 -30
  55. package/translations/fr.json +21 -21
  56. package/translations/index.ts +4 -4
  57. package/translations/it.json +20 -20
  58. package/translations/tr.json +1 -1
  59. package/translations/zh.json +0 -1
  60. package/user-components/Card.astro +50 -54
  61. package/user-components/CardGrid.astro +21 -21
  62. package/user-components/Icon.astro +19 -21
  63. package/user-components/TabItem.astro +3 -3
  64. package/user-components/Tabs.astro +113 -117
  65. package/user-components/rehype-tabs.ts +72 -72
  66. package/utils/base.ts +6 -6
  67. package/utils/git.ts +55 -55
  68. package/utils/head.ts +56 -54
  69. package/utils/i18n.ts +3 -3
  70. package/utils/localizedUrl.ts +25 -25
  71. package/utils/navigation.ts +225 -203
  72. package/utils/routing.ts +74 -85
  73. package/utils/slugs.ts +41 -51
  74. package/utils/translations.ts +26 -32
  75. package/utils/user-config.ts +278 -278
  76. package/virtual.d.ts +8 -8
@@ -1,46 +1,46 @@
1
1
  <div class="right-sidebar-panel hidden lg:block">
2
- <div class="container">
3
- <slot />
4
- </div>
2
+ <div class="container">
3
+ <slot />
4
+ </div>
5
5
  </div>
6
6
 
7
7
  <style>
8
- .right-sidebar-panel {
9
- padding: 1rem var(--sl-sidebar-pad-x);
10
- }
11
- .right-sidebar-panel + .right-sidebar-panel {
12
- border-top: 1px solid var(--sl-color-hairline);
13
- }
14
- .container {
15
- width: calc(var(--sl-sidebar-width) - 2 * var(--sl-sidebar-pad-x));
16
- }
17
- .right-sidebar-panel :global(h2) {
18
- color: var(--sl-color-white);
19
- font-size: var(--sl-text-h5);
20
- font-weight: 600;
21
- line-height: var(--sl-line-height-headings);
22
- margin-bottom: 0.5rem;
23
- }
24
- .right-sidebar-panel :global(a) {
25
- display: block;
26
- font-size: var(--sl-text-xs);
27
- text-decoration: none;
28
- color: var(--sl-color-gray-3);
29
- word-break: break-word;
30
- }
31
- .right-sidebar-panel :global(a:hover) {
32
- color: var(--sl-color-white);
33
- }
34
- @media (min-width: 72rem) {
35
- .container {
36
- max-width: calc(
37
- (
38
- (
39
- 100vw - var(--sl-sidebar-width) - 2 * var(--sl-content-pad-x) - 2 *
40
- var(--sl-sidebar-pad-x)
41
- ) * 0.25 /* MAGIC NUMBER 🥲 */
42
- )
43
- );
44
- }
45
- }
8
+ .right-sidebar-panel {
9
+ padding: 1rem var(--sl-sidebar-pad-x);
10
+ }
11
+ .right-sidebar-panel + .right-sidebar-panel {
12
+ border-top: 1px solid var(--sl-color-hairline);
13
+ }
14
+ .container {
15
+ width: calc(var(--sl-sidebar-width) - 2 * var(--sl-sidebar-pad-x));
16
+ }
17
+ .right-sidebar-panel :global(h2) {
18
+ color: var(--sl-color-white);
19
+ font-size: var(--sl-text-h5);
20
+ font-weight: 600;
21
+ line-height: var(--sl-line-height-headings);
22
+ margin-bottom: 0.5rem;
23
+ }
24
+ .right-sidebar-panel :global(a) {
25
+ display: block;
26
+ font-size: var(--sl-text-xs);
27
+ text-decoration: none;
28
+ color: var(--sl-color-gray-3);
29
+ word-break: break-word;
30
+ }
31
+ .right-sidebar-panel :global(a:hover) {
32
+ color: var(--sl-color-white);
33
+ }
34
+ @media (min-width: 72rem) {
35
+ .container {
36
+ max-width: calc(
37
+ (
38
+ (
39
+ 100vw - var(--sl-sidebar-width) - 2 * var(--sl-content-pad-x) - 2 *
40
+ var(--sl-sidebar-pad-x)
41
+ ) * 0.25 /* MAGIC NUMBER 🥲 */
42
+ )
43
+ );
44
+ }
45
+ }
46
46
  </style>