@takazudo/zudo-doc 0.2.11 → 0.2.13
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/dist/doclayout/doc-layout.js +3 -1
- package/dist/header/header.d.ts +9 -0
- package/dist/header/header.js +6 -3
- package/dist/header/nav-active.d.ts +27 -1
- package/dist/header/nav-active.js +9 -0
- package/dist/header/nav-overflow-script.js +103 -0
- package/dist/safelist.css +1 -1
- package/dist/toc/cx.d.ts +4 -5
- package/package.json +6 -6
|
@@ -43,7 +43,9 @@ function DocLayout(props) {
|
|
|
43
43
|
/* @__PURE__ */ jsx("title", { children: title }),
|
|
44
44
|
description !== void 0 && /* @__PURE__ */ jsx("meta", { name: "description", content: description }),
|
|
45
45
|
noindex && /* @__PURE__ */ jsx("meta", { name: "robots", content: "noindex, nofollow" }),
|
|
46
|
-
ClientRouter(
|
|
46
|
+
ClientRouter({
|
|
47
|
+
preserveHtmlAttrs: ["data-sidebar-hidden", "data-theme"]
|
|
48
|
+
}),
|
|
47
49
|
head
|
|
48
50
|
] }),
|
|
49
51
|
/* @__PURE__ */ jsxs("body", { class: "min-h-screen antialiased", children: [
|
package/dist/header/header.d.ts
CHANGED
|
@@ -36,6 +36,15 @@ interface HeaderProps {
|
|
|
36
36
|
currentPath?: string;
|
|
37
37
|
/** Optional active version slug. Forwarded into `navHref` for nav links. */
|
|
38
38
|
currentVersion?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The page's resolved "big category" (the host's nav section — see
|
|
41
|
+
* `getNavSectionForSlug`). When supplied, the header highlights the
|
|
42
|
+
* nav item whose `categoryMatch` (or a child's) equals this value,
|
|
43
|
+
* which is the authoritative "page is under this category" signal.
|
|
44
|
+
* Falls back to URL-path matching when omitted (home, 404, tag, and
|
|
45
|
+
* version pages carry no section).
|
|
46
|
+
*/
|
|
47
|
+
activeCategory?: string;
|
|
39
48
|
/**
|
|
40
49
|
* Children projected into the mobile `<SidebarToggle>` island —
|
|
41
50
|
* replaces the legacy `<slot name="sidebar" />`. Consumers pass the
|
package/dist/header/header.js
CHANGED
|
@@ -2,6 +2,7 @@ import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
|
2
2
|
import {
|
|
3
3
|
computeActiveNavPath,
|
|
4
4
|
isNavItemActive,
|
|
5
|
+
isNavItemActiveByCategory,
|
|
5
6
|
pathForMatch
|
|
6
7
|
} from "./nav-active.js";
|
|
7
8
|
import { NAV_OVERFLOW_SCRIPT } from "./nav-overflow-script.js";
|
|
@@ -11,6 +12,7 @@ function Header(props) {
|
|
|
11
12
|
lang,
|
|
12
13
|
currentPath = "",
|
|
13
14
|
currentVersion,
|
|
15
|
+
activeCategory,
|
|
14
16
|
sidebarSlot,
|
|
15
17
|
sidebarToggle,
|
|
16
18
|
themeToggle,
|
|
@@ -63,6 +65,7 @@ function Header(props) {
|
|
|
63
65
|
headerNav.map((item) => renderNavItem(
|
|
64
66
|
item,
|
|
65
67
|
activeNavPath,
|
|
68
|
+
activeCategory,
|
|
66
69
|
lang,
|
|
67
70
|
currentVersion,
|
|
68
71
|
urlHelpers,
|
|
@@ -123,8 +126,8 @@ function SidebarSlotFallback({
|
|
|
123
126
|
if (children === void 0 || children === null) return null;
|
|
124
127
|
return /* @__PURE__ */ jsx("span", { hidden: true, children });
|
|
125
128
|
}
|
|
126
|
-
function renderNavItem(item, activeNavPath, lang, currentVersion, urlHelpers, i18n) {
|
|
127
|
-
const isActive = isNavItemActive(item, activeNavPath);
|
|
129
|
+
function renderNavItem(item, activeNavPath, activeCategory, lang, currentVersion, urlHelpers, i18n) {
|
|
130
|
+
const isActive = isNavItemActiveByCategory(item, activeCategory) || isNavItemActive(item, activeNavPath);
|
|
128
131
|
const href = urlHelpers.navHref(item.path, lang, currentVersion);
|
|
129
132
|
const label = item.labelKey ? i18n.t(item.labelKey, lang) : item.label;
|
|
130
133
|
if (item.children && item.children.length > 0) {
|
|
@@ -176,7 +179,7 @@ function renderNavItem(item, activeNavPath, lang, currentVersion, urlHelpers, i1
|
|
|
176
179
|
/* @__PURE__ */ jsx("div", { class: "absolute left-0 top-full z-dropdown hidden group-hover:block group-focus-within:block pt-vsp-3xs", children: /* @__PURE__ */ jsx("div", { class: "min-w-[10rem] border border-muted rounded bg-surface shadow-lg py-vsp-3xs", children: item.children.map((child) => {
|
|
177
180
|
const childHref = urlHelpers.navHref(child.path, lang, currentVersion);
|
|
178
181
|
const childLabel = child.labelKey ? i18n.t(child.labelKey, lang) : child.label;
|
|
179
|
-
const childActive = activeNavPath === child.path;
|
|
182
|
+
const childActive = isNavItemActiveByCategory(child, activeCategory) || activeNavPath === child.path;
|
|
180
183
|
return /* @__PURE__ */ jsx(
|
|
181
184
|
"a",
|
|
182
185
|
{
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
/** Minimal shape the active-path resolver needs from a header nav item. */
|
|
2
2
|
interface NavItemLike {
|
|
3
3
|
path: string;
|
|
4
|
+
/**
|
|
5
|
+
* The "big category" this nav entry claims (mirrors the host's
|
|
6
|
+
* `getNavSectionForSlug` / sidebar `categoryMatch`). When the host knows
|
|
7
|
+
* which category the current page belongs to, category matching is
|
|
8
|
+
* preferred over URL-path heuristics — see `isNavItemActiveByCategory`.
|
|
9
|
+
*/
|
|
10
|
+
categoryMatch?: string;
|
|
4
11
|
children?: {
|
|
5
12
|
path: string;
|
|
13
|
+
categoryMatch?: string;
|
|
6
14
|
}[];
|
|
7
15
|
}
|
|
8
16
|
/**
|
|
@@ -24,5 +32,23 @@ declare function computeActiveNavPath(navItems: readonly NavItemLike[], pathForM
|
|
|
24
32
|
* `isNavItemActive` helper in the legacy template.
|
|
25
33
|
*/
|
|
26
34
|
declare function isNavItemActive(item: NavItemLike, activeNavPath: string | undefined): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Category-based active-state predicate. A nav entry is active when its
|
|
37
|
+
* own `categoryMatch` equals the page's resolved big category
|
|
38
|
+
* (`activeCategory`), or when any of its children claim that category.
|
|
39
|
+
*
|
|
40
|
+
* This is the authoritative "is the page under this big category?" check
|
|
41
|
+
* — it mirrors how the sidebar scopes its tree (`getNavSectionForSlug`),
|
|
42
|
+
* so the header highlight stays correct even when a category's page URLs
|
|
43
|
+
* do not share a prefix with the nav item's `path` (the case the older
|
|
44
|
+
* path-only heuristic missed). Callers prefer this over `isNavItemActive`
|
|
45
|
+
* and fall back to path matching when `activeCategory` is absent (e.g.
|
|
46
|
+
* home, 404, tag, and version pages, which carry no nav section).
|
|
47
|
+
*
|
|
48
|
+
* Works for both top-level items and child items: a child has no
|
|
49
|
+
* `children` of its own, so the call collapses to a single
|
|
50
|
+
* `categoryMatch` comparison.
|
|
51
|
+
*/
|
|
52
|
+
declare function isNavItemActiveByCategory(item: NavItemLike, activeCategory: string | undefined): boolean;
|
|
27
53
|
|
|
28
|
-
export { type NavItemLike, computeActiveNavPath, isNavItemActive, pathForMatch };
|
|
54
|
+
export { type NavItemLike, computeActiveNavPath, isNavItemActive, isNavItemActiveByCategory, pathForMatch };
|
|
@@ -22,8 +22,17 @@ function isNavItemActive(item, activeNavPath) {
|
|
|
22
22
|
if (item.children?.some((child) => activeNavPath === child.path)) return true;
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
25
|
+
function isNavItemActiveByCategory(item, activeCategory) {
|
|
26
|
+
if (activeCategory == null) return false;
|
|
27
|
+
if (item.categoryMatch === activeCategory) return true;
|
|
28
|
+
if (item.children?.some((child) => child.categoryMatch === activeCategory)) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
25
33
|
export {
|
|
26
34
|
computeActiveNavPath,
|
|
27
35
|
isNavItemActive,
|
|
36
|
+
isNavItemActiveByCategory,
|
|
28
37
|
pathForMatch
|
|
29
38
|
};
|
|
@@ -2,9 +2,112 @@ import { AFTER_NAVIGATE_EVENT } from "../transitions/page-events.js";
|
|
|
2
2
|
const NAV_OVERFLOW_SCRIPT = `(function () {
|
|
3
3
|
var cleanupNavOverflow = null;
|
|
4
4
|
|
|
5
|
+
function trimSlashes(p) {
|
|
6
|
+
while (p.length > 1 && p.charAt(p.length - 1) === "/") p = p.slice(0, -1);
|
|
7
|
+
return p || "/";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function navPathname(a) {
|
|
11
|
+
try { return trimSlashes(new URL(a.href, location.href).pathname); }
|
|
12
|
+
catch (e) { return ""; }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function isUnderPath(cur, p) {
|
|
16
|
+
if (!p) return false;
|
|
17
|
+
if (cur === p) return true;
|
|
18
|
+
return p !== "/" && cur.indexOf(p + "/") === 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Recompute which header nav item is "active" from the CURRENT URL and
|
|
22
|
+
// repaint the highlight. SSR sets the active item on first paint, but the
|
|
23
|
+
// header is persisted across same-locale client-router swaps
|
|
24
|
+
// (data-zfb-transition-persist), so without this the highlight would stay
|
|
25
|
+
// frozen on the page where the header was first rendered. Mirrors the
|
|
26
|
+
// sidebar island's client-side approach (match location.pathname against
|
|
27
|
+
// each entry's href) and the SSR longest-match + dropdown-parent rules.
|
|
28
|
+
// URL-based: hrefs and location.pathname both carry the base + locale
|
|
29
|
+
// prefix, so they compare directly without stripping.
|
|
30
|
+
function applyActiveNav() {
|
|
31
|
+
var nav = document.querySelector("[data-header-nav]");
|
|
32
|
+
if (!nav) return;
|
|
33
|
+
var topItems = Array.from(nav.querySelectorAll(":scope > [data-nav-item]"));
|
|
34
|
+
if (topItems.length === 0) return;
|
|
35
|
+
|
|
36
|
+
var cur = trimSlashes(location.pathname);
|
|
37
|
+
|
|
38
|
+
// Deepest (longest) nav path the current URL lives under, across both
|
|
39
|
+
// top-level and dropdown-child paths \u2014 matches computeActiveNavPath.
|
|
40
|
+
var activePath = "";
|
|
41
|
+
topItems.forEach(function (it) {
|
|
42
|
+
var isDropdown = it.hasAttribute("data-nav-item-dropdown");
|
|
43
|
+
var topA = isDropdown ? it.querySelector(":scope > a") : it;
|
|
44
|
+
if (topA) {
|
|
45
|
+
var tp = navPathname(topA);
|
|
46
|
+
if (isUnderPath(cur, tp) && tp.length > activePath.length) activePath = tp;
|
|
47
|
+
}
|
|
48
|
+
if (isDropdown) {
|
|
49
|
+
it.querySelectorAll(":scope > div a").forEach(function (c) {
|
|
50
|
+
var cp = navPathname(c);
|
|
51
|
+
if (isUnderPath(cur, cp) && cp.length > activePath.length) activePath = cp;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
function setTopActive(a, active) {
|
|
57
|
+
if (!a) return;
|
|
58
|
+
if (active) {
|
|
59
|
+
a.classList.add("bg-fg", "text-bg");
|
|
60
|
+
a.classList.remove("text-muted", "hover:underline", "focus:underline");
|
|
61
|
+
a.setAttribute("aria-current", "page");
|
|
62
|
+
} else {
|
|
63
|
+
a.classList.remove("bg-fg", "text-bg");
|
|
64
|
+
a.classList.add("text-muted", "hover:underline", "focus:underline");
|
|
65
|
+
a.removeAttribute("aria-current");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
topItems.forEach(function (it) {
|
|
70
|
+
var isDropdown = it.hasAttribute("data-nav-item-dropdown");
|
|
71
|
+
var topA = isDropdown ? it.querySelector(":scope > a") : it;
|
|
72
|
+
var topActive = false;
|
|
73
|
+
|
|
74
|
+
if (isDropdown) {
|
|
75
|
+
var parentMatch = !!topA && navPathname(topA) === activePath && activePath !== "";
|
|
76
|
+
var anyChild = false;
|
|
77
|
+
it.querySelectorAll(":scope > div a").forEach(function (c) {
|
|
78
|
+
var childActive = navPathname(c) === activePath && activePath !== "";
|
|
79
|
+
if (childActive) {
|
|
80
|
+
anyChild = true;
|
|
81
|
+
c.setAttribute("data-active", "");
|
|
82
|
+
c.classList.add("font-bold", "text-accent");
|
|
83
|
+
c.classList.remove("text-fg");
|
|
84
|
+
} else {
|
|
85
|
+
c.removeAttribute("data-active");
|
|
86
|
+
c.classList.remove("font-bold", "text-accent");
|
|
87
|
+
c.classList.add("text-fg");
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
topActive = parentMatch || anyChild;
|
|
91
|
+
var svg = topA ? topA.querySelector("svg") : null;
|
|
92
|
+
if (svg) {
|
|
93
|
+
if (topActive) { svg.classList.add("text-bg"); svg.classList.remove("text-muted"); }
|
|
94
|
+
else { svg.classList.add("text-muted"); svg.classList.remove("text-bg"); }
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
topActive = activePath !== "" && navPathname(topA) === activePath;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
setTopActive(topA, topActive);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
5
104
|
function initNavOverflow() {
|
|
6
105
|
if (cleanupNavOverflow) cleanupNavOverflow();
|
|
7
106
|
|
|
107
|
+
// Repaint the active highlight for the current URL before measuring /
|
|
108
|
+
// cloning, so the overflow "\xB7\xB7\xB7" menu mirrors the correct active state.
|
|
109
|
+
applyActiveNav();
|
|
110
|
+
|
|
8
111
|
var nav = document.querySelector("[data-header-nav]");
|
|
9
112
|
var moreContainer = document.querySelector("[data-nav-more]");
|
|
10
113
|
var moreMenu = document.querySelector("[data-nav-more-menu]");
|
package/dist/safelist.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* generated by gen-safelist.mjs — do not edit by hand */
|
|
2
|
-
@source inline("-mb-px [&::-webkit-details-marker]:hidden [&_a]:text-accent [&_a]:underline [&_nav]:mb-0 [doc-history-meta] [doc-layout] a a2 abbr above absent absolute active actual after after-breadcrumb after-content after-sidebar after-title against agent agents ai-chat ai-chat-trigger align-top all allow-same-origin allow-scripts alone already already-executed an anchor anchored and announce antialiased any application/json applies apply-css-vars are area arg aria-controls aria-current aria-disabled aria-expanded aria-haspopup aria-hidden aria-label aria-live aria-orientation aria-pressed aria-selected aria-valuemax aria-valuemin aria-valuenow arrows article as asc aside assets assigning assistant async at attach attribute attributes available await away b back backdrop:bg-bg/80 background backtick backticks baked banner bare based be because before below between bg bg-[#fff] bg-accent bg-bg bg-code-bg bg-fg bg-info/10 bg-muted bg-surface bg-transparent bg-warning/10 bg-warning/5 bi bigint bin blank blanks blob block blockquote blocks blur body body-end-components body-end-scripts boolean bootstrap border border-accent border-b border-b-2 border-b-[5px] border-collapse border-fg border-l border-l-[3px] border-muted border-none border-r border-t border-t-[2px] border-t-[3px] border-transparent border-warning/30 both br breadcrumb:end breadcrumb:start break-words browser browsers btn bundler but button buttons by cached caller can cancellation cannot canonical caption cases cat-nav- catch category catppuccin-latte caught change changes checkbox child ci circle cite class class-less claude claude-agents claude-commands claude-md claude-skills cleaned clear clear-css-vars clearing click client clip close code code-block-sr-announce col col-resize colgroup collision color color-scheme color-scheme-changed color-scheme-provider color-tweak colorization colors command commands commit component component:github-link component:language-switcher component:search component:theme-toggle component:version-switcher computed concrete configuration configure configured consumer consumes container containers containing content content-type content-wrapper:end content-wrapper:start contents controller converts copy correct correctly corrupt covered covers crashes crumb- cs css cursor cursor-not-allowed cursor-pointer custom dark data-active data-group-id data-header data-header-logo data-header-nav data-header-right data-mermaid-rendered data-mermaid-src data-nav-item data-nav-item-dropdown data-nav-more data-nav-more-menu data-nav-more-toggle data-processed data-sidebar-resizer data-tab-btn data-tab-default data-tab-label data-tab-value data-tabs data-taglist-group data-testid data-theme data-theme/style data-variant data-version-banner data-version-menu data-version-switcher data-version-toggle data-zfb-transition-persist dd decimal declare decoration-muted default defaults del desc description design design-token-panel design-token-trigger desktop desktop-sidebar destructive detached details deterministic dfn diagram diagrams dialog dieser directories directory disc display:none dist div dl doc doc-card- doc-history doc-history-generate does drag draggable drop dropdown dropdowns dt duration-150 duration-200 during dynamically e2e each earlier edge el element elements els else em emit emitting empty empty/undefined en entities entries entry error escape even eventually every exactly exit expected failed fall fallback falls false fast feed fg fieldset figcaption figure file fill fills finally fire fires first fixed fixtures flex flex-1 flex-col flex-wrap flip flipping flips focus focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2 focus-visible:underline focus:underline font font-bold font-medium font-mono font-semibold footer for form free fresh from frontmatter frontmatter-preview full function further g gap-[clamp(1.5rem,3vw,4rem)] gap-hsp-2xs gap-hsp-sm gap-hsp-xs gap-vsp-lg gap-vsp-xs gap-x-hsp-2xs gap-x-hsp-lg gap-x-hsp-md gap-x-hsp-sm gap-x-hsp-xs gap-y-vsp-2xs gap-y-vsp-lg gap-y-vsp-md gap-y-vsp-xs gaps gate generate generation genuine geometry get github github-link go got graph gray-matter grid grid-cols-1 group group-focus-visible:underline group-focus-within:block group-hover:bg-fg group-hover:block group-hover:text-bg group-hover:underline group-open:rotate-90 guard h-[0.5rem] h-[0.875rem] h-[1.575rem] h-[1lh] h-[3.5rem] h-[calc(100vh-3.5rem)] h-icon-sm h-icon-xs h1 h2 h3 h4 h5 h6 hand handle handled handlers has hash-link have head head-links head-scripts header header-call:end header-call:start height here hex hidden highlighter history hit horizontal host hover:bg-[color-mix(in_srgb,var(--color-surface)_80%,var(--color-fg)_20%)] hover:bg-accent-hover hover:bg-accent/10 hover:border-accent hover:border-accent-hover hover:border-fg hover:text-accent hover:text-accent-hover hover:text-fg hover:underline hr html i i2 i3 i4 identical if iframe img import imports in index inherit initial initialised inline inline-block inline-flex input ins inset-0 inside instanceof instructions intent into inverse invoke is it italic item- items items-center items-start itself javascript justify-between justify-center justify-end kbd keep keeps kept keydown khroma label landing language-switcher last:border-b-0 later launch leading-relaxed leading-snug leading-tight leaf- leaves leaving left left-0 left:calc legend legitimate lg lg:block lg:flex lg:grid-cols-[repeat(auto-fit,minmax(12rem,1fr))] lg:ml-[var(--zd-sidebar-w)] lg:pt-vsp-2xl lg:px-hsp-2xl lg:py-vsp-2xl li li2 light like likely line link link- list-disc list-none listener literal lives llms llms-txt load local look lostpointercapture luminance m m-0 main make maps mark marks matching max-h-[80vh] max-w-[46rem] max-w-[80rem] max-w-[clamp(50rem,75vw,90rem)] max-w-full max-w-none may mb-0 mb-vsp-2xs mb-vsp-lg mb-vsp-md mb-vsp-sm mb-vsp-xl mb-vsp-xs measures menu merged mermaid message meta metadata min-h-[calc(100vh-3.5rem)] min-h-screen min-w-0 min-w-[10rem] min-w-[8rem] mirror missing ml-auto ml-hsp-2xl ml-hsp-lg ml-hsp-sm ml-hsp-xl mod mode mounted mouseenter mouseleave mt-0 mt-vsp-2xs mt-vsp-3xs mt-vsp-lg mt-vsp-sm mt-vsp-xl must mutates mutation mutations mx-auto my-vsp-lg my-vsp-md name named native nav nav-card- navigating navigation navigations near needs new next no no-underline node node:fs node:module node:path nodes nofollow noindex non-empty non-string none noopener noreferrer normal not not-object note now null number object observe observer occurred of og:description og:image og:title og:type og:url ol old older on once one only opacity-60 option or other others out overflow overflow-auto overflow-hidden overflow-x-auto overflow-y-auto overflow-y:auto own p p-0 p-hsp-lg p-hsp-md p-hsp-sm p-hsp-xl packages padding page page-loading-overlay page-loading-spinner page-navigate-end pages paint panel panels parent parse parsed pass path pb-vsp-xl per permanently pi pick picked picks pins pipelines pl-[1.25rem] pl-hsp-lg pl-hsp-sm pl-hsp-xl place plus pointer-events-none pointercancel pointerdown pointermove pointerup polite polyline populates port position position:fixed pr-hsp-lg pr-hsp-md pr-hsp-xl pre preact preact/hooks preact/jsx-runtime preload pres produced produces production propagating properties property proxy pt-vsp-3xs pt-vsp-md pt-vsp-sm pt-vsp-xl pt-vsp-xs ptag- public purely px px-hsp-lg px-hsp-md px-hsp-sm px-hsp-xl px-hsp-xs py-0 py-hsp-2xs py-hsp-sm py-hsp-xs py-vsp-2xs py-vsp-3xs py-vsp-md py-vsp-sm py-vsp-xl py-vsp-xs q r raw re-encode/decode re-render re-renders re-run re-selects reach reached reaches read reading ready real real-value references refreshes regenerate regenerates reinit reinits relative remains remove render rendered renders reorder repeated replaced replaces repopulate requires reserved resize resize-x resolve resolved resolves return returns right- right-0 ro robots role root rotate-180 rotate-90 round round-trip rounded rounded-full rounded-lg router running runs runtime s safer samp schema-mismatch schema-missing script script-eval script-evaluation scripts scroll scrollbar scrolled scrollend search section section- see sel-bg sel-fg select select-none self-start separator server server-rendered set sets shadow-[0_1px_3px_color-mix(in_srgb,var(--color-fg)_8%,transparent)] shadow-lg shared shiki ships should show shown shrink-0 sidebar signal single sitemap- size skill skills skips slash slug sm:flex-row sm:grid-cols-2 sm:items-center sm:justify-between small snapshot snapshots so soft soft-nav solid some source space-y-vsp-2xs spacing span spans spec specifiers sr-only src stale stay sticky still stored stray string strip stroke-linecap stroke-linejoin stroke-width strong style style-attribute styles stylesheet sub subagents subsequent success summary sup support survives svg synchronous synchronously syntactically syntect tab tab-panel tabindex table tablist tabpanel tabs tabs-container tabs-content tabs-nav tag- tag-item- tbody td temp temp-element template temporary temporary-element test-results text text-accent text-bg text-body text-caption text-center text-code-fg text-fg text-heading text-info text-left text-micro text-muted text-muted/50 text-small text-title text-warning textarea tfoot th that the thead their them theme theme-color theme-toggle theme/token then there these they this through time title to toggle toggle-ai-chat toggle-design-token-panel toggles token tokens tolerates too top-0 top-[3.5rem] top-full total touches tr tracked tracking-wider trade-off transition transition-[background,color,border-color] transition-colors transition-transform treats tree-child- tree-item- tree-top- trick trigger trigger:ai-chat trigger:design-token-panel triggers true try twitter:card twitter:creator twitter:description twitter:image twitter:site twitter:title two u ul unavailable unchanged undefined under underline understand unknown unmaintained unobserve unreadable unrelated unreleased unreliable unset unsupported up uppercase use used uses utf-8 utf8 utilities v val value value-reader values var variable version- version-menu version-switcher vertical via video viewport visible vitesse-dark w w-[0.5rem] w-[0.875rem] w-[1.575rem] w-[16px] w-[280px] w-[var(--zd-sidebar-w)] w-full w-icon-sm w-icon-xs was watching wbr wbr- we what when where whereas whether which while whitespace-nowrap whitespace-pre whole will with without word working worktrees would wrap wrapper wrappers written wrote xl:flex xl:hidden y-scrollbar yet z-dropdown z-sidebar z-toolbar zd-content zd-doc-content-band zd-html-preview-code zd-sidebar-content-wrapper zfb zfb:after-swap zfb:before-preparation zudo-doc-design-tokens/v1 zudo-doc-sidebar-width zudo-doc-theme zudo-doc-theme-bridge");
|
|
2
|
+
@source inline("-mb-px [&::-webkit-details-marker]:hidden [&_a]:text-accent [&_a]:underline [&_nav]:mb-0 [doc-history-meta] [doc-layout] a a2 abbr above absent absolute across active actual after after-breadcrumb after-content after-sidebar after-title against agent agents ai-chat ai-chat-trigger align-top all allow-same-origin allow-scripts alone already already-executed an anchor anchored and announce antialiased any application/json applies apply-css-vars approach are area arg aria-controls aria-current aria-disabled aria-expanded aria-haspopup aria-hidden aria-label aria-live aria-orientation aria-pressed aria-selected aria-valuemax aria-valuemin aria-valuenow arrows article as asc aside assets assigning assistant async at attach attribute attributes available await away b back backdrop:bg-bg/80 background backtick backticks baked banner bare base based be because before below between bg bg-[#fff] bg-accent bg-bg bg-code-bg bg-fg bg-info/10 bg-muted bg-surface bg-transparent bg-warning/10 bg-warning/5 bi bigint bin blank blanks blob block blockquote blocks blur body body-end-components body-end-scripts boolean bootstrap border border-accent border-b border-b-2 border-b-[5px] border-collapse border-fg border-l border-l-[3px] border-muted border-none border-r border-t border-t-[2px] border-t-[3px] border-transparent border-warning/30 both br breadcrumb:end breadcrumb:start break-words browser browsers btn bundler but button buttons by cached caller can cancellation cannot canonical caption carry cases cat-nav- catch category catppuccin-latte caught change changes checkbox child ci circle cite class class-less claude claude-agents claude-commands claude-md claude-skills cleaned clear clear-css-vars clearing click client client-router client-side clip close code code-block-sr-announce col col-resize colgroup collision color color-scheme color-scheme-changed color-scheme-provider color-tweak colorization colors command commands commit compare component component:github-link component:language-switcher component:search component:theme-toggle component:version-switcher computed concrete configuration configure configured consumer consumes container containers containing content content-type content-wrapper:end content-wrapper:start contents controller converts copy correct correctly corrupt covered covers cp crashes crumb- cs css cur current cursor cursor-not-allowed cursor-pointer custom dark data-active data-group-id data-header data-header-logo data-header-nav data-header-right data-mermaid-rendered data-mermaid-src data-nav-item data-nav-item-dropdown data-nav-more data-nav-more-menu data-nav-more-toggle data-processed data-sidebar-hidden data-sidebar-resizer data-tab-btn data-tab-default data-tab-label data-tab-value data-tabs data-taglist-group data-testid data-theme data-theme/style data-variant data-version-banner data-version-menu data-version-switcher data-version-toggle data-zfb-transition-persist dd decimal declare decoration-muted default defaults del desc description design design-token-panel design-token-trigger desktop desktop-sidebar destructive detached details deterministic dfn diagram diagrams dialog dieser directly directories directory disc display:none dist div dl doc doc-card- doc-history doc-history-generate does drag draggable drop dropdown dropdown-child dropdown-parent dropdowns dt duration-150 duration-200 during dynamically e2e each earlier edge el element elements els else em emit emitting empty empty/undefined en entities entries entry error escape even eventually every exactly exit expected failed fall fallback falls false fast feed fg fieldset figcaption figure file fill fills finally fire fires first fixed fixtures flex flex-1 flex-col flex-wrap flip flipping flips focus focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2 focus-visible:underline focus:underline font font-bold font-medium font-mono font-semibold footer for form free fresh from frontmatter frontmatter-preview frozen full function further g gap-[clamp(1.5rem,3vw,4rem)] gap-hsp-2xs gap-hsp-sm gap-hsp-xs gap-vsp-lg gap-vsp-xs gap-x-hsp-2xs gap-x-hsp-lg gap-x-hsp-md gap-x-hsp-sm gap-x-hsp-xs gap-y-vsp-2xs gap-y-vsp-lg gap-y-vsp-md gap-y-vsp-xs gaps gate generate generation genuine geometry get github github-link go got graph gray-matter grid grid-cols-1 group group-focus-visible:underline group-focus-within:block group-hover:bg-fg group-hover:block group-hover:text-bg group-hover:underline group-open:rotate-90 guard h-[0.5rem] h-[0.875rem] h-[1.575rem] h-[1lh] h-[3.5rem] h-[calc(100vh-3.5rem)] h-icon-sm h-icon-xs h1 h2 h3 h4 h5 h6 hand handle handled handlers has hash-link have head head-links head-scripts header header-call:end header-call:start height here hex hidden highlight highlighter history hit horizontal host hover:bg-[color-mix(in_srgb,var(--color-surface)_80%,var(--color-fg)_20%)] hover:bg-accent-hover hover:bg-accent/10 hover:border-accent hover:border-accent-hover hover:border-fg hover:text-accent hover:text-accent-hover hover:text-fg hover:underline hr hrefs html i i2 i3 i4 identical if iframe img import imports in index inherit initial initialised inline inline-block inline-flex input ins inset-0 inside instanceof instructions intent into inverse invoke is it italic item item- items items-center items-start itself javascript justify-between justify-center justify-end kbd keep keeps kept keydown khroma label landing language-switcher last:border-b-0 later launch leading-relaxed leading-snug leading-tight leaf- leaves leaving left left-0 left:calc legend legitimate lg lg:block lg:flex lg:grid-cols-[repeat(auto-fit,minmax(12rem,1fr))] lg:ml-[var(--zd-sidebar-w)] lg:pt-vsp-2xl lg:px-hsp-2xl lg:py-vsp-2xl li li2 light like likely line link link- list-disc list-none listener literal lives llms llms-txt load local locale longest-match look lostpointercapture luminance m m-0 main make maps mark marks matches matching max-h-[80vh] max-w-[46rem] max-w-[80rem] max-w-[clamp(50rem,75vw,90rem)] max-w-full max-w-none may mb-0 mb-vsp-2xs mb-vsp-lg mb-vsp-md mb-vsp-sm mb-vsp-xl mb-vsp-xs measures measuring menu merged mermaid message meta metadata min-h-[calc(100vh-3.5rem)] min-h-screen min-w-0 min-w-[10rem] min-w-[8rem] mirror mirrors missing ml-auto ml-hsp-2xl ml-hsp-lg ml-hsp-sm ml-hsp-xl mod mode mounted mouseenter mouseleave mt-0 mt-vsp-2xs mt-vsp-3xs mt-vsp-lg mt-vsp-sm mt-vsp-xl must mutates mutation mutations mx-auto my-vsp-lg my-vsp-md name named native nav nav-card- navigating navigation navigations near needs new next no no-underline node node:fs node:module node:path nodes nofollow noindex non-empty non-string none noopener noreferrer normal not not-object note now null number object observe observer occurred of og:description og:image og:title og:type og:url ol old older on once one only opacity-60 option or other others out overflow overflow-auto overflow-hidden overflow-x-auto overflow-y-auto overflow-y:auto own p p-0 p-hsp-lg p-hsp-md p-hsp-sm p-hsp-xl packages padding page page-loading-overlay page-loading-spinner page-navigate-end pages paint panel panels parent parse parsed pass path paths pb-vsp-xl per permanently persisted pi pick picked picks pins pipelines pl-[1.25rem] pl-hsp-lg pl-hsp-sm pl-hsp-xl place plus pointer-events-none pointercancel pointerdown pointermove pointerup polite polyline populates port position position:fixed pr-hsp-lg pr-hsp-md pr-hsp-xl pre preact preact/hooks preact/jsx-runtime preload pres produced produces production propagating properties property proxy pt-vsp-3xs pt-vsp-md pt-vsp-sm pt-vsp-xl pt-vsp-xs ptag- public purely px px-hsp-lg px-hsp-md px-hsp-sm px-hsp-xl px-hsp-xs py-0 py-hsp-2xs py-hsp-sm py-hsp-xs py-vsp-2xs py-vsp-3xs py-vsp-md py-vsp-sm py-vsp-xl py-vsp-xs q r raw re-encode/decode re-render re-renders re-run re-selects reach reached reaches read reading ready real real-value references refreshes regenerate regenerates reinit reinits relative remains remove render rendered renders reorder repaint repeated replaced replaces repopulate requires reserved resize resize-x resolve resolved resolves return returns right- right-0 ro robots role root rotate-180 rotate-90 round round-trip rounded rounded-full rounded-lg router running runs runtime s safer same-locale samp schema-mismatch schema-missing script script-eval script-evaluation scripts scroll scrollbar scrolled scrollend search section section- see sel-bg sel-fg select select-none self-start separator server server-rendered set sets shadow-[0_1px_3px_color-mix(in_srgb,var(--color-fg)_8%,transparent)] shadow-lg shared shiki ships should show shown shrink-0 sidebar signal single sitemap- size skill skills skips slash slug sm:flex-row sm:grid-cols-2 sm:items-center sm:justify-between small snapshot snapshots so soft soft-nav solid some source space-y-vsp-2xs spacing span spans spec specifiers sr-only src stale stay sticky still stored stray string strip stroke-linecap stroke-linejoin stroke-width strong style style-attribute styles stylesheet sub subagents subsequent success summary sup support survives svg swaps synchronous synchronously syntactically syntect tab tab-panel tabindex table tablist tabpanel tabs tabs-container tabs-content tabs-nav tag- tag-item- tbody td temp temp-element template temporary temporary-element test-results text text-accent text-bg text-body text-caption text-center text-code-fg text-fg text-heading text-info text-left text-micro text-muted text-muted/50 text-small text-title text-warning textarea tfoot th that the thead their them theme theme-color theme-toggle theme/token then there these they this through time title to toggle toggle-ai-chat toggle-design-token-panel toggles token tokens tolerates too top-0 top-[3.5rem] top-full top-level total touches tp tr tracked tracking-wider trade-off transition transition-[background,color,border-color] transition-colors transition-transform treats tree-child- tree-item- tree-top- trick trigger trigger:ai-chat trigger:design-token-panel triggers true try twitter:card twitter:creator twitter:description twitter:image twitter:site twitter:title two u ul unavailable unchanged undefined under underline understand unknown unmaintained unobserve unreadable unrelated unreleased unreliable unset unsupported up uppercase use used uses utf-8 utf8 utilities v val value value-reader values var variable version- version-menu version-switcher vertical via video viewport visible vitesse-dark w w-[0.5rem] w-[0.875rem] w-[1.575rem] w-[16px] w-[280px] w-[var(--zd-sidebar-w)] w-full w-icon-sm w-icon-xs was watching wbr wbr- we what when where whereas whether which while whitespace-nowrap whitespace-pre whole will with without word working worktrees would wrap wrapper wrappers written wrote xl:flex xl:hidden y-scrollbar yet z-dropdown z-sidebar z-toolbar zd-content zd-doc-content-band zd-html-preview-code zd-sidebar-content-wrapper zfb zfb:after-swap zfb:before-preparation zudo-doc-design-tokens/v1 zudo-doc-sidebar-width zudo-doc-theme zudo-doc-theme-bridge");
|
package/dist/toc/cx.d.ts
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Tiny `clsx`-style class name joiner. Accepts strings, falsy values,
|
|
3
3
|
* and arrays/objects of the same — only truthy strings survive.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* primitives use; see clsx for the full feature set.
|
|
5
|
+
* Framework primitives keep their dependency surface minimal so that a
|
|
6
|
+
* downstream consumer of `@takazudo/zudo-doc/toc` does not need an extra
|
|
7
|
+
* runtime dep just for class name composition. The behavior here is the
|
|
8
|
+
* subset the TOC primitives use; see `clsx` for the full feature set.
|
|
10
9
|
*/
|
|
11
10
|
type ClassValue = string | number | bigint | boolean | null | undefined | ClassValue[] | {
|
|
12
11
|
[key: string]: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zudo-doc",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
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",
|
|
@@ -165,11 +165,11 @@
|
|
|
165
165
|
],
|
|
166
166
|
"peerDependencies": {
|
|
167
167
|
"preact": "^10.29.1",
|
|
168
|
-
"@takazudo/zfb": "^0.1.0-next.
|
|
169
|
-
"@takazudo/zfb-runtime": "^0.1.0-next.
|
|
168
|
+
"@takazudo/zfb": "^0.1.0-next.53",
|
|
169
|
+
"@takazudo/zfb-runtime": "^0.1.0-next.53",
|
|
170
170
|
"@takazudo/zdtp": "^0.2.3",
|
|
171
171
|
"shiki": "^4.0.2",
|
|
172
|
-
"@takazudo/zudo-doc-history-server": "^0.2.
|
|
172
|
+
"@takazudo/zudo-doc-history-server": "^0.2.13"
|
|
173
173
|
},
|
|
174
174
|
"peerDependenciesMeta": {
|
|
175
175
|
"@takazudo/zudo-doc-history-server": {
|
|
@@ -194,8 +194,8 @@
|
|
|
194
194
|
"tsup": "^8.0.0",
|
|
195
195
|
"typescript": "^5.0.0",
|
|
196
196
|
"vitest": "^4.1.0",
|
|
197
|
-
"@takazudo/zfb": "0.1.0-next.
|
|
198
|
-
"@takazudo/zfb-runtime": "0.1.0-next.
|
|
197
|
+
"@takazudo/zfb": "0.1.0-next.53",
|
|
198
|
+
"@takazudo/zfb-runtime": "0.1.0-next.53"
|
|
199
199
|
},
|
|
200
200
|
"scripts": {
|
|
201
201
|
"build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 tsup",
|