@takazudo/zudo-doc 7.0.0 → 8.0.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/CHANGELOG.md +32 -0
- package/README.md +1 -1
- package/dist/chrome/derive.js +1 -0
- package/dist/compiled.css +14 -2
- package/dist/config.d.ts +9 -0
- package/dist/content.css +19 -2
- package/dist/home-page/index.d.ts +1 -1
- package/dist/home-page/index.js +2 -1
- package/dist/preset.d.ts +2 -0
- package/dist/settings-defaults.js +1 -0
- package/dist/settings.d.ts +2 -0
- package/dist/site-tree-nav/index.d.ts +2 -0
- package/dist/site-tree-nav/index.js +2 -0
- package/dist/site-tree-nav/normalize-island-props.d.ts +1 -0
- package/dist/site-tree-nav/normalize-island-props.js +6 -0
- package/dist/site-tree-nav-island/index.d.ts +1 -1
- package/dist/site-tree-nav-island/index.js +7 -6
- package/dist/theme-packs/drift/pack.css +6 -0
- package/dist/theme-packs/foundry/pack.css +6 -0
- package/dist/theme-packs/futura-editorial/pack.css +6 -0
- package/dist/theme-packs/hollow/pack.css +3 -0
- package/dist/theme-packs/ledger/pack.css +3 -0
- package/dist/theme-packs/matcha/pack.css +3 -0
- package/dist/theme-packs/observatory/pack.css +3 -0
- package/dist/theme-packs/sakura/pack.css +3 -0
- package/dist/theme-packs/scandi/pack.css +3 -0
- package/dist/theme-packs/solar/pack.css +3 -0
- package/dist/theme-packs/tidepool/pack.css +3 -0
- package/dist/theme-packs/washi/pack.css +3 -0
- package/eject/site-tree-nav-island/index.tsx +9 -7
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,38 @@ The format is based on Keep a Changelog, and release notes are generated from th
|
|
|
8
8
|
|
|
9
9
|
No unreleased changes.
|
|
10
10
|
|
|
11
|
+
## [8.0.0] - 2026-10-24
|
|
12
|
+
|
|
13
|
+
### Breaking Changes
|
|
14
|
+
|
|
15
|
+
- Remove the `@takazudo/zudo-doc/plugins/optional-peers` export. Remove any explicit registration of that workaround plugin; ZFB now handles rejection-handled optional imports directly.
|
|
16
|
+
- Require ZFB 5.0.1 or later in the 5.x line. Upgrade the ZFB engine, runtime, and Markdown WASM packages together. When using document history, upgrade `@takazudo/zudo-doc-history-server` to 8.x as well. Node.js 24 remains the minimum.
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- Add `siteTreeNavInitiallyCollapsed` to start exact nested category slugs collapsed in home-page and MDX site trees while preserving links and toggles. (fb4a6e3cf)
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- Adopt ZFB 5.0.1 to fix lazy island chunks requesting an unpublished `islands.js` asset.
|
|
25
|
+
- Restore prose spacing inside tab panels. (5c2f52b92)
|
|
26
|
+
- Clarify adjacent heading spacing and heading hierarchy across theme packs. (2969bd803)
|
|
27
|
+
|
|
28
|
+
### Other Changes
|
|
29
|
+
|
|
30
|
+
- Accept Node.js 24 or later without an upper version cap. Node 24 LTS remains the CI-verified line. (d5336a24b)
|
|
31
|
+
- Update the MCP SDK to 1.32.2.
|
|
32
|
+
|
|
33
|
+
## [7.1.0] - 2026-10-23
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
- Inline code inside table cells no longer breaks mid-word. The narrow-width `overflow-wrap: anywhere` from 7.0.0 collapsed the min-content width of table columns, so short identifiers such as `slug` were split instead of the table wrapper scrolling. Code in `th` / `td` goes back to `overflow-wrap: break-word`. (9d36a247, a30cdd85)
|
|
38
|
+
|
|
39
|
+
### Other Changes
|
|
40
|
+
|
|
41
|
+
- Requires the published zfb 4.7.0 family: the `@takazudo/zfb`, `zfb-runtime` and `zfb-md-wasm` peer floors move from `^4.5.2` to `^4.7.0`. This picks up the 4.5.3 MDX compile fixes: multiline expressions such as HtmlPreview template-literal props keep their authored whitespace, and a template string that contains a decimal comparison no longer fails to compile with `Unexpected numeric literal`. It also picks up the 4.5.4 islands fix: edits outside the browser graph, such as a page title or a Markdown body, no longer change the shipped islands JavaScript. 4.6.0 adds the RUSTSEC-2026-0381 and RUSTSEC-2026-0382 fixes in the CLI's HTTPS client, stages only the pnpm store packages a page can actually reach into the build shadow, and fixes two Windows path bugs in the SSR shadow and plugin virtual modules. 4.7.0 makes Rolldown the page/SSR and island bundler in place of esbuild, so shipped island asset hashes change on the first build after upgrading (set `ZFB_BUNDLER=esbuild` to go back); it also applies a project's tsconfig JSX options to TSX shipped inside packages (zfb#4407), and fixes Windows island builds that import a `?url` resource such as `@takazudo/zfb-md-wasm/highlight` (zfb#4413). Under Rolldown the optional `katex` and `diff` peers stay optional: a new `optional-peers` plugin shadows a peer that is not installed, or whose `math` / `docHistory` feature is off, so the project still builds and an enabled feature shows its usual "install the peer" message (workaround for zfb#4429). Upgrade the zfb family (and `zfb-adapter-cloudflare` when used) together. (f118e4e0, 2b222e31, 957c252d, 81fcc982, 39f1e8a8, 2e6676db)
|
|
42
|
+
|
|
11
43
|
## [7.0.0] - 2026-10-15
|
|
12
44
|
|
|
13
45
|
### Breaking Changes
|
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ If your project renders **semi-trusted or user-submitted** HTML in a preview, ov
|
|
|
109
109
|
|
|
110
110
|
**6.0.0** is the coordinated major release of `@takazudo/zudo-doc`,
|
|
111
111
|
`@takazudo/zudo-doc-history-server` and `create-zudo-doc`. The current workspace
|
|
112
|
-
targets the published **zfb
|
|
112
|
+
targets the published **zfb 5.0.1** family (peer floor **^5.0.1**).
|
|
113
113
|
[Upstream #4097](https://github.com/Takazudo/zudo-front-builder/issues/4097) is
|
|
114
114
|
resolved; its strict published 4.3.1 consumer control passed 3/3 with no skips or
|
|
115
115
|
retries in the [source-bound verification](../../docs/findings/zfb-4.3.1/verification.md).
|
package/dist/chrome/derive.js
CHANGED
|
@@ -322,6 +322,7 @@ function deriveMdxComponents(ctx) {
|
|
|
322
322
|
getCategoryOrder: ctx.getCategoryOrder,
|
|
323
323
|
versionedDocsUrl: ctx.versionedDocsUrl,
|
|
324
324
|
categoryIgnore: ctx.settings.siteTreeNavIgnore,
|
|
325
|
+
initiallyCollapsedCategorySlugs: ctx.settings.siteTreeNavInitiallyCollapsed,
|
|
325
326
|
dateFormat: ctx.settings.dateFormat
|
|
326
327
|
});
|
|
327
328
|
const NoteTrayIndexWrapper = createNoteTrayIndexWrapper({
|
package/dist/compiled.css
CHANGED
|
@@ -630,11 +630,15 @@ body {
|
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
@layer zd-flow {
|
|
633
|
-
.zd-content > :where(* + *) {
|
|
633
|
+
.zd-content > :where(* + *), .zd-content :where(.tab-panel) > :where(* + *) {
|
|
634
634
|
margin-top: var(--flow-space, var(--spacing-vsp-md));
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
+
.zd-content :where(.tab-panel) {
|
|
639
|
+
--flow-space: var(--spacing-vsp-md);
|
|
640
|
+
}
|
|
641
|
+
|
|
638
642
|
.zd-content :where(h2) {
|
|
639
643
|
--flow-space: var(--spacing-vsp-2xl);
|
|
640
644
|
}
|
|
@@ -658,11 +662,15 @@ body {
|
|
|
658
662
|
--flow-space: var(--spacing-vsp-xs);
|
|
659
663
|
}
|
|
660
664
|
|
|
665
|
+
.zd-content :where(h2) + :where(h3) {
|
|
666
|
+
--flow-space: var(--spacing-vsp-md);
|
|
667
|
+
}
|
|
668
|
+
|
|
661
669
|
.zd-content :where(h2, h3, h4, h5, h6) + :where(:not(h2, h3, h4, h5, h6)) {
|
|
662
670
|
--flow-space: var(--spacing-vsp-xs);
|
|
663
671
|
}
|
|
664
672
|
|
|
665
|
-
.zd-content > :first-child {
|
|
673
|
+
.zd-content > :first-child, .zd-content :where(.tab-panel) > :first-child {
|
|
666
674
|
margin-top: 0;
|
|
667
675
|
}
|
|
668
676
|
|
|
@@ -751,6 +759,10 @@ body {
|
|
|
751
759
|
overflow-wrap: break-word;
|
|
752
760
|
}
|
|
753
761
|
|
|
762
|
+
.zd-content :where(th code, td code) {
|
|
763
|
+
overflow-wrap: break-word;
|
|
764
|
+
}
|
|
765
|
+
|
|
754
766
|
.zd-content :where(th) {
|
|
755
767
|
font-weight: var(--font-weight-semibold);
|
|
756
768
|
text-align: left;
|
package/dist/config.d.ts
CHANGED
|
@@ -158,6 +158,15 @@ export interface ZudoDocConfig {
|
|
|
158
158
|
* @default []
|
|
159
159
|
*/
|
|
160
160
|
siteTreeNavIgnore?: string[];
|
|
161
|
+
/**
|
|
162
|
+
* Exact full `node.slug` values of categories that start collapsed at any
|
|
163
|
+
* depth in package-owned home pages and `<SiteTreeNav />` / `<SiteTreeNavDemo />`
|
|
164
|
+
* MDX tags. Use slugs such as `"zudo-wind/utilities"`, without `/docs`, a
|
|
165
|
+
* locale prefix, or leading/trailing slashes. Visitors can toggle them normally.
|
|
166
|
+
* Does not affect sidebar expansion.
|
|
167
|
+
* @default []
|
|
168
|
+
*/
|
|
169
|
+
siteTreeNavInitiallyCollapsed?: string[];
|
|
161
170
|
/**
|
|
162
171
|
* Top-level category slugs moved OUT of the package-owned home-page category
|
|
163
172
|
* grid on `/` and locale homes and rendered instead as one row of small
|
package/dist/content.css
CHANGED
|
@@ -74,11 +74,17 @@
|
|
|
74
74
|
* layer-independent, so the per-heading flow gaps are unaffected.
|
|
75
75
|
* See zudolab/zudo-doc#2082 / #2109. */
|
|
76
76
|
@layer zd-flow {
|
|
77
|
-
.zd-content > :where(* + *)
|
|
77
|
+
.zd-content > :where(* + *),
|
|
78
|
+
.zd-content :where(.tab-panel) > :where(* + *) {
|
|
78
79
|
margin-top: var(--flow-space, var(--spacing-vsp-md));
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
|
|
83
|
+
/* Tabs can inherit a heading-following gap; start a new prose flow inside. */
|
|
84
|
+
.zd-content :where(.tab-panel) {
|
|
85
|
+
--flow-space: var(--spacing-vsp-md);
|
|
86
|
+
}
|
|
87
|
+
|
|
82
88
|
/* ── Headings ── */
|
|
83
89
|
|
|
84
90
|
/* Heading flow-space (structural — consumed by flow spacing system) */
|
|
@@ -107,13 +113,18 @@
|
|
|
107
113
|
--flow-space: var(--spacing-vsp-xs);
|
|
108
114
|
}
|
|
109
115
|
|
|
116
|
+
.zd-content :where(h2) + :where(h3) {
|
|
117
|
+
--flow-space: var(--spacing-vsp-md);
|
|
118
|
+
}
|
|
119
|
+
|
|
110
120
|
/* Content immediately after a heading: tight gap (replaces heading margin-bottom) */
|
|
111
121
|
.zd-content :where(h2, h3, h4, h5, h6) + :where(:not(h2, h3, h4, h5, h6)) {
|
|
112
122
|
--flow-space: var(--spacing-vsp-xs);
|
|
113
123
|
}
|
|
114
124
|
|
|
115
125
|
/* First child never needs top margin */
|
|
116
|
-
.zd-content > :first-child
|
|
126
|
+
.zd-content > :first-child,
|
|
127
|
+
.zd-content :where(.tab-panel) > :first-child {
|
|
117
128
|
margin-top: 0;
|
|
118
129
|
}
|
|
119
130
|
|
|
@@ -236,6 +247,12 @@
|
|
|
236
247
|
overflow-wrap: break-word;
|
|
237
248
|
}
|
|
238
249
|
|
|
250
|
+
/* `anywhere` collapses min-content width, so table layout would shrink columns
|
|
251
|
+
* and split identifiers mid-word instead of scrolling the wrapper (#4594). */
|
|
252
|
+
.zd-content :where(th code, td code) {
|
|
253
|
+
overflow-wrap: break-word;
|
|
254
|
+
}
|
|
255
|
+
|
|
239
256
|
.zd-content :where(th) {
|
|
240
257
|
font-weight: var(--font-weight-semibold);
|
|
241
258
|
text-align: left;
|
|
@@ -43,7 +43,7 @@ export interface HomePageViewProps {
|
|
|
43
43
|
tree: DocNavNode[];
|
|
44
44
|
/** Ordered category prefixes, passed through to `SiteTreeNav`. */
|
|
45
45
|
categoryOrder: string[];
|
|
46
|
-
/**
|
|
46
|
+
/** Exact full category slugs at any depth that should start collapsed in `SiteTreeNav`. Overrides `settings.siteTreeNavInitiallyCollapsed`, including when `[]`. */
|
|
47
47
|
initiallyCollapsedCategorySlugs?: string[];
|
|
48
48
|
/** Unique tag count for the current locale — gates the "Tags" section
|
|
49
49
|
* together with `settings.docTags`. Part of the documented public
|
package/dist/home-page/index.js
CHANGED
|
@@ -87,6 +87,7 @@ function createHomePageView(ctx) {
|
|
|
87
87
|
wide
|
|
88
88
|
}) {
|
|
89
89
|
const prefix = locale === defaultLocale ? "" : `/${locale}`;
|
|
90
|
+
const effectiveInitiallyCollapsedCategorySlugs = initiallyCollapsedCategorySlugs ?? settings.siteTreeNavInitiallyCollapsed;
|
|
90
91
|
const rawDescription = settings.locales[locale]?.description ?? settings.siteDescription;
|
|
91
92
|
const description = rawDescription?.trim() ? rawDescription : void 0;
|
|
92
93
|
const ctaNav = settings.headerNav[0] ?? null;
|
|
@@ -193,7 +194,7 @@ function createHomePageView(ctx) {
|
|
|
193
194
|
tree,
|
|
194
195
|
categoryOrder,
|
|
195
196
|
categoryIgnore: [...categoryIgnore, ...movedNodes.map((n) => n.slug)],
|
|
196
|
-
...
|
|
197
|
+
...effectiveInitiallyCollapsedCategorySlugs !== void 0 ? { initiallyCollapsedCategorySlugs: effectiveInitiallyCollapsedCategorySlugs } : {},
|
|
197
198
|
locale,
|
|
198
199
|
updatedLabel: t("doc.updated", locale),
|
|
199
200
|
dateFormats: dateFormatsFor(locale)
|
package/dist/preset.d.ts
CHANGED
|
@@ -115,6 +115,8 @@ export interface PresetSettings {
|
|
|
115
115
|
trailingSlash: boolean;
|
|
116
116
|
minifyHtml?: boolean;
|
|
117
117
|
mermaid: boolean;
|
|
118
|
+
/** KaTeX math rendering; when off, the optional `katex` peer is shadowed. */
|
|
119
|
+
math?: boolean;
|
|
118
120
|
/** Enable transclusion of other Markdown/MDX files. */
|
|
119
121
|
transclude?: boolean;
|
|
120
122
|
onBrokenMarkdownLinks: "warn" | "error" | "ignore";
|
|
@@ -14,6 +14,7 @@ const DEFAULT_SETTINGS = {
|
|
|
14
14
|
trailingSlash: false,
|
|
15
15
|
home: { wide: false, introMarkdown: "", sitemapHeading: "" },
|
|
16
16
|
siteTreeNavIgnore: [],
|
|
17
|
+
siteTreeNavInitiallyCollapsed: [],
|
|
17
18
|
siteTreeNavSecondary: [],
|
|
18
19
|
minifyHtml: true,
|
|
19
20
|
docsDir: "src/content/docs",
|
package/dist/settings.d.ts
CHANGED
|
@@ -347,6 +347,8 @@ export interface Settings {
|
|
|
347
347
|
home?: HomeConfig;
|
|
348
348
|
/** Top-level category slugs hidden from the package home-page grid and the `<SiteTreeNav />` MDX tag. Nothing hidden when omitted. */
|
|
349
349
|
siteTreeNavIgnore?: string[];
|
|
350
|
+
/** Exact full category slugs to start collapsed at any depth in home and MDX SiteTreeNav. Defaults to `[]`. */
|
|
351
|
+
siteTreeNavInitiallyCollapsed?: string[];
|
|
350
352
|
/** Top-level category slugs moved from the package home-page grid into the secondary link row under it. Nothing moved when omitted. */
|
|
351
353
|
siteTreeNavSecondary?: string[];
|
|
352
354
|
/** Minify production HTML output from `zfb build`. Defaults to `true` when omitted. */
|
|
@@ -82,6 +82,8 @@ export interface SiteTreeNavDeps {
|
|
|
82
82
|
* package chrome passes `settings.siteTreeNavIgnore`.
|
|
83
83
|
*/
|
|
84
84
|
categoryIgnore?: string[];
|
|
85
|
+
/** Exact full category slugs to start collapsed at any depth. Optional for existing factory callers. */
|
|
86
|
+
initiallyCollapsedCategorySlugs?: string[];
|
|
85
87
|
/**
|
|
86
88
|
* The raw `dateFormat` setting (`ctx.settings.dateFormat`). Resolved to
|
|
87
89
|
* per-role patterns for the render locale and forwarded to the island as
|
|
@@ -13,6 +13,7 @@ function createSiteTreeNavWrapper(deps) {
|
|
|
13
13
|
getCategoryOrder,
|
|
14
14
|
versionedDocsUrl,
|
|
15
15
|
categoryIgnore,
|
|
16
|
+
initiallyCollapsedCategorySlugs,
|
|
16
17
|
dateFormat
|
|
17
18
|
} = deps;
|
|
18
19
|
function SiteTreeNavWrapper({
|
|
@@ -43,6 +44,7 @@ function createSiteTreeNavWrapper(deps) {
|
|
|
43
44
|
tree,
|
|
44
45
|
categoryOrder,
|
|
45
46
|
...categoryIgnore !== void 0 ? { categoryIgnore } : {},
|
|
47
|
+
...initiallyCollapsedCategorySlugs !== void 0 ? { initiallyCollapsedCategorySlugs } : {},
|
|
46
48
|
...ariaLabel !== void 0 ? { ariaLabel } : {},
|
|
47
49
|
locale,
|
|
48
50
|
dateFormats: resolveDateFormats(dateFormat, locale)
|
|
@@ -12,6 +12,12 @@ function normalizeSiteTreeNavProps(input) {
|
|
|
12
12
|
"categoryIgnore"
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
|
+
if (input.initiallyCollapsedCategorySlugs !== void 0) {
|
|
16
|
+
normalized.initiallyCollapsedCategorySlugs = normalizeStringArray(
|
|
17
|
+
input.initiallyCollapsedCategorySlugs,
|
|
18
|
+
"initiallyCollapsedCategorySlugs"
|
|
19
|
+
);
|
|
20
|
+
}
|
|
15
21
|
if (input.ariaLabel !== void 0) {
|
|
16
22
|
normalized.ariaLabel = requireString(input.ariaLabel, "ariaLabel");
|
|
17
23
|
}
|
|
@@ -5,7 +5,7 @@ export interface SiteTreeNavProps {
|
|
|
5
5
|
ariaLabel?: string;
|
|
6
6
|
categoryOrder?: string[];
|
|
7
7
|
categoryIgnore?: string[];
|
|
8
|
-
/**
|
|
8
|
+
/** Exact full category slugs at any depth that should start collapsed. */
|
|
9
9
|
initiallyCollapsedCategorySlugs?: string[];
|
|
10
10
|
/** Locale used by dated note-tray rows. */
|
|
11
11
|
locale?: string;
|
|
@@ -91,7 +91,7 @@ function SiteTreeNav({
|
|
|
91
91
|
node,
|
|
92
92
|
depth: 0,
|
|
93
93
|
isLast,
|
|
94
|
-
|
|
94
|
+
initiallyCollapsedCategorySlugs: initiallyCollapsed,
|
|
95
95
|
locale,
|
|
96
96
|
dateFormats,
|
|
97
97
|
updatedLabel
|
|
@@ -108,7 +108,8 @@ function SiteTreeNav({
|
|
|
108
108
|
SiteTreeNav.displayName = "SiteTreeNav";
|
|
109
109
|
function NodeList({
|
|
110
110
|
nodes,
|
|
111
|
-
depth
|
|
111
|
+
depth,
|
|
112
|
+
initiallyCollapsedCategorySlugs
|
|
112
113
|
}) {
|
|
113
114
|
return /* @__PURE__ */ jsx(For, { each: nodes, by: (node) => node.slug, children: (node, index) => {
|
|
114
115
|
const isLast = computed(() => index.value === nodes.value.length - 1);
|
|
@@ -117,7 +118,7 @@ function NodeList({
|
|
|
117
118
|
{
|
|
118
119
|
when: computed(() => node.value.children.length > 0),
|
|
119
120
|
fallback: () => /* @__PURE__ */ jsx(LeafNode, { node, depth, isLast }),
|
|
120
|
-
children: () => /* @__PURE__ */ jsx(CategoryNode, { node, depth, isLast })
|
|
121
|
+
children: () => /* @__PURE__ */ jsx(CategoryNode, { node, depth, isLast, initiallyCollapsedCategorySlugs })
|
|
121
122
|
}
|
|
122
123
|
);
|
|
123
124
|
} });
|
|
@@ -126,12 +127,12 @@ function CategoryNode({
|
|
|
126
127
|
node,
|
|
127
128
|
depth,
|
|
128
129
|
isLast,
|
|
129
|
-
|
|
130
|
+
initiallyCollapsedCategorySlugs,
|
|
130
131
|
locale = "en",
|
|
131
132
|
dateFormats,
|
|
132
133
|
updatedLabel = "Updated"
|
|
133
134
|
}) {
|
|
134
|
-
const open = signal(initialCategoryOpenState(
|
|
135
|
+
const open = signal(initialCategoryOpenState(initiallyCollapsedCategorySlugs.has(node.value.slug)));
|
|
135
136
|
const toggle = () => {
|
|
136
137
|
open.value = toggleCategoryOpenState(open.value);
|
|
137
138
|
};
|
|
@@ -234,7 +235,7 @@ function CategoryNode({
|
|
|
234
235
|
when: computed(
|
|
235
236
|
() => node.value.shape === "note-tray" && depth === 0
|
|
236
237
|
),
|
|
237
|
-
fallback: () => /* @__PURE__ */ jsx(NodeList, { nodes: children, depth: depth + 1 }),
|
|
238
|
+
fallback: () => /* @__PURE__ */ jsx(NodeList, { nodes: children, depth: depth + 1, initiallyCollapsedCategorySlugs }),
|
|
238
239
|
children: () => /* @__PURE__ */ jsx(
|
|
239
240
|
NoteTrayNodeList,
|
|
240
241
|
{
|
|
@@ -314,6 +314,9 @@ html[data-theme-pack="drift"] a[data-nav-active] {
|
|
|
314
314
|
html[data-theme-pack="drift"] .zd-content h1 {
|
|
315
315
|
text-shadow: 0 0 34px color-mix(in oklch, var(--zd-accent) 32%, transparent);
|
|
316
316
|
}
|
|
317
|
+
html[data-theme-pack="drift"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
318
|
+
font-size: 1.6rem;
|
|
319
|
+
}
|
|
317
320
|
html[data-theme-pack="drift"] .zd-content h2 {
|
|
318
321
|
border-top-width: 1px;
|
|
319
322
|
border-image: linear-gradient(
|
|
@@ -323,6 +326,9 @@ html[data-theme-pack="drift"] .zd-content h2 {
|
|
|
323
326
|
)
|
|
324
327
|
1 !important;
|
|
325
328
|
}
|
|
329
|
+
html[data-theme-pack="drift"] .zd-content h3:where(:not(.zd-compact-prose *)) {
|
|
330
|
+
border-top-width: 1px;
|
|
331
|
+
}
|
|
326
332
|
|
|
327
333
|
/* links: airy underline that brightens on approach */
|
|
328
334
|
html[data-theme-pack="drift"] .zd-content a {
|
|
@@ -107,11 +107,17 @@ html[data-theme-pack="foundry"] .zd-content h1 {
|
|
|
107
107
|
padding-bottom: 0.55rem;
|
|
108
108
|
border-bottom: 1px solid color-mix(in srgb, var(--zd-muted) 42%, transparent);
|
|
109
109
|
}
|
|
110
|
+
html[data-theme-pack="foundry"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
111
|
+
font-size: 1.6rem;
|
|
112
|
+
}
|
|
110
113
|
html[data-theme-pack="foundry"] .zd-content h2 {
|
|
111
114
|
border-image: none !important;
|
|
112
115
|
border-top-width: 1px;
|
|
113
116
|
border-top-color: color-mix(in srgb, var(--zd-muted) 42%, transparent);
|
|
114
117
|
}
|
|
118
|
+
html[data-theme-pack="foundry"] .zd-content h3:where(:not(.zd-compact-prose *)) {
|
|
119
|
+
border-top-width: 1px;
|
|
120
|
+
}
|
|
115
121
|
|
|
116
122
|
/* inline code: neutral wash that holds up in both modes */
|
|
117
123
|
html[data-theme-pack="foundry"] .zd-content code:not(pre code) {
|
|
@@ -216,11 +216,17 @@ html[data-theme-pack="futura-editorial"] .zd-content > p[data-doc-description] {
|
|
|
216
216
|
fade (signature move #2). The h2 rule needs !important to defeat the
|
|
217
217
|
SSR-inlined `style="border-image:linear-gradient(...)"` (Decision
|
|
218
218
|
6.6's sole allowlisted carve-out). */
|
|
219
|
+
html[data-theme-pack="futura-editorial"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
220
|
+
font-size: 1.6rem;
|
|
221
|
+
}
|
|
219
222
|
html[data-theme-pack="futura-editorial"] .zd-content h2 {
|
|
220
223
|
border-image: none !important;
|
|
221
224
|
border-top-width: 1px;
|
|
222
225
|
border-top-color: var(--zd-fg);
|
|
223
226
|
}
|
|
227
|
+
html[data-theme-pack="futura-editorial"] .zd-content h3:where(:not(.zd-compact-prose *)) {
|
|
228
|
+
border-top-width: 1px;
|
|
229
|
+
}
|
|
224
230
|
html[data-theme-pack="futura-editorial"] .zd-content h3 {
|
|
225
231
|
font-family: var(--font-display);
|
|
226
232
|
letter-spacing: 0.01em;
|
|
@@ -264,6 +264,9 @@ html[data-theme-pack="hollow"] .zd-content h1 {
|
|
|
264
264
|
/* h2: the SSR-inlined gradient bar is re-pointed at a fading pink
|
|
265
265
|
rule (Decision 6.6's sole allowlisted !important carve-out —
|
|
266
266
|
border-image only) */
|
|
267
|
+
html[data-theme-pack="hollow"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
268
|
+
font-size: 1.5rem;
|
|
269
|
+
}
|
|
267
270
|
html[data-theme-pack="hollow"] .zd-content h2 {
|
|
268
271
|
border-image: linear-gradient(
|
|
269
272
|
to right,
|
|
@@ -281,6 +281,9 @@ html[data-theme-pack="ledger"] .zd-content h2 {
|
|
|
281
281
|
font-style: italic;
|
|
282
282
|
font-size: 1.6rem;
|
|
283
283
|
}
|
|
284
|
+
html[data-theme-pack="ledger"] .zd-content h3:where(:not(.zd-compact-prose *)) {
|
|
285
|
+
border-top-width: 1px;
|
|
286
|
+
}
|
|
284
287
|
html[data-theme-pack="ledger"] .zd-content h3 {
|
|
285
288
|
font-style: italic;
|
|
286
289
|
font-size: 1.3rem;
|
|
@@ -229,6 +229,9 @@ html[data-theme-pack="matcha"] .zd-content h2 {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
/* h3: quiet, slightly tracked (weight 600 rides --zdc-doc-h3-weight) */
|
|
232
|
+
html[data-theme-pack="matcha"] .zd-content h3:where(:not(.zd-compact-prose *)) {
|
|
233
|
+
border-top-width: 1px;
|
|
234
|
+
}
|
|
232
235
|
html[data-theme-pack="matcha"] .zd-content h3 {
|
|
233
236
|
letter-spacing: 0.01em;
|
|
234
237
|
}
|
|
@@ -422,6 +422,9 @@ html[data-theme-pack="observatory"] .zd-content > p[data-doc-description] {
|
|
|
422
422
|
allowlisted carve-out) + a zeroed border-top; the node-to-line rule
|
|
423
423
|
is then painted as a top-anchored background gradient, with the two
|
|
424
424
|
glowing star nodes as pseudo-element dots. */
|
|
425
|
+
html[data-theme-pack="observatory"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
426
|
+
font-size: 1.75rem;
|
|
427
|
+
}
|
|
425
428
|
html[data-theme-pack="observatory"] .zd-content h2 {
|
|
426
429
|
border-image: none !important;
|
|
427
430
|
border-top-width: 0;
|
|
@@ -284,6 +284,9 @@ html[data-theme-pack="sakura"] a[data-nav-active] {
|
|
|
284
284
|
into drifting transparency. Re-points the SSR-inlined
|
|
285
285
|
`style="border-image:linear-gradient(...)"` gradient — the
|
|
286
286
|
border-image !important carve-out (Decision 6.6). */
|
|
287
|
+
html[data-theme-pack="sakura"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
288
|
+
font-size: 1.6rem;
|
|
289
|
+
}
|
|
287
290
|
html[data-theme-pack="sakura"] .zd-content h2 {
|
|
288
291
|
border-top-width: 2px;
|
|
289
292
|
border-image: linear-gradient(
|
|
@@ -225,6 +225,9 @@ html[data-theme-pack="scandi"] .zd-content h2 {
|
|
|
225
225
|
border-top-width: 1px;
|
|
226
226
|
border-top-color: color-mix(in srgb, var(--zd-accent) 38%, transparent);
|
|
227
227
|
}
|
|
228
|
+
html[data-theme-pack="scandi"] .zd-content h3:where(:not(.zd-compact-prose *)) {
|
|
229
|
+
border-top-width: 1px;
|
|
230
|
+
}
|
|
228
231
|
|
|
229
232
|
/* links: sage ink with a soft sage underline that firms on hover */
|
|
230
233
|
html[data-theme-pack="scandi"] .zd-content a {
|
|
@@ -215,6 +215,9 @@ html[data-theme-pack="solar"] main nav[aria-label="Breadcrumb"] li > span {
|
|
|
215
215
|
bar is defeated with border-image none !important (Decision 6.6's
|
|
216
216
|
sole allowlisted carve-out) + a zeroed border-top; the fade is then
|
|
217
217
|
painted as a 2px top-anchored background gradient. */
|
|
218
|
+
html[data-theme-pack="solar"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
219
|
+
font-size: 1.5rem;
|
|
220
|
+
}
|
|
218
221
|
html[data-theme-pack="solar"] .zd-content h2 {
|
|
219
222
|
border-image: none !important;
|
|
220
223
|
border-top-width: 0;
|
|
@@ -219,6 +219,9 @@ html[data-theme-pack="tidepool"] a[data-nav-active] {
|
|
|
219
219
|
html[data-theme-pack="tidepool"] .zd-content h1 {
|
|
220
220
|
color: color-mix(in srgb, var(--zd-accent) 12%, var(--zd-fg));
|
|
221
221
|
}
|
|
222
|
+
html[data-theme-pack="tidepool"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
223
|
+
font-size: 1.5rem;
|
|
224
|
+
}
|
|
222
225
|
html[data-theme-pack="tidepool"] .zd-content h2 {
|
|
223
226
|
border-image: none !important;
|
|
224
227
|
border-top-width: 0;
|
|
@@ -314,6 +314,9 @@ html[data-theme-pack="washi"] .zd-content > p[data-doc-description] {
|
|
|
314
314
|
SSR-inlined `style="border-image:linear-gradient(...)"` — the
|
|
315
315
|
border-image !important carve-out (Decision 6.6), here re-pointing
|
|
316
316
|
the gradient rather than clearing it. */
|
|
317
|
+
html[data-theme-pack="washi"] .zd-content h2:where(:not(.zd-home-heading)):where(:not(.zd-compact-prose *)) {
|
|
318
|
+
font-size: 1.6rem;
|
|
319
|
+
}
|
|
317
320
|
html[data-theme-pack="washi"] .zd-content h2 {
|
|
318
321
|
border-top-width: 2px;
|
|
319
322
|
border-image: linear-gradient(
|
|
@@ -57,7 +57,7 @@ export interface SiteTreeNavProps {
|
|
|
57
57
|
ariaLabel?: string;
|
|
58
58
|
categoryOrder?: string[];
|
|
59
59
|
categoryIgnore?: string[];
|
|
60
|
-
/**
|
|
60
|
+
/** Exact full category slugs at any depth that should start collapsed. */
|
|
61
61
|
initiallyCollapsedCategorySlugs?: string[];
|
|
62
62
|
/** Locale used by dated note-tray rows. */
|
|
63
63
|
locale?: string;
|
|
@@ -129,7 +129,7 @@ export function SiteTreeNav({
|
|
|
129
129
|
node={node}
|
|
130
130
|
depth={0}
|
|
131
131
|
isLast={isLast}
|
|
132
|
-
|
|
132
|
+
initiallyCollapsedCategorySlugs={initiallyCollapsed}
|
|
133
133
|
locale={locale}
|
|
134
134
|
dateFormats={dateFormats}
|
|
135
135
|
updatedLabel={updatedLabel}
|
|
@@ -150,9 +150,11 @@ SiteTreeNav.displayName = "SiteTreeNav";
|
|
|
150
150
|
function NodeList({
|
|
151
151
|
nodes,
|
|
152
152
|
depth,
|
|
153
|
+
initiallyCollapsedCategorySlugs,
|
|
153
154
|
}: {
|
|
154
155
|
nodes: ReadonlySignal<readonly SidebarNavNode[]>;
|
|
155
156
|
depth: number;
|
|
157
|
+
initiallyCollapsedCategorySlugs: ReadonlySet<string>;
|
|
156
158
|
}) {
|
|
157
159
|
return (
|
|
158
160
|
<For each={nodes} by={(node) => node.slug}>
|
|
@@ -166,7 +168,7 @@ function NodeList({
|
|
|
166
168
|
)}
|
|
167
169
|
>
|
|
168
170
|
{() => (
|
|
169
|
-
<CategoryNode node={node} depth={depth} isLast={isLast} />
|
|
171
|
+
<CategoryNode node={node} depth={depth} isLast={isLast} initiallyCollapsedCategorySlugs={initiallyCollapsedCategorySlugs} />
|
|
170
172
|
)}
|
|
171
173
|
</Show>
|
|
172
174
|
);
|
|
@@ -179,7 +181,7 @@ function CategoryNode({
|
|
|
179
181
|
node,
|
|
180
182
|
depth,
|
|
181
183
|
isLast,
|
|
182
|
-
|
|
184
|
+
initiallyCollapsedCategorySlugs,
|
|
183
185
|
locale = "en",
|
|
184
186
|
dateFormats,
|
|
185
187
|
updatedLabel = "Updated",
|
|
@@ -187,12 +189,12 @@ function CategoryNode({
|
|
|
187
189
|
node: ReadonlySignal<SidebarNavNode>;
|
|
188
190
|
depth: number;
|
|
189
191
|
isLast: ReadonlySignal<boolean>;
|
|
190
|
-
|
|
192
|
+
initiallyCollapsedCategorySlugs: ReadonlySet<string>;
|
|
191
193
|
locale?: string;
|
|
192
194
|
dateFormats?: ResolvedDateFormats;
|
|
193
195
|
updatedLabel?: string;
|
|
194
196
|
}) {
|
|
195
|
-
const open = signal(initialCategoryOpenState(
|
|
197
|
+
const open = signal(initialCategoryOpenState(initiallyCollapsedCategorySlugs.has(node.value.slug)));
|
|
196
198
|
const toggle = () => {
|
|
197
199
|
open.value = toggleCategoryOpenState(open.value);
|
|
198
200
|
};
|
|
@@ -294,7 +296,7 @@ function CategoryNode({
|
|
|
294
296
|
() => node.value.shape === "note-tray" && depth === 0,
|
|
295
297
|
)}
|
|
296
298
|
fallback={() => (
|
|
297
|
-
<NodeList nodes={children} depth={depth + 1} />
|
|
299
|
+
<NodeList nodes={children} depth={depth + 1} initiallyCollapsedCategorySlugs={initiallyCollapsedCategorySlugs} />
|
|
298
300
|
)}
|
|
299
301
|
>
|
|
300
302
|
{() => (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zudo-doc",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "zudo-doc framework primitives layer that sits on top of zfb's engine — sidebar, theme, TOC, breadcrumb, layouts, head injection, View Transitions, SSR-skip wrappers (per ADR-003).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"url": "https://github.com/zudolab/zudo-doc/issues"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": ">=24
|
|
18
|
+
"node": ">=24"
|
|
19
19
|
},
|
|
20
20
|
"keywords": [
|
|
21
21
|
"zudo-doc",
|
|
@@ -734,12 +734,12 @@
|
|
|
734
734
|
"CHANGELOG.md"
|
|
735
735
|
],
|
|
736
736
|
"peerDependencies": {
|
|
737
|
-
"@modelcontextprotocol/sdk": "1.32.
|
|
737
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
738
738
|
"@takazudo/zdtp": "^0.5.2 || ^0.6.0 || ^0.7.0 || ^0.8.0",
|
|
739
|
-
"@takazudo/zfb": "^
|
|
740
|
-
"@takazudo/zfb-md-wasm": "^
|
|
741
|
-
"@takazudo/zfb-runtime": "^
|
|
742
|
-
"@takazudo/zudo-doc-history-server": "^
|
|
739
|
+
"@takazudo/zfb": "^5.0.1",
|
|
740
|
+
"@takazudo/zfb-md-wasm": "^5.0.1",
|
|
741
|
+
"@takazudo/zfb-runtime": "^5.0.1",
|
|
742
|
+
"@takazudo/zudo-doc-history-server": "^8.0.0",
|
|
743
743
|
"diff": "^8.0.0",
|
|
744
744
|
"katex": "^0.18.2 || ^0.19.0",
|
|
745
745
|
"zod": "^4.3.6"
|
|
@@ -777,11 +777,11 @@
|
|
|
777
777
|
"yaml": "^2.9.0"
|
|
778
778
|
},
|
|
779
779
|
"devDependencies": {
|
|
780
|
-
"@modelcontextprotocol/sdk": "1.32.
|
|
780
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
781
781
|
"@takazudo/mdx-formatter": "1.3.0",
|
|
782
|
-
"@takazudo/zfb": "
|
|
783
|
-
"@takazudo/zfb-md-wasm": "
|
|
784
|
-
"@takazudo/zfb-runtime": "
|
|
782
|
+
"@takazudo/zfb": "5.0.1",
|
|
783
|
+
"@takazudo/zfb-md-wasm": "5.0.1",
|
|
784
|
+
"@takazudo/zfb-runtime": "5.0.1",
|
|
785
785
|
"@types/fs-extra": "^11.0.4",
|
|
786
786
|
"@types/minimist": "^1.2.5",
|
|
787
787
|
"@types/node": "^25.3.5",
|
|
@@ -791,7 +791,7 @@
|
|
|
791
791
|
"typescript": "^5.0.0",
|
|
792
792
|
"vitest": "^4.1.0",
|
|
793
793
|
"zod": "^4.3.6",
|
|
794
|
-
"@takazudo/zudo-doc-history-server": "
|
|
794
|
+
"@takazudo/zudo-doc-history-server": "8.0.0"
|
|
795
795
|
},
|
|
796
796
|
"scripts": {
|
|
797
797
|
"gen:search-widget-script": "node scripts/gen-search-widget-script.mjs",
|