@astrojs/starlight 0.7.1 → 0.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @astrojs/starlight
2
2
 
3
+ ## 0.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#506](https://github.com/withastro/starlight/pull/506) [`5e3133c`](https://github.com/withastro/starlight/commit/5e3133c42232b201b981cf4b3bc1c3dd56b09fa5) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Improve table of content current item highlight behavior
8
+
9
+ - [#499](https://github.com/withastro/starlight/pull/499) [`fcff49e`](https://github.com/withastro/starlight/commit/fcff49ee4260ad68e80833712e161cbb978a2562) Thanks [@D3vil0p3r](https://github.com/D3vil0p3r)! - Add icons for Instagram
10
+
11
+ - [#502](https://github.com/withastro/starlight/pull/502) [`3c87a16`](https://github.com/withastro/starlight/commit/3c87a16de3c867ad89294a0ea84d63eca2e74d7a) Thanks [@Mrahmani71](https://github.com/Mrahmani71)! - Add Farsi UI translations
12
+
13
+ - [#496](https://github.com/withastro/starlight/pull/496) [`cd28392`](https://github.com/withastro/starlight/commit/cd28392ac73ac0ba1a441328fcd1d65d7d441366) Thanks [@lorenzolewis](https://github.com/lorenzolewis)! - Fix `lastUpdated` date position to be consistent
14
+
15
+ - [#402](https://github.com/withastro/starlight/pull/402) [`d8669b8`](https://github.com/withastro/starlight/commit/d8669b869761ac15d1d611eda7dd94a62ce0fd7a) Thanks [@chopfitzroy](https://github.com/chopfitzroy)! - Fix content sometimes appearing above the mobile table of contents.
16
+
3
17
  ## 0.7.1
4
18
 
5
19
  ### Patch Changes
@@ -48,4 +48,7 @@ const prevNextLinks = getPrevNextLinks(sidebar, config.pagination, {
48
48
  font-size: var(--sl-text-sm);
49
49
  color: var(--sl-color-gray-3);
50
50
  }
51
+ .meta > :global(p:only-child) {
52
+ margin-inline-start: auto;
53
+ }
51
54
  </style>
@@ -82,4 +82,6 @@ export const Icons = {
82
82
  '<path d="M2.5 1 1 4.8v15.4h5.5V23h3.1l3-2.8H17l6-5.7V1H2.6ZM21 13.5l-3.4 3.3H12l-3 2.8v-2.8H4.5V3H21v10.5Zm-3.4-6.8v5.8h-2V6.7h2Zm-5.5 0v5.8h-2V6.7h2Z"/>',
83
83
  microsoftTeams:
84
84
  '<path d="M13.78 7.2a3.63 3.63 0 1 0-4.3-3.68h1.78a2.52 2.52 0 0 1 2.52 2.53V7.2zM7.34 18.8h3.92a2.52 2.52 0 0 0 2.52-2.52V8.37h4.17c.58.01 1.04.5 1.03 1.07v6.45a6.3 6.3 0 0 1-6.14 6.43 6.3 6.3 0 0 1-5.5-3.52zm16.1-14.06a2.51 2.51 0 1 1-5.02 0 2.51 2.51 0 0 1 5.02 0zm-3.36 14.24h-.17c.4-1 .59-2.05.57-3.11V9.46c0-.38-.07-.75-.23-1.09h2.69c.58 0 1.06.48 1.06 1.06v5.65a3.9 3.9 0 0 1-3.9 3.9h-.02z"/><path d="M1.02 5.02h10.24c.56 0 1.02.46 1.02 1.03v10.23a1.02 1.02 0 0 1-1.02 1.02H1.02A1.02 1.02 0 0 1 0 16.28V6.04c0-.56.46-1.02 1.02-1.02zm7.81 3.9V7.84H3.45v1.08h2.03v5.57h1.3V8.92h2.05z"/>',
85
+ instagram:
86
+ '<path d="M17.3 5.5a1.2 1.2 0 1 0 1.2 1.2 1.2 1.2 0 0 0-1.2-1.2ZM22 7.9a7.6 7.6 0 0 0-.4-2.5 5 5 0 0 0-1.2-1.7 4.7 4.7 0 0 0-1.8-1.2 7.3 7.3 0 0 0-2.4-.4L12 2H7.9a7.3 7.3 0 0 0-2.5.5 4.8 4.8 0 0 0-1.7 1.2 4.7 4.7 0 0 0-1.2 1.8 7.3 7.3 0 0 0-.4 2.4L2 12v4.1a7.3 7.3 0 0 0 .5 2.4 4.7 4.7 0 0 0 1.2 1.8 4.8 4.8 0 0 0 1.8 1.2 7.3 7.3 0 0 0 2.4.4l4.1.1h4.1a7.3 7.3 0 0 0 2.4-.5 4.7 4.7 0 0 0 1.8-1.2 4.8 4.8 0 0 0 1.2-1.7 7.6 7.6 0 0 0 .4-2.5L22 12V7.9ZM20.1 16a5.6 5.6 0 0 1-.3 1.9A3 3 0 0 1 19 19a3.2 3.2 0 0 1-1.1.8 5.6 5.6 0 0 1-1.9.3H8a5.7 5.7 0 0 1-1.9-.3A3.3 3.3 0 0 1 5 19a3 3 0 0 1-.7-1.1 5.5 5.5 0 0 1-.4-1.9l-.1-4V8a5.5 5.5 0 0 1 .4-1.9A3 3 0 0 1 5 5a3.1 3.1 0 0 1 1.1-.8A5.7 5.7 0 0 1 8 3.9l4-.1h4a5.6 5.6 0 0 1 1.9.4A3 3 0 0 1 19 5a3 3 0 0 1 .7 1.1A5.6 5.6 0 0 1 20 8l.1 4v4ZM12 6.9a5.1 5.1 0 1 0 5.1 5.1A5.1 5.1 0 0 0 12 6.9Zm0 8.4a3.3 3.3 0 1 1 3.3-3.3 3.3 3.3 0 0 1-3.3 3.3Z"/>',
85
87
  };
@@ -19,6 +19,7 @@ const labels: Record<Platform, string> = {
19
19
  linkedin: 'LinkedIn',
20
20
  twitch: 'Twitch',
21
21
  microsoftTeams: 'Microsoft Teams',
22
+ instagram: 'Instagram',
22
23
  };
23
24
 
24
25
  const links = Object.entries(config.social || {}).filter(([, url]) => Boolean(url)) as [
@@ -35,6 +35,7 @@ const t = useTranslations(locale);
35
35
  <style>
36
36
  nav {
37
37
  position: fixed;
38
+ z-index: var(--sl-z-index-toc);
38
39
  top: calc(var(--sl-nav-height) - 1px);
39
40
  inset-inline: 0;
40
41
  border-top: 1px solid var(--sl-color-gray-5);
@@ -14,7 +14,7 @@ const { toc, isMobile = false, depth = 0 } = Astro.props;
14
14
  {
15
15
  toc.map((heading) => (
16
16
  <li>
17
- <a href={'#' + heading.slug} aria-current={heading.current && 'true'}>
17
+ <a href={'#' + heading.slug}>
18
18
  <span>{heading.text}</span>
19
19
  </a>
20
20
  {heading.children.length > 0 && (
@@ -2,7 +2,6 @@ import type { MarkdownHeading } from 'astro';
2
2
 
3
3
  export interface TocItem extends MarkdownHeading {
4
4
  children: TocItem[];
5
- current?: boolean;
6
5
  }
7
6
 
8
7
  function diveChildren(item: TocItem, depth: number): TocItem[] {
@@ -34,7 +33,7 @@ export function generateToC(
34
33
 
35
34
  for (const heading of headings) {
36
35
  if (toc.length === 0) {
37
- toc.push({ ...heading, children: [], current: true });
36
+ toc.push({ ...heading, children: [] });
38
37
  } else {
39
38
  const lastItemInToc = toc.at(-1)!;
40
39
  if (heading.depth < lastItemInToc.depth) {
@@ -18,6 +18,10 @@ interface Props {
18
18
  </div>
19
19
 
20
20
  <style>
21
+ .main-pane {
22
+ isolation: isolate;
23
+ }
24
+
21
25
  @media (min-width: 72rem) {
22
26
  .right-sidebar-container {
23
27
  order: 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/starlight",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Build beautiful, high-performance documentation websites with Astro",
5
5
  "keywords": [
6
6
  "docs",
package/style/props.css CHANGED
@@ -104,6 +104,7 @@
104
104
  --sl-outline-offset-inside: -0.1875rem;
105
105
 
106
106
  /* Global z-index values */
107
+ --sl-z-index-toc: 4;
107
108
  --sl-z-index-menu: 5;
108
109
  --sl-z-index-navbar: 10;
109
110
  --sl-z-index-skiplink: 20;
@@ -0,0 +1,22 @@
1
+ {
2
+ "skipLink.label": "رفتن به محتوا",
3
+ "search.label": "جستجو",
4
+ "search.shortcutLabel": "(برای جستجو / را فشار دهید)",
5
+ "search.cancelLabel": "لغو",
6
+ "search.devWarning": "جستجو تنها در نسخه‌های تولیدی در دسترس است. \nسعی کنید سایت را بسازید و پیش‌نمایش آن را به صورت محلی آزمایش کنید.",
7
+ "themeSelect.accessibleLabel": "انتخاب پوسته",
8
+ "themeSelect.dark": "تیره",
9
+ "themeSelect.light": "روشن",
10
+ "themeSelect.auto": "خودکار",
11
+ "languageSelect.accessibleLabel": "انتخاب زبان",
12
+ "menuButton.accessibleLabel": "منو",
13
+ "sidebarNav.accessibleLabel": "اصلی",
14
+ "tableOfContents.onThisPage": "در این صفحه",
15
+ "tableOfContents.overview": "بررسی اجمالی",
16
+ "i18n.untranslatedContent": "این محتوا هنوز به زبان شما در دسترس نیست.",
17
+ "page.editLink": "ویرایش صفحه",
18
+ "page.lastUpdated": "آخرین به روز رسانی:",
19
+ "page.previousLink": "قبلی",
20
+ "page.nextLink": "بعدی",
21
+ "404.text": "صفحه یافت نشد. لطفاً URL را بررسی کنید یا از جستجو استفاده نمایید."
22
+ }
@@ -5,6 +5,7 @@ import es from './es.json';
5
5
  import de from './de.json';
6
6
  import ja from './ja.json';
7
7
  import pt from './pt.json';
8
+ import fa from './fa.json';
8
9
  import fr from './fr.json';
9
10
  import it from './it.json';
10
11
  import nl from './nl.json';
@@ -17,8 +18,7 @@ import zh from './zh.json';
17
18
  const { parse } = builtinI18nSchema();
18
19
 
19
20
  export default Object.fromEntries(
20
- Object.entries({ cs, en, es, de, ja, pt, fr, it, nl, da, tr, ar, nb, zh }).map(([key, dict]) => [
21
- key,
22
- parse(dict),
23
- ])
21
+ Object.entries({ cs, en, es, de, ja, pt, fa, fr, it, nl, da, tr, ar, nb, zh }).map(
22
+ ([key, dict]) => [key, parse(dict)]
23
+ )
24
24
  );
@@ -147,6 +147,7 @@ const UserConfigSchema = z.object({
147
147
  'linkedin',
148
148
  'twitch',
149
149
  'microsoftTeams',
150
+ 'instagram',
150
151
  ]),
151
152
  // Link to the respective social profile for this site
152
153
  z.string().url()