@astrojs/starlight 0.38.3 → 0.38.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,13 @@
1
1
  # @astrojs/starlight
2
2
 
3
+ ## 0.38.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3828](https://github.com/withastro/starlight/pull/3828) [`342038b`](https://github.com/withastro/starlight/commit/342038b60b35c0e8cd4489e6a3ee16902445cfce) Thanks [@MangelMaxime](https://github.com/MangelMaxime)! - Fixes aside styling when used without any content
8
+
9
+ - [#3853](https://github.com/withastro/starlight/pull/3853) [`563e11b`](https://github.com/withastro/starlight/commit/563e11b71f5c23d0ca982f7e061ade0796101ffb) Thanks [@delucis](https://github.com/delucis)! - Fixes a type-checking issue for users on newer versions of TypeScript
10
+
3
11
  ## 0.38.3
4
12
 
5
13
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/starlight",
3
- "version": "0.38.3",
3
+ "version": "0.38.4",
4
4
  "description": "Build beautiful, high-performance documentation websites with Astro",
5
5
  "keywords": [
6
6
  "docs",
package/style/asides.css CHANGED
@@ -45,6 +45,10 @@
45
45
  margin-top: 0.5rem;
46
46
  }
47
47
 
48
+ .starlight-aside__content:empty {
49
+ display: none;
50
+ }
51
+
48
52
  .starlight-aside__content a {
49
53
  color: var(--sl-color-asides-text-accent);
50
54
  }
@@ -34,7 +34,11 @@ if (!title) {
34
34
  <p class="starlight-aside__title" aria-hidden="true">
35
35
  <Icon name={icon || icons[type]} class="starlight-aside__icon" />{title}
36
36
  </p>
37
- <div class="starlight-aside__content">
38
- <slot />
39
- </div>
37
+ {
38
+ /*
39
+ The slot is intentionally not wrapped in newlines/whitespace to ensure CSS `:empty`
40
+ can match when no content is provided.
41
+ */
42
+ }
43
+ <div class="starlight-aside__content"><slot /></div>
40
44
  </aside>
package/utils/i18n.ts CHANGED
@@ -193,6 +193,9 @@ function getLocaleDir(locale: Intl.Locale): 'ltr' | 'rtl' {
193
193
  }
194
194
  // Firefox does not support `textInfo` or `getTextInfo` yet so we fallback to a well-known list
195
195
  // of right-to-left languages.
196
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
197
+ // @ts-ignore — This is a type error with newer versions of TypeScript’s DOM types.
198
+ // TODO: remove or switch to @ts-expect-error in #3572
196
199
  return wellKnownRTL.includes(locale.language) ? 'rtl' : 'ltr';
197
200
  }
198
201