starlight-cannoli-plugins 2.9.0 → 2.10.0

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/README.md CHANGED
@@ -398,7 +398,7 @@ An Astro integration that injects a client-side script to apply opt-in DOM patch
398
398
 
399
399
  - `hideSingleLineGutters` (optional, default: `false`): Hides the line number gutter on Expressive Code blocks that contain only a single line.
400
400
  - `syncTocLabelsFromHeadings` (optional, default: `false`): Copies the rendered HTML of each heading into its matching Starlight TOC anchor label, so the TOC properly reflects any custom markup (e.g. math) present in the heading.
401
- - `limitDetailsElementHeight` (optional, default: `false`): Wraps the content of every `<details>` element (excluding its `<summary>`) in a `<div class="details-wrapper">`, useful for applying consistent spacing or animation styles.
401
+ - `limitDetailsElementHeight` (optional, default: `false`): Limits the height of expanded `<details>` elements and makes their content scrollable.
402
402
  - `offerToggleAllDetails` (optional, default: `false`): Injects an "Expand All Dropdowns" toggle checkbox into the right sidebar (before `nav[aria-labelledby="starlight__on-this-page"]`). Clicking it opens or closes every `<details>` element on the page at once. Only appears on pages that contain at least one visible `<details>` element.
403
403
  - `offerTabbedContent` (optional, default: `false`): Injects a "Tabbed view" toggle checkbox immediately after `#starlight__on-this-page` in the right sidebar. When enabled by the user, the page's markdown content is reorganised into tabs — one per `<h2>` heading, plus an optional "Main" tab for any content that appears before the first `<h2>`. The toggle state is persisted to `localStorage`; active tab selection is not persisted. Only activates when the page has at least two sections (i.e. two or more `<h2>` elements, or one `<h2>` with pre-heading content). Has no effect on pages that lack `#starlight__on-this-page` (e.g. pages with the TOC disabled). Clicking a TOC anchor while tabs are enabled automatically switches to the tab containing the target heading. The generated elements use the classes `tabbed-content`, `tabbed-content-nav`, `tabbed-content-tab`, and `tabbed-content-panel` for styling; toggle button uses the existing `.toggle-checkbox-btn` class.
404
404
 
@@ -9,6 +9,10 @@ var CONDITIONAL_CSS = {
9
9
  max-width: 100%;
10
10
  }
11
11
 
12
+ .main-pane details > summary {
13
+ padding-left: 1.1em;
14
+ }
15
+
12
16
  .main-pane details[open] > div.details-wrapper {
13
17
  overflow: auto;
14
18
  max-height: 67vh;
@@ -21,9 +25,9 @@ var CONDITIONAL_CSS = {
21
25
  }
22
26
  `,
23
27
  disabled: css`
24
- .main-pane details > *:not(summary) {
25
- padding: 0 1rem;
26
- margin: 1rem 0;
28
+ .main-pane details {
29
+ padding-left: 1rem;
30
+ padding-right: 1rem;
27
31
  }
28
32
  `
29
33
  }
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-NCXV367P.js";
25
25
  import {
26
26
  starlightDomPatches
27
- } from "./chunk-D3DPYGKF.js";
27
+ } from "./chunk-RHYQUYJ3.js";
28
28
  import "./chunk-4VNS5WPM.js";
29
29
 
30
30
  // src/plugins/starlight-index-sourced-sidebar/index.ts
@@ -5,7 +5,7 @@ interface DomPatchesOptions {
5
5
  hideSingleLineGutters?: boolean;
6
6
  /** Copy rendered heading innerHTML into matching Starlight TOC anchor labels. @default false */
7
7
  syncTocLabelsFromHeadings?: boolean;
8
- /** Wrap `<details>` content (excluding `<summary>`) in a `.details-wrapper` div. @default false */
8
+ /** Limit the height of expanded `<details>` elements and make their content scrollable. @default false */
9
9
  limitDetailsElementHeight?: boolean;
10
10
  /**
11
11
  * Inject a toggle checkbox (after `#starlight__on-this-page`) that reorganises page content
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  starlightDomPatches
3
- } from "../chunk-D3DPYGKF.js";
3
+ } from "../chunk-RHYQUYJ3.js";
4
4
  import "../chunk-4VNS5WPM.js";
5
5
  export {
6
6
  starlightDomPatches
@@ -69,10 +69,6 @@ starlight-toc ul > li {
69
69
  padding: 0.5em 0;
70
70
  display: block;
71
71
 
72
- summary {
73
- padding-left: 1.1em;
74
- }
75
-
76
72
  html[data-theme="light"] & {
77
73
  background: rgba(162, 171, 173, 0.08);
78
74
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "starlight-cannoli-plugins",
3
3
  "type": "module",
4
- "version": "2.9.0",
4
+ "version": "2.10.0",
5
5
  "description": "Starlight plugins for automatic sidebar generation and link validation",
6
6
  "license": "ISC",
7
7
  "main": "./dist/index.js",