starlight-theme-celestia 0.2.4 → 0.3.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 +9 -7
- package/lib/tailwind.gen.css +157 -290
- package/package.json +9 -6
- package/src/components/MultiSidebarPanel.astro +18 -0
- package/src/components/MultiSidebarSelect.astro +72 -0
- package/src/components/MultiSidebarTabs.astro +84 -0
- package/src/components/Sidebar.astro +121 -0
- package/src/components/multi-sidebar.test.ts +47 -0
- package/src/components/multi-sidebar.ts +64 -0
- package/src/index.test.ts +48 -0
- package/src/index.ts +8 -2
- package/src/shiki-config.test.ts +22 -0
- package/src/shiki-config.ts +51 -13
- package/src/user-options.ts +24 -0
package/src/user-options.ts
CHANGED
|
@@ -11,9 +11,32 @@ export interface NavItem {
|
|
|
11
11
|
href: string | Record<string, string>;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
export interface MultiSidebarOptions {
|
|
15
|
+
/**
|
|
16
|
+
* How the sidebar switcher is rendered.
|
|
17
|
+
*
|
|
18
|
+
* - `horizontalList`: one tab per sidebar above the sidebar entries.
|
|
19
|
+
* - `dropdown`: a compact select listing every sidebar.
|
|
20
|
+
* - `hidden`: no switcher, only the sidebar containing the current page is rendered.
|
|
21
|
+
*
|
|
22
|
+
* @default "horizontalList"
|
|
23
|
+
*/
|
|
24
|
+
switcherStyle?: "horizontalList" | "dropdown" | "hidden";
|
|
25
|
+
}
|
|
26
|
+
|
|
14
27
|
export interface ThemeCelestiaOptions {
|
|
15
28
|
nav?: NavItem[];
|
|
16
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Turn every top-level entry of the Starlight `sidebar` config into its own sidebar, with a
|
|
32
|
+
* switcher to move between them.
|
|
33
|
+
*
|
|
34
|
+
* Every top-level entry must be a group or autogenerated when this is set.
|
|
35
|
+
*
|
|
36
|
+
* @default undefined
|
|
37
|
+
*/
|
|
38
|
+
multiSidebar?: MultiSidebarOptions;
|
|
39
|
+
|
|
17
40
|
/**
|
|
18
41
|
* `starlight-theme-celestia` supports two styling systems: pure CSS and Tailwind
|
|
19
42
|
* CSS.
|
|
@@ -33,5 +56,6 @@ export interface ThemeCelestiaOptions {
|
|
|
33
56
|
*/
|
|
34
57
|
export interface ConfigSerialized {
|
|
35
58
|
nav?: NavItem[];
|
|
59
|
+
multiSidebar?: MultiSidebarOptions;
|
|
36
60
|
rootHref: string;
|
|
37
61
|
}
|