starlight-cannoli-plugins 2.8.0 → 2.8.1

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
  );
@@ -220,6 +220,7 @@ div > div[class="page"] > svg {
220
220
  display: flex;
221
221
  align-items: center;
222
222
  gap: 0.5rem;
223
+ margin: 0.2rem 0;
223
224
  cursor: pointer;
224
225
 
225
226
  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.1",
5
5
  "description": "Starlight plugins for automatic sidebar generation and link validation",
6
6
  "license": "ISC",
7
7
  "main": "./dist/index.js",