starlight-cannoli-plugins 2.8.0 → 2.8.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.
@@ -48,10 +48,12 @@ function tabbedH2Content() {
48
48
  );
49
49
  return;
50
50
  }
51
- const tocSection = document.getElementById("starlight__on-this-page");
52
- if (!tocSection) {
51
+ const tocNav = document.querySelector(
52
+ "nav[aria-labelledby='starlight__on-this-page']"
53
+ );
54
+ if (!tocNav) {
53
55
  console.log(
54
- "[tabbedH2Content] #starlight__on-this-page not found \u2014 aborting"
56
+ "[tabbedH2Content] nav[aria-labelledby='starlight__on-this-page'] not found \u2014 aborting"
55
57
  );
56
58
  return;
57
59
  }
@@ -166,7 +168,7 @@ function tabbedH2Content() {
166
168
  toggleText.textContent = "Tabbed view";
167
169
  toggleLabel.appendChild(checkbox);
168
170
  toggleLabel.appendChild(toggleText);
169
- tocSection.parentNode.insertBefore(toggleLabel, tocSection.nextSibling);
171
+ tocNav.parentNode.insertBefore(toggleLabel, tocNav);
170
172
  console.log(
171
173
  "[tabbedH2Content] toggle checkbox injected after #starlight__on-this-page"
172
174
  );
@@ -141,6 +141,10 @@ div > div[class="page"] > svg {
141
141
  margin-bottom: 1.75rem;
142
142
  max-height: 9rem;
143
143
  overflow-y: auto;
144
+
145
+ &[hidden] {
146
+ display: none;
147
+ }
144
148
  }
145
149
 
146
150
  .tabbed-content-tab {
@@ -220,6 +224,7 @@ div > div[class="page"] > svg {
220
224
  display: flex;
221
225
  align-items: center;
222
226
  gap: 0.5rem;
227
+ margin: 0.2rem 0;
223
228
  cursor: pointer;
224
229
 
225
230
  input[type="checkbox"] {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "starlight-cannoli-plugins",
3
3
  "type": "module",
4
- "version": "2.8.0",
4
+ "version": "2.8.2",
5
5
  "description": "Starlight plugins for automatic sidebar generation and link validation",
6
6
  "license": "ISC",
7
7
  "main": "./dist/index.js",