@astrojs/starlight 0.0.8 → 0.0.9

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.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#72](https://github.com/withastro/starlight/pull/72) [`3dc1d0c`](https://github.com/withastro/starlight/commit/3dc1d0c342c6db4e30b016035fa446101b1805a2) Thanks [@delucis](https://github.com/delucis)! - Fix vertical alignment of social icons in site header
8
+
9
+ - [#63](https://github.com/withastro/starlight/pull/63) [`823e351`](https://github.com/withastro/starlight/commit/823e351e1c1fc68ca3c20ab35c9a7d9b13760a70) Thanks [@liruifengv](https://github.com/liruifengv)! - Make sidebar groups to collapsible
10
+
11
+ - [#72](https://github.com/withastro/starlight/pull/72) [`3dc1d0c`](https://github.com/withastro/starlight/commit/3dc1d0c342c6db4e30b016035fa446101b1805a2) Thanks [@delucis](https://github.com/delucis)! - Fix image aspect ratio in Markdown content
12
+
3
13
  ## 0.0.8
4
14
 
5
15
  ### Patch Changes
@@ -44,6 +44,7 @@
44
44
  .content :global(:is(img, picture, video, canvas, svg, iframe)) {
45
45
  display: block;
46
46
  max-width: 100%;
47
+ height: auto;
47
48
  }
48
49
 
49
50
  .content :global(h1) {
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  import type { SidebarEntry } from '../utils/navigation';
3
+ import Icon from './Icon.astro';
3
4
 
4
5
  interface Props {
5
6
  sublist: SidebarEntry[];
@@ -15,10 +16,13 @@ interface Props {
15
16
  {entry.label}
16
17
  </a>
17
18
  ) : (
18
- <>
19
- <h2>{entry.label}</h2>
19
+ <details open>
20
+ <summary>
21
+ <h2>{entry.label}</h2>
22
+ <Icon name="right-caret" class="caret" size="1.25rem" />
23
+ </summary>
20
24
  <Astro.self sublist={entry.entries} />
21
- </>
25
+ </details>
22
26
  )}
23
27
  </li>
24
28
  ))
@@ -36,13 +40,35 @@ interface Props {
36
40
  font-size: var(--sl-text-lg);
37
41
  font-weight: 600;
38
42
  color: var(--sl-color-white);
39
- padding-inline: var(--sl-sidebar-item-padding-inline);
40
43
  }
41
44
 
42
45
  .sidebar-group + .sidebar-group {
43
46
  margin-top: 0.75rem;
44
47
  }
45
48
 
49
+ summary {
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: space-between;
53
+ padding-inline: var(--sl-sidebar-item-padding-inline);
54
+ cursor: pointer;
55
+ user-select: none;
56
+ }
57
+ summary::marker,
58
+ summary::-webkit-details-marker {
59
+ display: none;
60
+ }
61
+
62
+ .caret {
63
+ transition: transform 0.2s ease-in-out;
64
+ }
65
+ :global([dir='rtl']) .caret {
66
+ transform: rotateZ(180deg);
67
+ }
68
+ [open] .caret {
69
+ transform: rotateZ(90deg);
70
+ }
71
+
46
72
  a {
47
73
  display: block;
48
74
  border-radius: 0.25rem;
@@ -32,6 +32,7 @@ const links = Object.entries(config.social || {}).filter(([, url]) =>
32
32
 
33
33
  <style>
34
34
  a {
35
+ display: flex;
35
36
  color: var(--sl-color-text-accent);
36
37
  }
37
38
  a:hover {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/starlight",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Build beautiful, high-performance documentation websites with Astro",
5
5
  "keywords": [
6
6
  "docs",