@takazudo/zudo-doc 2.2.2 → 2.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/dist/chrome/index.d.ts +1 -0
- package/dist/chrome/index.js +4 -1
- package/dist/doc-content-header/index.d.ts +4 -0
- package/dist/doc-content-header/index.js +8 -0
- package/dist/factory-context/index.d.ts +26 -0
- package/dist/home-page/index.d.ts +51 -0
- package/dist/home-page/index.js +124 -0
- package/dist/home-page/prepare-home-data.d.ts +46 -0
- package/dist/home-page/prepare-home-data.js +37 -0
- package/dist/integrations/doc-history/pre-build.js +11 -33
- package/dist/plugins/routes.js +28 -1
- package/dist/preset.d.ts +9 -0
- package/dist/routes/_chrome.d.ts +1 -1
- package/dist/routes/_chrome.js +6 -2
- package/dist/routes/index.js +6 -109
- package/dist/routes/locale-index.js +6 -117
- package/dist/safelist.css +1 -1
- package/dist/settings.d.ts +34 -0
- package/package.json +10 -5
- package/routes-src/_chrome.tsx +16 -0
- package/routes-src/_virtual.d.ts +15 -0
- package/routes-src/index.tsx +11 -117
- package/routes-src/locale-index.tsx +15 -123
|
@@ -1,28 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { loadCategoryMeta } from "../sidebar-tree/index.js";
|
|
6
|
-
import {
|
|
7
|
-
settings,
|
|
8
|
-
getLocaleConfig,
|
|
9
|
-
t,
|
|
10
|
-
withBase,
|
|
11
|
-
resolveNavSource,
|
|
12
|
-
buildNavTree,
|
|
13
|
-
groupSatelliteNodes,
|
|
14
|
-
getCategoryOrder,
|
|
15
|
-
collectTags,
|
|
16
|
-
docsUrl,
|
|
17
|
-
toRouteSlug
|
|
18
|
-
} from "./_context.js";
|
|
19
|
-
import {
|
|
20
|
-
HeadWithDefaults,
|
|
21
|
-
HeaderWithDefaults,
|
|
22
|
-
FooterWithDefaults,
|
|
23
|
-
BodyEndIslands,
|
|
24
|
-
composeMetaTitle
|
|
25
|
-
} from "./_chrome.js";
|
|
1
|
+
import { jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { settings, routeCtx } from "./_context.js";
|
|
3
|
+
import { prepareHomeData } from "../home-page/prepare-home-data.js";
|
|
4
|
+
import { HomePageView } from "./_chrome.js";
|
|
26
5
|
const frontmatter = { title: "Home" };
|
|
27
6
|
function paths() {
|
|
28
7
|
return Object.keys(settings.locales).map((locale) => ({
|
|
@@ -32,98 +11,8 @@ function paths() {
|
|
|
32
11
|
}
|
|
33
12
|
function LocaleIndexPage({ params }) {
|
|
34
13
|
const locale = params.locale;
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
throw new Error(`LocaleIndexPage: locale "${locale}" is not configured in settings.locales`);
|
|
38
|
-
}
|
|
39
|
-
const { navDocs } = resolveNavSource(locale, void 0, {
|
|
40
|
-
applyDefaultLocaleOnlyFilter: true,
|
|
41
|
-
keepUnlisted: true
|
|
42
|
-
});
|
|
43
|
-
const categoryMeta = loadCategoryMeta(cfg.dir);
|
|
44
|
-
const tree = buildNavTree(navDocs, locale, categoryMeta, (slug, loc) => docsUrl(slug, loc));
|
|
45
|
-
const categoryOrder = getCategoryOrder();
|
|
46
|
-
const groupedTree = groupSatelliteNodes(tree, categoryOrder);
|
|
47
|
-
const tagCount = collectTags(
|
|
48
|
-
navDocs.filter((d) => !d.data.category_no_page),
|
|
49
|
-
(id, data) => data.slug ?? toRouteSlug(id)
|
|
50
|
-
).size;
|
|
51
|
-
const ctaNav = settings.headerNav[0] ?? null;
|
|
52
|
-
const overview = ctaNav ? withBase(`/${locale}${ctaNav.path}`) : null;
|
|
53
|
-
const logoUrl = withBase("/img/logo.svg");
|
|
54
|
-
return /* @__PURE__ */ jsxs(
|
|
55
|
-
DocLayoutWithDefaults,
|
|
56
|
-
{
|
|
57
|
-
title: composeMetaTitle(settings.siteName),
|
|
58
|
-
head: /* @__PURE__ */ jsx(HeadWithDefaults, { title: settings.siteName }),
|
|
59
|
-
lang: locale,
|
|
60
|
-
noindex: settings.noindex,
|
|
61
|
-
hideSidebar: true,
|
|
62
|
-
hideToc: true,
|
|
63
|
-
sidebarOverride: /* @__PURE__ */ jsx(Fragment, {}),
|
|
64
|
-
headerOverride: /* @__PURE__ */ jsx(HeaderWithDefaults, { lang: locale, currentPath: withBase(`/${locale}/`) }),
|
|
65
|
-
footerOverride: /* @__PURE__ */ jsx(FooterWithDefaults, { lang: locale }),
|
|
66
|
-
bodyEndComponents: /* @__PURE__ */ jsx(BodyEndIslands, { basePath: settings.base ?? "/" }),
|
|
67
|
-
enableClientRouter: settings.dynamicPageTransition,
|
|
68
|
-
children: [
|
|
69
|
-
/* @__PURE__ */ jsx("div", { class: "flex justify-center mb-vsp-xl", children: /* @__PURE__ */ jsxs("div", { class: "flex flex-col items-center text-center gap-hsp-md lg:flex-row lg:text-left lg:gap-hsp-xl", children: [
|
|
70
|
-
/* @__PURE__ */ jsx(
|
|
71
|
-
"div",
|
|
72
|
-
{
|
|
73
|
-
class: "w-[320px] max-w-full aspect-[1200/630] bg-fg shrink-0",
|
|
74
|
-
style: {
|
|
75
|
-
WebkitMask: `url(${logoUrl}) center/contain no-repeat`,
|
|
76
|
-
mask: `url(${logoUrl}) center/contain no-repeat`
|
|
77
|
-
},
|
|
78
|
-
"aria-hidden": "true"
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
82
|
-
/* @__PURE__ */ jsx("h1", { class: "text-heading font-bold mb-vsp-2xs", children: settings.siteName }),
|
|
83
|
-
/* @__PURE__ */ jsx("p", { class: "text-muted text-small mb-vsp-sm", children: settings.siteDescription }),
|
|
84
|
-
/* @__PURE__ */ jsxs("div", { class: "flex items-center justify-center lg:justify-start gap-hsp-md text-small", children: [
|
|
85
|
-
overview && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
86
|
-
/* @__PURE__ */ jsx("a", { href: overview, class: "text-fg underline hover:text-accent", children: t("nav.overview", locale) }),
|
|
87
|
-
/* @__PURE__ */ jsx("span", { class: "text-muted", children: "/" })
|
|
88
|
-
] }),
|
|
89
|
-
settings.githubUrl && /* @__PURE__ */ jsx(
|
|
90
|
-
"a",
|
|
91
|
-
{
|
|
92
|
-
href: settings.githubUrl,
|
|
93
|
-
class: "inline-flex items-center gap-[0.3em] text-fg underline hover:text-accent",
|
|
94
|
-
target: "_blank",
|
|
95
|
-
rel: "noopener noreferrer",
|
|
96
|
-
children: "GitHub"
|
|
97
|
-
}
|
|
98
|
-
)
|
|
99
|
-
] })
|
|
100
|
-
] })
|
|
101
|
-
] }) }),
|
|
102
|
-
Island({
|
|
103
|
-
when: "idle",
|
|
104
|
-
children: /* @__PURE__ */ jsx(
|
|
105
|
-
SiteTreeNav,
|
|
106
|
-
{
|
|
107
|
-
tree: groupedTree,
|
|
108
|
-
categoryOrder,
|
|
109
|
-
categoryIgnore: ["inbox", "develop"]
|
|
110
|
-
}
|
|
111
|
-
)
|
|
112
|
-
}),
|
|
113
|
-
settings.docTags && tagCount > 0 && /* @__PURE__ */ jsxs("section", { class: "mt-vsp-xl", children: [
|
|
114
|
-
/* @__PURE__ */ jsx("h2", { class: "text-title font-bold mb-vsp-md", children: t("doc.allTags", locale) }),
|
|
115
|
-
/* @__PURE__ */ jsx(
|
|
116
|
-
"a",
|
|
117
|
-
{
|
|
118
|
-
href: withBase(`/${locale}/docs/tags`),
|
|
119
|
-
class: "text-accent underline hover:text-accent-hover",
|
|
120
|
-
children: t("doc.allTags", locale)
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
] })
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
);
|
|
14
|
+
const { tree, categoryOrder, tagCount } = prepareHomeData(routeCtx, locale);
|
|
15
|
+
return /* @__PURE__ */ jsx(HomePageView, { locale, tree, categoryOrder, tagCount });
|
|
127
16
|
}
|
|
128
17
|
export {
|
|
129
18
|
LocaleIndexPage as default,
|
package/dist/safelist.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* generated by gen-safelist.mjs — do not edit by hand */
|
|
2
|
-
@source inline("-link -mb-px -ml-hsp-sm -noscript -translate-x-full 2xl:w-[24px] [&::-webkit-details-marker]:hidden [&_a]:text-accent [&_a]:underline [&_nav]:mb-0 [data-admonition] [data-kbd-shortcut] [doc-history-meta] [doc-history] [doc-layout] [llms-txt] a a2 abbr about above absent absolute accent across activated active actual added admonition admonition- admonition-body admonition-title admonition/callout after after-breadcrumb after-content after-navigate after-sidebar after-title against agent agents ai-chat ai-chat-md ai-chat-trigger alert align-top all allow-same-origin allow-scripts alone already already-executed already-picked an anchor anchored and and/or animate-spin announce antialiased any application/json application/xml applies apply-css-vars approach are area arg aria-atomic aria-busy 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 arm arms arrive arrows article as asc aside aspect-[1200/630] aspect-square asset- assets assistant async at attach attribute attributes auto autogenerated available avoid await away b back backdrop:bg-bg/30 backdrop:bg-bg/80 backdrop:bg-overlay/60 backdrop:z-modal-backdrop background background-color backtick backticks baked banner bare base base64 based batch be because before below best between bg bg-[#fff] bg-accent bg-bg bg-chat-assistant-bg bg-chat-user-bg bg-code-bg bg-fg bg-info/10 bg-info/5 bg-muted bg-overlay/30 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 bold boolean bootstrap border border-accent border-b border-b-2 border-b-[5px] border-bg/30 border-collapse border-danger border-dashed border-fg border-info/30 border-l border-l-0 border-l-[3px] border-left-width border-muted border-none border-r border-radius border-solid border-t border-t-[2px] border-t-[3px] border-transparent border-warning/30 border-width border-y both bottom-vsp-xl box-border br brand breadcrumb:end breadcrumb:start break-words browser browsers btn bug build bundler but button buttons by bypassed byte-identical bytes cached call caller calls can cancellation cannot canonical canvas caption card card-grid carry cases cat-nav- catch category catppuccin-latte caught caution center center/contain ch chains change changed changes checkbox child chrome 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 clobbering close closed closing code code-block-sr-announce code-group code-group-panel col col-resize colgroup collision color color-scheme color-scheme-changed color-scheme-provider color-tweak colorization colors column comma command commands commit compare component component:github-link component:language-switcher component:search component:theme-toggle component:version-switcher compute computed concrete configuration configure configured confuse connect const consumer consumes container containers containing content content-admonition content-link content-type content-wrapper:end content-wrapper:start contents context controller controls converts copy corners correct correctly corrupt count covered covers cp crashes created cross-component crumb- cs css ctx cur current cursor cursor-not-allowed cursor-pointer custom danger dark data data-active data-admonition data-base data-close-search data-group-id data-header data-header-logo data-header-nav data-header-right data-kbd-shortcut data-loading-index data-mermaid-enlarge-ready data-mermaid-rendered data-mermaid-src data-nav-active data-nav-item data-nav-item-dropdown data-nav-more data-nav-more-menu data-nav-more-toggle data-no-results data-open-search data-pan-active data-processed data-result-count-template data-search-count data-search-count-narrow data-search-dialog data-search-input data-search-placeholder data-search-results data-search-unavailable data-sidebar-hidden data-sidebar-resizer data-site-nav 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-zd-nosidebar data-zd-toc data-zfb-transition-persist dd debounced decimal declare decoration decoration-muted default defaults del delegated dependency depth desc description design design-token-panel design-token-trigger desktop desktop-sidebar desktop-sidebar-toggle desktop-sidebar-toggle-island destructive detach detached details deterministic develop dfn diagram diagrams dialog dieser diff diff-line-added diff-line-content diff-line-empty diff-line-num diff-line-removed diff-row dir directly directories directory disabled disabled:opacity-50 disc display:none dist distinct div dl do doc doc-card- doc-content-band doc-history doc-history-generate doc-history-panel doc-history-trigger doc-page doc-pager doc-prose doc-title docs docs- docs-v- document document-level documented does double-registration drag draggable drop dropdown dropdown-child dropdown-parent dropdowns dt duration-150 duration-200 during dynamically e e2e each ease-in-out edge eject ejected el element elements els else em emit emitting empty empty/undefined en enable end enlarged entire entities entries entry error escape escaped even eventually every exactly excerpt excludes existing exists exit expected export extends factories failed fall fallback fallbacks falls false family fast feature feed fg fields fieldset figcaption figure file fill fills finally find fire fires first fixed fixed-width fixtures flag flash flat flex flex-1 flex-col flex-wrap flip flipping flips flush-left focus focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2 focus-visible:underline focus:border-accent focus:outline-none focus:underline font font-bold font-family font-medium font-mono font-semibold font-weight footer footer- for form found free fresh from frontmatter frontmatter-preview frozen fs-extra full fully function further g gap-[0.3em] gap-[clamp(1.5rem,3vw,4rem)] gap-hsp-2xs gap-hsp-md gap-hsp-sm gap-hsp-xl gap-hsp-xs gap-vsp-2xs gap-vsp-lg gap-vsp-md 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 grid-cols-2 group group-focus-visible:text-accent group-focus-visible:underline group-focus-within:block group-hover:bg-fg group-hover:block group-hover:text-accent group-hover:text-bg group-hover:underline group-open:rotate-90 guard h-[0.5rem] h-[0.625rem] h-[0.875rem] h-[1.125rem] h-[1.25rem] h-[1.575rem] h-[14px] h-[1lh] h-[2rem] h-[3.5rem] h-[3rem] h-[90vh] h-[calc(100%-3rem)] h-[calc(100vh-3.5rem)] h-dvh h-full h-icon-lg h-icon-md h-icon-sm h-icon-xs h1 h1s h2 h2s h3 h4 h5 h6 half hand handle handled handler handlers has hash-link have head head-links head-scripts header header- header-call:end header-call:start heading heading-h2 heading-h3 heading-h4 headings 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:bg-surface hover:border-accent hover:border-accent-hover hover:border-fg hover:text-accent hover:text-accent-hover hover:text-fg hover:underline hr href hrefs html i i18n/theme. i2 i3 i4 icon identical idle idx if iframe image image-enlarge image/png img import important imports in inactive inbox includes index index-load info inherit inherited initial initialised injected inline inline-block inline-flex inner input input-clear ins inset-0 inside install instance instanceof instead instructions intended intent into invalid inverse inversion invoke is issues it italic item item- items items-baseline items-center items-start its itself javascript justify-between justify-center justify-end justify-start katex kbd keep keeps kept keyboard keyboard-shortcut keydown keystroke keywords khroma label landing language-switcher last:border-b-0 later launch layout leading-relaxed leading-snug leading-tight leaf- leak leaves leaving left left-0 left:calc legend legitimate letter-spacing lg lg:block lg:border lg:border-fg lg:border-solid lg:flex lg:flex-col lg:flex-row lg:gap-hsp-xl lg:grid-cols-[repeat(auto-fit,minmax(12rem,1fr))] lg:h-[90vh] lg:hidden lg:justify-start lg:m-auto lg:max-h-[90vh] lg:max-w-[52.5rem] lg:ml-[var(--zd-sidebar-w)] lg:pt-vsp-2xl lg:px-hsp-2xl lg:py-vsp-2xl lg:text-left lg:w-[90vw] lg:w-[clamp(16rem,25%,22rem)] li li2 library light like likely line linger link link- links list-disc list-none listener literal literals lives llms llms-txt load local locale locales log longest-match look lostpointercapture lower lowercased luminance m m-0 m21 m6 main make malformed malicious maps mark marks matches matching math math-display math-inline max max-h-[80vh] max-h-[85vh] max-h-[90vh] max-h-full max-h-none max-w-[46rem] max-w-[85%] max-w-[85vw] max-w-[90vw] max-w-[clamp(50rem,75vw,90rem)] max-w-full max-w-none max-width may mb-0 mb-vsp-2xs mb-vsp-lg mb-vsp-md mb-vsp-sm mb-vsp-xl mb-vsp-xs measures measuring mechanism menu merged mermaid message messages meta meta-knob metadata migration min-h-[60vh] 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 mr-hsp-sm mt-0 mt-vsp-2xl mt-vsp-2xs mt-vsp-3xs mt-vsp-lg mt-vsp-md mt-vsp-sm mt-vsp-xl must mutates mutation mutations mx-auto my-vsp-lg my-vsp-md name native nav nav-active nav-card- nav/doc navigating navigation navigations near needs nested new newly-swapped next no no-enlarge no-op no-repeat no-underline node node:buffer node:fs node:fs/promises node:module node:path nodes nofollow noindex non-empty non-light-dark non-persisted non-string none noopener noreferrer normal noscript not not-object note now null number numeric object object-contain observe observer occurred of off og:description og:image og:image:alt og:image:height og:image:width og:title og:type og:url ol old older on once one only onto opacity-60 open open/close option or original other others out outline-none over overflow overflow-auto overflow-hidden overflow-x-auto overflow-y-auto overflow-y:auto overwrite own p p-0 p-hsp-lg p-hsp-md p-hsp-sm p-hsp-xl package package-owned packages padding page page-loading page-loading-overlay page-loading-spinner page-navigate-end page-title pages pages/. paint paint-and-read pan panel panels paren-balance-aware parent parse parsed pass passed passes path paths pattern pb-[50vh] pb-vsp-md pb-vsp-xl pb-vsp-xs per per-call per-link permanently persisted pi pick picked picks picocolors pins pipelines pl-[1.25rem] pl-hsp-lg pl-hsp-sm pl-hsp-xl place placeholder placeholder:text-muted plain plural plus pnpm pointer-events-none pointercancel pointerdown pointermove pointerup polite polygon polyline populates port position position:fixed pr-[4px] pr-hsp-lg pr-hsp-md pr-hsp-sm pr-hsp-xl pre pre-lowercased preact preact/compat preact/hooks preact/jsx-runtime preconnect prefix preload pres preserved preserving print produce produced produces production project properties property props prose provided proxy pt-[0.15rem] pt-[2px] pt-vsp-3xs pt-vsp-md pt-vsp-sm pt-vsp-xl pt-vsp-xs ptag- public purely px px-hsp-2xl px-hsp-2xs px-hsp-lg px-hsp-md px-hsp-sm px-hsp-xl px-hsp-xs py-0 py-[2px] py-[calc(var(--spacing-vsp-xs)+0.15rem)] py-hsp-2xs py-hsp-sm py-hsp-xs py-vsp-2xs py-vsp-3xs py-vsp-lg py-vsp-md py-vsp-sm py-vsp-xl py-vsp-xs q query question r radius raw re-encode/decode re-lowercase re-querying re-render re-renders re-run re-running re-selects reach reached reaches read reading reads ready real real-value received receives recorded recovers redefine ref- references refetch refreshes regenerate regenerates regex reinit reinits relative reload remove removed render rendered renders reorder repaint repeated repeating replaced replaces repopulate requires reserved resize resize-x resolve resolved resolves response restore restores result result-click results results-area retry return returns revision revisions rewrite right right- right-0 ro robots role root rotate-180 rotate-90 round round-trip rounded rounded-[0.75rem] rounded-bl-[0.25rem] rounded-bl-[1rem] rounded-br-[0.25rem] rounded-br-[1rem] rounded-full rounded-lg rounded-t-[1rem] rounds route router routes routes-src running runs runtime s safe safer same same-locale samp scale scanned schema-mismatch schema-missing scheme score scored script script- script-eval script-evaluation script-injection scripts scroll scrollbar scrolled scrollend search search-index searched section section- see sel-bg sel-fg select select-none self self-start semibold sentinel separator serialised serialize server server-rendered set sets setting setup shadow-[0_1px_3px_color-mix(in_srgb,var(--color-fg)_8%,transparent)] shadow-lg shape share shared sharing shiki ship ships short shortcut should show shown shrink-0 sidebar sidebar- sidebar-toggle-island sidebar-tree-island signal similarity single singular site-search site-tree-nav-island sitemap- sites size skill skills skipping skips slash slug sm:border sm:border-muted sm:flex-row sm:grid-cols-2 sm:h-auto sm:items-center sm:justify-between sm:max-h-[80vh] sm:max-w-[52rem] sm:mx-auto sm:my-[10vh] sm:rounded-lg small smooth snapshot snapshots so soft soft-nav solid some somehow source sources space-y-vsp-2xs spacing span spans spec specifier specifiers splitter square sr-only src stale start state status stay sticky still stop stored stray string strings strip stripe stroke-linecap stroke-linejoin stroke-width strong stronger style style-attribute styled styles stylesheet sub subagents subsequent success successful summary sup surfaces survives svg swap swapped swaps synchronous synchronously syntactically syntect t tab tab-item tab-panel tabindex table tablist tabpanel tabs tabs-container tabs-content tabs-nav tag tag- tag-item- tags tags:audit take tbody td temp-element template temporary temporary-element terminal terms test-results text text-accent text-bg text-body text-caption text-center text-chat-assistant-text text-chat-user-text text-code-fg text-danger text-decoration text-display text-fg text-heading text-info text-left text-micro text-muted text-muted/50 text-right text-small text-title text-warning text/plain textarea tfoot th that the thead their them theme theme-color theme-toggle theme/token then there these they this through throw tighten time tip title to toc toggle toggle-ai-chat toggle-design-token-panel toggles token tokens tolerates too toolbar 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-[left,color] transition-colors transition-transform translate-x-0 translations transparent treats tree tree-child- tree-item- tree-top- trigger trigger:ai-chat trigger:design-token-panel triggers true truncate truncated try turn twitter:card twitter:creator twitter:description twitter:image twitter:site twitter:title two type typography u ul unavailable unchanged undefined under underline underlines understand unknown unmaintained unobserve unreadable unrelated unreleased unset unsupported up uppercase usage use used user uses utf-8 utf8 utilities utility v v2 val value value-reader values var variable variant version version- version-menu version-switcher vertical via video viewport virtual:zudo-doc-route-context visible vitesse-dark vocabulary w w-1/2 w-[0.5rem] w-[0.625rem] w-[0.875rem] w-[1.125rem] w-[1.575rem] w-[1.5rem] w-[1.75rem] w-[14px] w-[16px] w-[16rem] w-[18px] w-[280px] w-[2rem] w-[320px] w-[90vw] w-[var(--zd-sidebar-w)] w-dvw w-full w-icon-lg w-icon-md w-icon-sm w-icon-xs want warning was watching wbr wbr- we website weight went were what when where whereas whether which while whitespace-nowrap whitespace-pre whole wide-gamut width will with without word working worktrees would wrap wrapper wrappers written wrong wrote xl:flex xl:hidden y-scrollbar yet you your z-dropdown z-local-1 z-modal z-modal-backdrop z-sidebar z-toolbar zd-content zd-desktop-sidebar-toggle zd-doc-content-band zd-enlarge-btn zd-enlarge-dialog zd-enlarge-dialog-close zd-enlargeable zd-html-preview-code zd-mermaid-dialog zd-mermaid-enlargeable zd-mermaid-tool-btn zd-mermaid-toolbar zd-mermaid-transform zd-mermaid-viewport zd-sidebar-content-wrapper zd-sidebar-open zfb zfb:after-swap zfb:before-preparation zod zoom zudo-doc-design-tokens/v1 zudo-doc-sidebar-visible zudo-doc-sidebar-width zudo-doc-theme zudo-doc-theme-bridge");
|
|
2
|
+
@source inline("-link -mb-px -ml-hsp-sm -noscript -translate-x-full 2xl:w-[24px] [&::-webkit-details-marker]:hidden [&_a]:text-accent [&_a]:underline [&_nav]:mb-0 [data-admonition] [data-kbd-shortcut] [doc-history-meta] [doc-history] [doc-layout] [llms-txt] a a2 abbr about above absent absolute accent across activated active actual added admonition admonition- admonition-body admonition-title admonition/callout after after-breadcrumb after-content after-navigate after-sidebar after-title against agent agents ai-chat ai-chat-md ai-chat-trigger alert align-top all allow-same-origin allow-scripts alone already already-executed already-picked an anchor anchored and and/or animate-spin announce antialiased any application/json application/xml applies apply-css-vars approach are area arg aria-atomic aria-busy 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 arm arms arrive arrows article as asc aside aspect-[1200/630] aspect-square asset- assets assistant async at attach attribute attributes auto autogenerated available avoid await away b back backdrop:bg-bg/30 backdrop:bg-bg/80 backdrop:bg-overlay/60 backdrop:z-modal-backdrop background background-color backtick backticks baked banner bare base base64 based batch be because before below best between bg bg-[#fff] bg-accent bg-bg bg-chat-assistant-bg bg-chat-user-bg bg-code-bg bg-fg bg-info/10 bg-info/5 bg-muted bg-overlay/30 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 bold boolean bootstrap border border-accent border-b border-b-2 border-b-[5px] border-bg/30 border-collapse border-danger border-dashed border-fg border-info/30 border-l border-l-0 border-l-[3px] border-left-width border-muted border-none border-r border-radius border-solid border-t border-t-[2px] border-t-[3px] border-transparent border-warning/30 border-width border-y both bottom-vsp-xl box-border br brand breadcrumb:end breadcrumb:start break-words browser browsers btn bug build bundler but button buttons by bypassed byte-identical bytes cached call caller calls can cancellation cannot canonical canvas caption card card-grid carry cases cat-nav- catch category catppuccin-latte caught caution center center/contain ch chains change changed changes checkbox child chrome 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 clobbering close closed closing code code-block-sr-announce code-group code-group-panel col col-resize colgroup collision color color-scheme color-scheme-changed color-scheme-provider color-tweak colorization colors column comma command commands commit compare component component:github-link component:language-switcher component:search component:theme-toggle component:version-switcher compute computed concrete configuration configure configured confuse connect const consumer consumes container containers containing content content-admonition content-link content-type content-wrapper:end content-wrapper:start contents context controller controls converts copy corners correct correctly corrupt count covered covers cp crashes created cross-component crumb- cs css ctx cur current cursor cursor-not-allowed cursor-pointer custom danger dark data data-active data-admonition data-base data-close-search data-group-id data-header data-header-logo data-header-nav data-header-right data-kbd-shortcut data-loading-index data-mermaid-enlarge-ready data-mermaid-rendered data-mermaid-src data-nav-active data-nav-item data-nav-item-dropdown data-nav-more data-nav-more-menu data-nav-more-toggle data-no-results data-open-search data-pan-active data-processed data-result-count-template data-search-count data-search-count-narrow data-search-dialog data-search-input data-search-placeholder data-search-results data-search-unavailable data-sidebar-hidden data-sidebar-resizer data-site-nav 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-zd-nosidebar data-zd-toc data-zfb-transition-persist dd debounced decimal declare decoration decoration-muted default defaults del delegated dependency depth desc description design design-token-panel design-token-trigger desktop desktop-sidebar desktop-sidebar-toggle desktop-sidebar-toggle-island destructive detach detached details deterministic develop dfn diagram diagrams dialog dieser diff diff-line-added diff-line-content diff-line-empty diff-line-num diff-line-removed diff-row dir directly directories directory disabled disabled:opacity-50 disc display:none dist distinct div dl do doc doc-card- doc-content-band doc-history doc-history-generate doc-history-panel doc-history-trigger doc-page doc-pager doc-prose doc-title docs docs- docs-v- document document-level documented does double-registration drag draggable drop dropdown dropdown-child dropdown-parent dropdowns dt duration-150 duration-200 during dynamically e e2e each ease-in-out edge eject ejected el element elements els else em emit emitting empty empty/undefined en enable end enlarged entire entities entries entry error escape escaped even eventually every exactly excerpt excludes existing exists exit expected export extends factories failed fall fallback fallbacks falls false family fast feature feed fg fields fieldset figcaption figure file fill fills finally find fire fires first fixed fixed-width fixtures flag flash flat flex flex-1 flex-col flex-wrap flip flipping flips flush-left focus focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2 focus-visible:underline focus:border-accent focus:outline-none focus:underline font font-bold font-family font-medium font-mono font-semibold font-weight footer footer- for form found free fresh from frontmatter frontmatter-preview frozen fs-extra full fully function further g gap-[0.3em] gap-[clamp(1.5rem,3vw,4rem)] gap-hsp-2xs gap-hsp-md gap-hsp-sm gap-hsp-xl gap-hsp-xs gap-vsp-2xs gap-vsp-lg gap-vsp-md 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 grid-cols-2 group group-focus-visible:text-accent group-focus-visible:underline group-focus-within:block group-hover:bg-fg group-hover:block group-hover:text-accent group-hover:text-bg group-hover:underline group-open:rotate-90 guard h-[0.5rem] h-[0.625rem] h-[0.875rem] h-[1.125rem] h-[1.25rem] h-[1.575rem] h-[14px] h-[1em] h-[1lh] h-[2rem] h-[3.5rem] h-[3rem] h-[90vh] h-[calc(100%-3rem)] h-[calc(100vh-3.5rem)] h-dvh h-full h-icon-lg h-icon-md h-icon-sm h-icon-xs h1 h1s h2 h2s h3 h4 h5 h6 half hand handle handled handler handlers has hash-link have head head-links head-scripts header header- header-call:end header-call:start heading heading-h2 heading-h3 heading-h4 headings 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:bg-surface hover:border-accent hover:border-accent-hover hover:border-fg hover:text-accent hover:text-accent-hover hover:text-fg hover:underline hr href hrefs html i i18n/theme. i2 i3 i4 icon identical idle idx if iframe image image-enlarge image/png img import important imports in inactive inbox includes index index-load info inherit inherited initial initialised injected inline inline-block inline-flex inner input input-clear ins inset-0 inside install instance instanceof instead instructions intended intent into invalid inverse inversion invoke is issues it italic item item- items items-baseline items-center items-start its itself javascript justify-between justify-center justify-end justify-start katex kbd keep keeps kept keyboard keyboard-shortcut keydown keystroke keywords khroma label landing language-switcher last:border-b-0 later launch layout leading-relaxed leading-snug leading-tight leaf- leak leaves leaving left left-0 left:calc legend legitimate letter-spacing lg lg:block lg:border lg:border-fg lg:border-solid lg:flex lg:flex-col lg:flex-row lg:gap-hsp-xl lg:grid-cols-[repeat(auto-fit,minmax(12rem,1fr))] lg:h-[90vh] lg:hidden lg:justify-start lg:m-auto lg:max-h-[90vh] lg:max-w-[52.5rem] lg:ml-[var(--zd-sidebar-w)] lg:pt-vsp-2xl lg:px-hsp-2xl lg:py-vsp-2xl lg:text-left lg:w-[90vw] lg:w-[clamp(16rem,25%,22rem)] li li2 library light like likely line linger link link- links list-disc list-none listener literal literals lives llms llms-txt load local locale locales log longest-match look lostpointercapture lower lowercased luminance m m-0 m21 m6 main make malformed malicious maps mark marks matches matching math math-display math-inline max max-h-[80vh] max-h-[85vh] max-h-[90vh] max-h-full max-h-none max-w-[46rem] max-w-[85%] max-w-[85vw] max-w-[90vw] max-w-[clamp(50rem,75vw,90rem)] max-w-full max-w-none max-width may mb-0 mb-vsp-2xs mb-vsp-lg mb-vsp-md mb-vsp-sm mb-vsp-xl mb-vsp-xs measures measuring mechanism menu merged mermaid message messages meta meta-knob metadata migration min-h-[60vh] 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 module mounted mouseenter mouseleave mr-hsp-sm mt-0 mt-vsp-2xl mt-vsp-2xs mt-vsp-3xs mt-vsp-lg mt-vsp-md mt-vsp-sm mt-vsp-xl must mutates mutation mutations mx-auto my-vsp-lg my-vsp-md name named native nav nav-active nav-card- nav/doc navigating navigation navigations near needs nested new newly-swapped next no no-enlarge no-op no-repeat no-underline node node:buffer node:fs node:fs/promises node:module node:path nodes nofollow noindex non-empty non-light-dark non-persisted non-string none noopener noreferrer normal noscript not not-object note now null number numeric object object-contain observe observer occurred of off og:description og:image og:image:alt og:image:height og:image:width og:title og:type og:url ol old older on once one only onto opacity-60 open open/close option or original other others out outline-none over overflow overflow-auto overflow-hidden overflow-x-auto overflow-y-auto overflow-y:auto overwrite own p p-0 p-hsp-lg p-hsp-md p-hsp-sm p-hsp-xl package package-owned packages padding page page-loading page-loading-overlay page-loading-spinner page-navigate-end page-title pages pages/. paint paint-and-read pan panel panels paren-balance-aware parent parse parsed pass passed passes path paths pattern pb-[50vh] pb-vsp-md pb-vsp-xl pb-vsp-xs per per-call per-link permanently persisted pi pick picked picks picocolors pins pipelines pl-[1.25rem] pl-hsp-lg pl-hsp-sm pl-hsp-xl place placeholder placeholder:text-muted plain plural plus pnpm pointer-events-none pointercancel pointerdown pointermove pointerup polite polygon polyline populates port position position:fixed pr-[4px] pr-hsp-lg pr-hsp-md pr-hsp-sm pr-hsp-xl pre pre-lowercased preact preact/compat preact/hooks preact/jsx-runtime preconnect prefix preload pres preserved preserving print produce produced produces production project project-root-relative properties property props prose provided proxy pt-[0.15rem] pt-[2px] pt-vsp-3xs pt-vsp-md pt-vsp-sm pt-vsp-xl pt-vsp-xs ptag- public purely px px-hsp-2xl px-hsp-2xs px-hsp-lg px-hsp-md px-hsp-sm px-hsp-xl px-hsp-xs py-0 py-[2px] py-[calc(var(--spacing-vsp-xs)+0.15rem)] py-hsp-2xs py-hsp-sm py-hsp-xs py-vsp-2xs py-vsp-3xs py-vsp-lg py-vsp-md py-vsp-sm py-vsp-xl py-vsp-xs q query question r radius raw re-encode/decode re-lowercase re-querying re-render re-renders re-run re-running re-selects reach reached reaches read reading reads ready real real-value received receives recorded recovers redefine ref- references refetch refreshes regenerate regenerates regex reinit reinits relative reload remove removed render rendered renders reorder repaint repeated repeating replaced replaces repopulate requires reserved resize resize-x resolve resolved resolves response restore restores result result-click results results-area retry return returns revision revisions rewrite right right- right-0 ro robots role root rotate-180 rotate-90 round round-trip rounded rounded-[0.75rem] rounded-bl-[0.25rem] rounded-bl-[1rem] rounded-br-[0.25rem] rounded-br-[1rem] rounded-full rounded-lg rounded-t-[1rem] rounds route router routes routes-src running runs runtime s safe safer same same-locale samp scale scanned schema-mismatch schema-missing scheme score scored script script- script-eval script-evaluation script-injection scripts scroll scrollbar scrolled scrollend search search-index searched section section- see sel-bg sel-fg select select-none self self-start semibold sentinel separator serialised serialize server server-rendered set sets setting setup shadow-[0_1px_3px_color-mix(in_srgb,var(--color-fg)_8%,transparent)] shadow-lg shape share shared sharing shiki ship ships short shortcut should show shown shrink-0 sidebar sidebar- sidebar-toggle-island sidebar-tree-island signal similarity single singular site-search site-tree-nav-island sitemap- sites size skill skills skipping skips slash slug sm:border sm:border-muted sm:flex-row sm:grid-cols-2 sm:h-auto sm:items-center sm:justify-between sm:max-h-[80vh] sm:max-w-[52rem] sm:mx-auto sm:my-[10vh] sm:rounded-lg small smooth snapshot snapshots so soft soft-nav solid some somehow source sources space-y-vsp-2xs spacing span spans spec specifier specifiers splitter square sr-only src stale start state status stay sticky still stop stored stray string strings strip stripe stroke-linecap stroke-linejoin stroke-width strong stronger style style-attribute styled styles stylesheet sub subagents subsequent success successful summary sup surfaces survives svg swap swapped swaps synchronous synchronously syntactically syntect t tab tab-item tab-panel tabindex table tablist tabpanel tabs tabs-container tabs-content tabs-nav tag tag- tag-item- tags tags:audit take tbody td temp-element template temporary temporary-element terminal terms test-results text text-accent text-bg text-body text-caption text-center text-chat-assistant-text text-chat-user-text text-code-fg text-danger text-decoration text-display text-fg text-heading text-info text-left text-micro text-muted text-muted/50 text-right text-small text-title text-warning text/plain textarea tfoot th that the thead their them theme theme-color theme-toggle theme/token then there these they this through throw tighten time tip title to toc toggle toggle-ai-chat toggle-design-token-panel toggles token tokens tolerates too toolbar 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-[left,color] transition-colors transition-transform translate-x-0 translations transparent treats tree tree-child- tree-item- tree-top- trigger trigger:ai-chat trigger:design-token-panel triggers true truncate truncated try turn twitter:card twitter:creator twitter:description twitter:image twitter:site twitter:title two type typography u ul unavailable unchanged undefined under underline underlines understand unknown unmaintained unobserve unreadable unrelated unreleased unset unsupported up uppercase usage use used user uses utf-8 utf8 utilities utility v v2 val value value-reader values var variable variant version version- version-menu version-switcher vertical via video viewport virtual:zudo-doc-chrome-bindings virtual:zudo-doc-route-context visible vitesse-dark vocabulary w w-1/2 w-[0.5rem] w-[0.625rem] w-[0.875rem] w-[1.125rem] w-[1.575rem] w-[1.5rem] w-[1.75rem] w-[14px] w-[16px] w-[16rem] w-[18px] w-[1em] w-[280px] w-[2rem] w-[320px] w-[90vw] w-[var(--zd-sidebar-w)] w-dvw w-full w-icon-lg w-icon-md w-icon-sm w-icon-xs want warning was watching wbr wbr- we website weight went were what when where whereas whether which while whitespace-nowrap whitespace-pre whole wide-gamut width will with without word working worktrees would wrap wrapper wrappers written wrong wrote xl:flex xl:hidden y-scrollbar yet you your z-dropdown z-local-1 z-modal z-modal-backdrop z-sidebar z-toolbar zd-content zd-desktop-sidebar-toggle zd-doc-content-band zd-enlarge-btn zd-enlarge-dialog zd-enlarge-dialog-close zd-enlargeable zd-html-preview-code zd-mermaid-dialog zd-mermaid-enlargeable zd-mermaid-tool-btn zd-mermaid-toolbar zd-mermaid-transform zd-mermaid-viewport zd-sidebar-content-wrapper zd-sidebar-open zfb zfb:after-swap zfb:before-preparation zod zoom zudo-doc-design-tokens/v1 zudo-doc-sidebar-visible zudo-doc-sidebar-width zudo-doc-theme zudo-doc-theme-bridge");
|
package/dist/settings.d.ts
CHANGED
|
@@ -323,4 +323,38 @@ export interface Settings {
|
|
|
323
323
|
* flag a potentially-empty build (#2404). No throw — the build succeeds.
|
|
324
324
|
*/
|
|
325
325
|
packageOwnedRoutes?: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Project-root-relative path to a host module that exports host-callable
|
|
328
|
+
* chrome bindings, e.g. `"./src/chrome-bindings.tsx"` (epic #2499, ADR
|
|
329
|
+
* `docs/adr/route-injection-seam.md`, "Host-callables channel"). Only
|
|
330
|
+
* consumed when `packageOwnedRoutes` is on: the routes plugin registers a
|
|
331
|
+
* second virtual module (`virtual:zudo-doc-chrome-bindings`) that
|
|
332
|
+
* RE-EXPORTS this module, so the injected chrome shim (`routes/_chrome.tsx`)
|
|
333
|
+
* can import real host callables — un-stranding `ChromeHostBindings` slots
|
|
334
|
+
* (`frontmatterRenderers`, `buildFrontmatterPreviewEntries`, `SearchWidget`,
|
|
335
|
+
* …) that today silently stay at stub defaults on injected routes.
|
|
336
|
+
*
|
|
337
|
+
* The target module MUST have a named export `chromeBindings` typed
|
|
338
|
+
* `ChromeHostBindings` (from `@takazudo/zudo-doc/factory-context`).
|
|
339
|
+
*
|
|
340
|
+
* - Absent (the default) → the virtual module emits
|
|
341
|
+
* `export const chromeBindings = {};` — behavior byte-identical to today.
|
|
342
|
+
* - Explicitly empty string → build fails loudly at plugin setup.
|
|
343
|
+
* - Present but the resolved file does not exist → the build fails loudly
|
|
344
|
+
* at plugin setup, naming the resolved absolute path (never a silent
|
|
345
|
+
* empty fallback).
|
|
346
|
+
* - Present but the resolved path is a directory (e.g. `"."` or `"./src"`)
|
|
347
|
+
* → the build fails loudly at plugin setup, naming the resolved path.
|
|
348
|
+
*
|
|
349
|
+
* Only the PATH travels through `settings` (a string is serializable data,
|
|
350
|
+
* consistent with the ADR's "virtual module = serializable data only"
|
|
351
|
+
* rule) — the bundler imports the actual callables from the re-exported
|
|
352
|
+
* module.
|
|
353
|
+
*
|
|
354
|
+
* SSR-presentational contract only: client islands defined inside the
|
|
355
|
+
* bindings module are NOT guaranteed to register on injected routes (the
|
|
356
|
+
* virtual re-export is outside zfb's static-import scanner reachability
|
|
357
|
+
* graph — see the ADR for detail).
|
|
358
|
+
*/
|
|
359
|
+
chromeBindingsModule?: string;
|
|
326
360
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takazudo/zudo-doc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.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",
|
|
@@ -219,6 +219,10 @@
|
|
|
219
219
|
"types": "./dist/chrome/index.d.ts",
|
|
220
220
|
"default": "./dist/chrome/index.js"
|
|
221
221
|
},
|
|
222
|
+
"./home-page": {
|
|
223
|
+
"types": "./dist/home-page/index.d.ts",
|
|
224
|
+
"default": "./dist/home-page/index.js"
|
|
225
|
+
},
|
|
222
226
|
"./safelist.css": "./dist/safelist.css",
|
|
223
227
|
"./safelist": "./dist/safelist.css",
|
|
224
228
|
"./content.css": "./dist/content.css",
|
|
@@ -528,8 +532,8 @@
|
|
|
528
532
|
],
|
|
529
533
|
"peerDependencies": {
|
|
530
534
|
"preact": "^10.29.1",
|
|
531
|
-
"@takazudo/zfb": "^0.1.0-next.
|
|
532
|
-
"@takazudo/zfb-runtime": "^0.1.0-next.
|
|
535
|
+
"@takazudo/zfb": "^0.1.0-next.75",
|
|
536
|
+
"@takazudo/zfb-runtime": "^0.1.0-next.75",
|
|
533
537
|
"@takazudo/zudo-doc-history-server": "^2.2.1",
|
|
534
538
|
"@takazudo/zdtp": "^0.4.2",
|
|
535
539
|
"shiki": "^4.0.2",
|
|
@@ -572,8 +576,9 @@
|
|
|
572
576
|
"typescript": "^5.0.0",
|
|
573
577
|
"vitest": "^4.1.0",
|
|
574
578
|
"zod": "^4.3.6",
|
|
575
|
-
"@takazudo/zfb": "0.1.0-next.
|
|
576
|
-
"@takazudo/zfb-runtime": "0.1.0-next.
|
|
579
|
+
"@takazudo/zfb": "0.1.0-next.75",
|
|
580
|
+
"@takazudo/zfb-runtime": "0.1.0-next.75",
|
|
581
|
+
"@takazudo/zudo-doc-history-server": "2.3.0"
|
|
577
582
|
},
|
|
578
583
|
"scripts": {
|
|
579
584
|
"build": "tsup && tsc -p tsconfig.build.json",
|
package/routes-src/_chrome.tsx
CHANGED
|
@@ -15,6 +15,12 @@ import { createChrome } from "@takazudo/zudo-doc/chrome";
|
|
|
15
15
|
import { DocHistory } from "@takazudo/zudo-doc/doc-history";
|
|
16
16
|
import type { ChromeHostBindings } from "@takazudo/zudo-doc/factory-context";
|
|
17
17
|
import type { DocNavNode } from "./_docs-helpers.js";
|
|
18
|
+
// Host-callables channel (#2501): re-exports `settings.chromeBindingsModule`
|
|
19
|
+
// when the host configured one, else `{}` — see
|
|
20
|
+
// `plugins/routes.ts` and `docs/adr/route-injection-seam.md`
|
|
21
|
+
// ("Host-callables channel — chromeBindingsModule"). Not present on disk; the
|
|
22
|
+
// package ships ambient typings for it (`routes/_virtual.d.ts`).
|
|
23
|
+
import { chromeBindings } from "virtual:zudo-doc-chrome-bindings";
|
|
18
24
|
|
|
19
25
|
// Island-scanner contract (load-bearing): the injected doc routes reach the real
|
|
20
26
|
// DocHistory client island ONLY through this static import → `createChrome`
|
|
@@ -28,8 +34,17 @@ import type { DocNavNode } from "./_docs-helpers.js";
|
|
|
28
34
|
// vs the stub is byte-identical. Mirrors the host's `pages/lib/_chrome.ts`.
|
|
29
35
|
// (The narrow real-island props signature isn't assignable to the structural
|
|
30
36
|
// `FactoryComponent`, so cast — same as the host.)
|
|
37
|
+
//
|
|
38
|
+
// `...chromeBindings` is spread AFTER the `DocHistory` default so a host that
|
|
39
|
+
// configured `chromeBindingsModule` can override ANY slot — including
|
|
40
|
+
// DocHistory itself — while a host that didn't still gets the #2480 fix for
|
|
41
|
+
// free. Note the SSR-presentational-only limitation: a client island defined
|
|
42
|
+
// INSIDE the bindings module is not guaranteed to register on injected routes
|
|
43
|
+
// the way the static `DocHistory` import above is (the virtual re-export sits
|
|
44
|
+
// outside zfb's static-import scanner reachability graph) — see the ADR.
|
|
31
45
|
const chrome = createChrome(routeCtx, {
|
|
32
46
|
DocHistory: DocHistory as unknown as ChromeHostBindings["DocHistory"],
|
|
47
|
+
...chromeBindings,
|
|
33
48
|
});
|
|
34
49
|
|
|
35
50
|
export const {
|
|
@@ -45,6 +60,7 @@ export const {
|
|
|
45
60
|
TagsIndexPageView,
|
|
46
61
|
SiteTreeNavWrapper,
|
|
47
62
|
BodyEndIslands,
|
|
63
|
+
HomePageView,
|
|
48
64
|
} = chrome;
|
|
49
65
|
|
|
50
66
|
// The doc-route-entries builder lives on the route context; the doc entrypoints
|
package/routes-src/_virtual.d.ts
CHANGED
|
@@ -17,3 +17,18 @@ declare module "virtual:zudo-doc-route-context" {
|
|
|
17
17
|
colorSchemes: Record<string, unknown> | null;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
// Ambient typing for the chrome-bindings virtual module emitted by the routes
|
|
22
|
+
// plugin (`addVirtualModule("virtual:zudo-doc-chrome-bindings", …)`, #2501).
|
|
23
|
+
// No on-disk source — materialised at build, either as a re-export of the
|
|
24
|
+
// host's `settings.chromeBindingsModule` file or as an empty-object fallback
|
|
25
|
+
// when the setting is absent. See `plugins/routes.ts` and
|
|
26
|
+
// `docs/adr/route-injection-seam.md` ("Host-callables channel —
|
|
27
|
+
// chromeBindingsModule").
|
|
28
|
+
//
|
|
29
|
+
// Typed via an INLINE `import(...)` type (not a top-level import, which would
|
|
30
|
+
// break this file's ambient module declarations) — see
|
|
31
|
+
// `../factory-context/index.js` for the `ChromeHostBindings` shape.
|
|
32
|
+
declare module "virtual:zudo-doc-chrome-bindings" {
|
|
33
|
+
export const chromeBindings: import("@takazudo/zudo-doc/factory-context").ChromeHostBindings;
|
|
34
|
+
}
|
package/routes-src/index.tsx
CHANGED
|
@@ -4,131 +4,25 @@
|
|
|
4
4
|
// (A1 #2361). Default-locale (EN) site index: site-map grid + optional tag
|
|
5
5
|
// count, rendered through the package chrome (`_chrome`). Static route — no
|
|
6
6
|
// paths() export.
|
|
7
|
+
//
|
|
8
|
+
// Thin consumer of `HomePageView` (S3 #2502): this file's only job is
|
|
9
|
+
// resolving the default locale and handing `routeCtx` to the shared
|
|
10
|
+
// `prepareHomeData` factory (#2519) for the data-prep sequence, then handing
|
|
11
|
+
// the result to the shared home body factory.
|
|
7
12
|
|
|
8
|
-
import type { JSX
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import type { SidebarNavNode } from "@takazudo/zudo-doc/sidebar";
|
|
13
|
-
import {
|
|
14
|
-
settings,
|
|
15
|
-
defaultLocale,
|
|
16
|
-
t,
|
|
17
|
-
withBase,
|
|
18
|
-
resolveNavSource,
|
|
19
|
-
buildNavTree,
|
|
20
|
-
groupSatelliteNodes,
|
|
21
|
-
getCategoryOrder,
|
|
22
|
-
collectTags,
|
|
23
|
-
docsUrl,
|
|
24
|
-
toRouteSlug,
|
|
25
|
-
} from "./_context.js";
|
|
26
|
-
import type { CategoryMeta } from "./_docs-helpers.js";
|
|
27
|
-
import {
|
|
28
|
-
HeadWithDefaults,
|
|
29
|
-
HeaderWithDefaults,
|
|
30
|
-
FooterWithDefaults,
|
|
31
|
-
BodyEndIslands,
|
|
32
|
-
composeMetaTitle,
|
|
33
|
-
} from "./_chrome.js";
|
|
13
|
+
import type { JSX } from "preact";
|
|
14
|
+
import { defaultLocale, routeCtx } from "./_context.js";
|
|
15
|
+
import { prepareHomeData } from "@takazudo/zudo-doc/home-page";
|
|
16
|
+
import { HomePageView } from "./_chrome.js";
|
|
34
17
|
|
|
35
18
|
export const frontmatter = { title: "Home" };
|
|
36
19
|
|
|
37
20
|
export default function IndexPage(): JSX.Element {
|
|
38
21
|
const locale = defaultLocale;
|
|
39
22
|
|
|
40
|
-
const {
|
|
41
|
-
const tree = buildNavTree(
|
|
42
|
-
navDocs,
|
|
43
|
-
locale,
|
|
44
|
-
categoryMeta as Map<string, CategoryMeta>,
|
|
45
|
-
(slug, loc) => docsUrl(slug, loc),
|
|
46
|
-
);
|
|
47
|
-
const categoryOrder = getCategoryOrder();
|
|
48
|
-
const groupedTree = groupSatelliteNodes(tree, categoryOrder);
|
|
49
|
-
|
|
50
|
-
const tagCount = collectTags(
|
|
51
|
-
navDocs.filter((d) => !d.data.category_no_page),
|
|
52
|
-
(id, data) => data.slug ?? toRouteSlug(id),
|
|
53
|
-
).size;
|
|
54
|
-
|
|
55
|
-
const ctaNav = settings.headerNav[0] ?? null;
|
|
56
|
-
const overview = ctaNav ? withBase(ctaNav.path) : null;
|
|
57
|
-
const logoUrl = withBase("/img/logo.svg");
|
|
23
|
+
const { tree, categoryOrder, tagCount } = prepareHomeData(routeCtx, locale);
|
|
58
24
|
|
|
59
25
|
return (
|
|
60
|
-
<
|
|
61
|
-
title={composeMetaTitle(settings.siteName)}
|
|
62
|
-
head={<HeadWithDefaults title={settings.siteName} />}
|
|
63
|
-
lang={locale}
|
|
64
|
-
noindex={settings.noindex}
|
|
65
|
-
hideSidebar={true}
|
|
66
|
-
hideToc={true}
|
|
67
|
-
sidebarOverride={<></>}
|
|
68
|
-
headerOverride={<HeaderWithDefaults lang={locale} currentPath={withBase("/")} />}
|
|
69
|
-
footerOverride={<FooterWithDefaults lang={locale} />}
|
|
70
|
-
bodyEndComponents={<BodyEndIslands basePath={settings.base ?? "/"} />}
|
|
71
|
-
enableClientRouter={settings.dynamicPageTransition}
|
|
72
|
-
>
|
|
73
|
-
<div class="flex justify-center mb-vsp-xl">
|
|
74
|
-
<div class="flex flex-col items-center text-center gap-hsp-md lg:flex-row lg:text-left lg:gap-hsp-xl">
|
|
75
|
-
<div
|
|
76
|
-
class="w-[320px] max-w-full aspect-[1200/630] bg-fg shrink-0"
|
|
77
|
-
style={{
|
|
78
|
-
WebkitMask: `url(${logoUrl}) center/contain no-repeat`,
|
|
79
|
-
mask: `url(${logoUrl}) center/contain no-repeat`,
|
|
80
|
-
}}
|
|
81
|
-
aria-hidden="true"
|
|
82
|
-
/>
|
|
83
|
-
<div>
|
|
84
|
-
<h1 class="text-heading font-bold mb-vsp-2xs">{settings.siteName}</h1>
|
|
85
|
-
<p class="text-muted text-small mb-vsp-sm">{settings.siteDescription}</p>
|
|
86
|
-
<div class="flex items-center justify-center lg:justify-start gap-hsp-md text-small">
|
|
87
|
-
{overview && (
|
|
88
|
-
<>
|
|
89
|
-
<a href={overview} class="text-fg underline hover:text-accent">
|
|
90
|
-
{t("nav.overview", locale)}
|
|
91
|
-
</a>
|
|
92
|
-
<span class="text-muted">/</span>
|
|
93
|
-
</>
|
|
94
|
-
)}
|
|
95
|
-
{settings.githubUrl && (
|
|
96
|
-
<>
|
|
97
|
-
<a
|
|
98
|
-
href={settings.githubUrl as string}
|
|
99
|
-
class="inline-flex items-center gap-[0.3em] text-fg underline hover:text-accent"
|
|
100
|
-
target="_blank"
|
|
101
|
-
rel="noopener noreferrer"
|
|
102
|
-
>
|
|
103
|
-
GitHub
|
|
104
|
-
</a>
|
|
105
|
-
<span class="text-muted">/</span>
|
|
106
|
-
</>
|
|
107
|
-
)}
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
{Island({
|
|
114
|
-
when: "idle",
|
|
115
|
-
children: (
|
|
116
|
-
<SiteTreeNav
|
|
117
|
-
tree={groupedTree as unknown as SidebarNavNode[]}
|
|
118
|
-
categoryOrder={categoryOrder}
|
|
119
|
-
categoryIgnore={["inbox", "develop"]}
|
|
120
|
-
/>
|
|
121
|
-
),
|
|
122
|
-
}) as unknown as VNode}
|
|
123
|
-
|
|
124
|
-
{settings.docTags && tagCount > 0 && (
|
|
125
|
-
<section class="mt-vsp-xl">
|
|
126
|
-
<h2 class="text-title font-bold mb-vsp-md">{t("doc.allTags", locale)}</h2>
|
|
127
|
-
<a href={withBase("/docs/tags")} class="text-accent underline hover:text-accent-hover">
|
|
128
|
-
{t("doc.allTags", locale)}
|
|
129
|
-
</a>
|
|
130
|
-
</section>
|
|
131
|
-
)}
|
|
132
|
-
</DocLayoutWithDefaults>
|
|
26
|
+
<HomePageView locale={locale} tree={tree} categoryOrder={categoryOrder} tagCount={tagCount} />
|
|
133
27
|
);
|
|
134
28
|
}
|
|
@@ -3,34 +3,19 @@
|
|
|
3
3
|
// Package route entrypoint: /[locale] — package-owned equivalent of
|
|
4
4
|
// pages/[locale]/index.tsx (A1 #2361). One route per non-default locale; the
|
|
5
5
|
// locale-prefixed site index (site-map grid + optional tag count).
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
buildNavTree,
|
|
20
|
-
groupSatelliteNodes,
|
|
21
|
-
getCategoryOrder,
|
|
22
|
-
collectTags,
|
|
23
|
-
docsUrl,
|
|
24
|
-
toRouteSlug,
|
|
25
|
-
} from "./_context.js";
|
|
26
|
-
import type { CategoryMeta } from "./_docs-helpers.js";
|
|
27
|
-
import {
|
|
28
|
-
HeadWithDefaults,
|
|
29
|
-
HeaderWithDefaults,
|
|
30
|
-
FooterWithDefaults,
|
|
31
|
-
BodyEndIslands,
|
|
32
|
-
composeMetaTitle,
|
|
33
|
-
} from "./_chrome.js";
|
|
6
|
+
//
|
|
7
|
+
// Thin consumer of `HomePageView` (S3 #2502): this file's only job is
|
|
8
|
+
// `paths()` (a locale-routing concern) and handing `routeCtx` + the resolved
|
|
9
|
+
// locale param to the shared `prepareHomeData` factory (#2519), which now
|
|
10
|
+
// owns the locale-specific data prep — `resolveNavSource` with the
|
|
11
|
+
// locale-home filter options, `loadCategoryMeta`, and the locale-config
|
|
12
|
+
// guard. The prepared tree / tag count are handed to the shared home body
|
|
13
|
+
// factory, same as the default-locale route.
|
|
14
|
+
|
|
15
|
+
import type { JSX } from "preact";
|
|
16
|
+
import { settings, routeCtx } from "./_context.js";
|
|
17
|
+
import { prepareHomeData } from "@takazudo/zudo-doc/home-page";
|
|
18
|
+
import { HomePageView } from "./_chrome.js";
|
|
34
19
|
|
|
35
20
|
export const frontmatter = { title: "Home" };
|
|
36
21
|
|
|
@@ -48,103 +33,10 @@ interface PageArgs {
|
|
|
48
33
|
|
|
49
34
|
export default function LocaleIndexPage({ params }: PageArgs): JSX.Element {
|
|
50
35
|
const locale = params.locale;
|
|
51
|
-
const cfg = getLocaleConfig(locale);
|
|
52
|
-
if (!cfg) {
|
|
53
|
-
throw new Error(`LocaleIndexPage: locale "${locale}" is not configured in settings.locales`);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const { navDocs } = resolveNavSource(locale, undefined, {
|
|
57
|
-
applyDefaultLocaleOnlyFilter: true,
|
|
58
|
-
keepUnlisted: true,
|
|
59
|
-
});
|
|
60
|
-
const categoryMeta = loadCategoryMeta(cfg.dir) as Map<string, CategoryMeta>;
|
|
61
|
-
|
|
62
|
-
const tree = buildNavTree(navDocs, locale, categoryMeta, (slug, loc) => docsUrl(slug, loc));
|
|
63
|
-
const categoryOrder = getCategoryOrder();
|
|
64
|
-
const groupedTree = groupSatelliteNodes(tree, categoryOrder);
|
|
65
36
|
|
|
66
|
-
const tagCount =
|
|
67
|
-
navDocs.filter((d) => !d.data.category_no_page),
|
|
68
|
-
(id, data) => data.slug ?? toRouteSlug(id),
|
|
69
|
-
).size;
|
|
70
|
-
|
|
71
|
-
const ctaNav = settings.headerNav[0] ?? null;
|
|
72
|
-
const overview = ctaNav ? withBase(`/${locale}${ctaNav.path}`) : null;
|
|
73
|
-
const logoUrl = withBase("/img/logo.svg");
|
|
37
|
+
const { tree, categoryOrder, tagCount } = prepareHomeData(routeCtx, locale);
|
|
74
38
|
|
|
75
39
|
return (
|
|
76
|
-
<
|
|
77
|
-
title={composeMetaTitle(settings.siteName)}
|
|
78
|
-
head={<HeadWithDefaults title={settings.siteName} />}
|
|
79
|
-
lang={locale}
|
|
80
|
-
noindex={settings.noindex}
|
|
81
|
-
hideSidebar={true}
|
|
82
|
-
hideToc={true}
|
|
83
|
-
sidebarOverride={<></>}
|
|
84
|
-
headerOverride={<HeaderWithDefaults lang={locale} currentPath={withBase(`/${locale}/`)} />}
|
|
85
|
-
footerOverride={<FooterWithDefaults lang={locale} />}
|
|
86
|
-
bodyEndComponents={<BodyEndIslands basePath={settings.base ?? "/"} />}
|
|
87
|
-
enableClientRouter={settings.dynamicPageTransition}
|
|
88
|
-
>
|
|
89
|
-
<div class="flex justify-center mb-vsp-xl">
|
|
90
|
-
<div class="flex flex-col items-center text-center gap-hsp-md lg:flex-row lg:text-left lg:gap-hsp-xl">
|
|
91
|
-
<div
|
|
92
|
-
class="w-[320px] max-w-full aspect-[1200/630] bg-fg shrink-0"
|
|
93
|
-
style={{
|
|
94
|
-
WebkitMask: `url(${logoUrl}) center/contain no-repeat`,
|
|
95
|
-
mask: `url(${logoUrl}) center/contain no-repeat`,
|
|
96
|
-
}}
|
|
97
|
-
aria-hidden="true"
|
|
98
|
-
/>
|
|
99
|
-
<div>
|
|
100
|
-
<h1 class="text-heading font-bold mb-vsp-2xs">{settings.siteName}</h1>
|
|
101
|
-
<p class="text-muted text-small mb-vsp-sm">{settings.siteDescription}</p>
|
|
102
|
-
<div class="flex items-center justify-center lg:justify-start gap-hsp-md text-small">
|
|
103
|
-
{overview && (
|
|
104
|
-
<>
|
|
105
|
-
<a href={overview} class="text-fg underline hover:text-accent">
|
|
106
|
-
{t("nav.overview", locale)}
|
|
107
|
-
</a>
|
|
108
|
-
<span class="text-muted">/</span>
|
|
109
|
-
</>
|
|
110
|
-
)}
|
|
111
|
-
{settings.githubUrl && (
|
|
112
|
-
<a
|
|
113
|
-
href={settings.githubUrl as string}
|
|
114
|
-
class="inline-flex items-center gap-[0.3em] text-fg underline hover:text-accent"
|
|
115
|
-
target="_blank"
|
|
116
|
-
rel="noopener noreferrer"
|
|
117
|
-
>
|
|
118
|
-
GitHub
|
|
119
|
-
</a>
|
|
120
|
-
)}
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
|
|
126
|
-
{Island({
|
|
127
|
-
when: "idle",
|
|
128
|
-
children: (
|
|
129
|
-
<SiteTreeNav
|
|
130
|
-
tree={groupedTree as unknown as SidebarNavNode[]}
|
|
131
|
-
categoryOrder={categoryOrder}
|
|
132
|
-
categoryIgnore={["inbox", "develop"]}
|
|
133
|
-
/>
|
|
134
|
-
),
|
|
135
|
-
}) as unknown as VNode}
|
|
136
|
-
|
|
137
|
-
{settings.docTags && tagCount > 0 && (
|
|
138
|
-
<section class="mt-vsp-xl">
|
|
139
|
-
<h2 class="text-title font-bold mb-vsp-md">{t("doc.allTags", locale)}</h2>
|
|
140
|
-
<a
|
|
141
|
-
href={withBase(`/${locale}/docs/tags`)}
|
|
142
|
-
class="text-accent underline hover:text-accent-hover"
|
|
143
|
-
>
|
|
144
|
-
{t("doc.allTags", locale)}
|
|
145
|
-
</a>
|
|
146
|
-
</section>
|
|
147
|
-
)}
|
|
148
|
-
</DocLayoutWithDefaults>
|
|
40
|
+
<HomePageView locale={locale} tree={tree} categoryOrder={categoryOrder} tagCount={tagCount} />
|
|
149
41
|
);
|
|
150
42
|
}
|