starlight-cannoli-plugins 2.10.0 → 2.10.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.
@@ -1,17 +1,16 @@
1
1
  import "../../chunk-4VNS5WPM.js";
2
2
 
3
3
  // src/plugins/starlight-dom-patches/page-script.ts
4
- var TOC_NAV_SELECTOR = "nav[aria-labelledby='starlight__on-this-page']";
5
4
  function appendToActionPanel(element) {
6
- const tocNav = document.querySelector(TOC_NAV_SELECTOR);
7
- if (!tocNav) return false;
8
- let panel = tocNav.parentElement?.querySelector(
5
+ const starlightToc = document.querySelector("starlight-toc");
6
+ if (!starlightToc) return false;
7
+ let panel = starlightToc.querySelector(
9
8
  ":scope > div.cannoli-actionable"
10
- ) ?? null;
9
+ );
11
10
  if (!panel) {
12
11
  panel = document.createElement("div");
13
12
  panel.className = "cannoli-actionable";
14
- tocNav.parentNode.insertBefore(panel, tocNav);
13
+ starlightToc.prepend(panel);
15
14
  }
16
15
  panel.appendChild(element);
17
16
  return true;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "starlight-cannoli-plugins",
3
3
  "type": "module",
4
- "version": "2.10.0",
4
+ "version": "2.10.1",
5
5
  "description": "Starlight plugins for automatic sidebar generation and link validation",
6
6
  "license": "ISC",
7
7
  "main": "./dist/index.js",