@astrojs/starlight 0.24.3 → 0.24.4

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,15 @@
1
1
  # @astrojs/starlight
2
2
 
3
+ ## 0.24.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2038](https://github.com/withastro/starlight/pull/2038) [`87f3f92`](https://github.com/withastro/starlight/commit/87f3f925be6f9897b71b09a3041ec6d54be483b2) Thanks [@dragomano](https://github.com/dragomano)! - Updates Russian UI translations
8
+
9
+ - [#2043](https://github.com/withastro/starlight/pull/2043) [`53f4cd4`](https://github.com/withastro/starlight/commit/53f4cd443cf31b6135ff16eb74b5f26ee93ee2d5) Thanks [@playmr365](https://github.com/playmr365)! - Updates Czech UI translations
10
+
11
+ - [#2041](https://github.com/withastro/starlight/pull/2041) [`8af5a60`](https://github.com/withastro/starlight/commit/8af5a60ab14f4dae7f5a5e4ee535ae927273368b) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes `<Steps>` numbering bug caused by Chrome v126 CSS counter rewrite
12
+
3
13
  ## 0.24.3
4
14
 
5
15
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/starlight",
3
- "version": "0.24.3",
3
+ "version": "0.24.4",
4
4
  "description": "Build beautiful, high-performance documentation websites with Astro",
5
5
  "keywords": [
6
6
  "docs",
@@ -25,5 +25,18 @@
25
25
  "aside.caution": "Upozornění",
26
26
  "aside.danger": "Nebezpečí",
27
27
  "fileTree.directory": "Adresář",
28
- "builtWithStarlight.label": "Postavené s Starlight"
28
+ "builtWithStarlight.label": "Postavené s Starlight",
29
+ "expressiveCode.copyButtonCopied": "Zkopírováno!",
30
+ "expressiveCode.copyButtonTooltip": "Kopíruj do schránky",
31
+ "expressiveCode.terminalWindowFallbackTitle": "Terminál",
32
+ "pagefind.clear_search": "Vyčistit",
33
+ "pagefind.load_more": "Načíst další výsledky",
34
+ "pagefind.search_label": "Vyhledat stránku",
35
+ "pagefind.filters_label": "Filtry",
36
+ "pagefind.zero_results": "Žádný výsledek pro: [SEARCH_TERM]",
37
+ "pagefind.many_results": "počet výsledků: [COUNT] pro: [SEARCH_TERM]",
38
+ "pagefind.one_result": "[COUNT] výsledek pro: [SEARCH_TERM]",
39
+ "pagefind.alt_search": "Žádné výsledky pro [SEARCH_TERM]. Namísto toho zobrazuji výsledky pro: [DIFFERENT_TERM]",
40
+ "pagefind.search_suggestion": "Žádný výsledek pro [SEARCH_TERM]. Zkus nějaké z těchto hledání:",
41
+ "pagefind.searching": "Hledám [SEARCH_TERM]..."
29
42
  }
@@ -28,5 +28,5 @@
28
28
  "expressiveCode.copyButtonCopied": "Скопировано!",
29
29
  "expressiveCode.copyButtonTooltip": "Копировать",
30
30
  "expressiveCode.terminalWindowFallbackTitle": "Окно терминала",
31
- "builtWithStarlight.label": "Built with Starlight"
31
+ "builtWithStarlight.label": "Сделано с помощью Starlight"
32
32
  }
@@ -13,10 +13,12 @@ const { html } = processSteps(content);
13
13
  --bullet-margin: 0.375rem;
14
14
 
15
15
  list-style: none;
16
+ counter-reset: steps-counter var(--sl-steps-start, 0);
16
17
  padding-inline-start: 0;
17
18
  }
18
19
 
19
20
  .sl-steps > li {
21
+ counter-increment: steps-counter;
20
22
  position: relative;
21
23
  padding-inline-start: calc(var(--bullet-size) + 1rem);
22
24
  /* HACK: Keeps any `margin-bottom` inside the `<li>`’s padding box to avoid gaps in the hairline border. */
@@ -31,7 +33,7 @@ const { html } = processSteps(content);
31
33
 
32
34
  /* Custom list marker element. */
33
35
  .sl-steps > li::before {
34
- content: counter(list-item);
36
+ content: counter(steps-counter);
35
37
  position: absolute;
36
38
  top: 0;
37
39
  inset-inline-start: 0;
@@ -44,6 +44,14 @@ const stepsProcessor = rehype()
44
44
  } else {
45
45
  rootElement.properties.className.push('sl-steps');
46
46
  }
47
+
48
+ // Add the `start` attribute as a CSS custom property so we can use it as the starting index
49
+ // of the steps custom counter.
50
+ if (typeof rootElement.properties.start === 'number') {
51
+ const styles = [`--sl-steps-start: ${rootElement.properties.start - 1}`];
52
+ if (rootElement.properties.style) styles.push(String(rootElement.properties.style));
53
+ rootElement.properties.style = styles.join(';');
54
+ }
47
55
  };
48
56
  });
49
57