@takazudo/zudo-doc 3.2.0 → 3.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/chrome/derive.d.ts +7 -1
  3. package/dist/chrome/derive.js +13 -2
  4. package/dist/chrome-bindings.d.ts +159 -0
  5. package/dist/chrome-bindings.js +6 -0
  6. package/dist/color-scheme-utils.d.ts +1 -1
  7. package/dist/color-schemes-defaults/index.d.ts +23 -0
  8. package/dist/color-schemes-defaults/index.js +121 -0
  9. package/dist/config.d.ts +443 -0
  10. package/dist/config.js +116 -0
  11. package/dist/design-token-panel-bootstrap.d.ts +57 -7
  12. package/dist/design-token-panel-bootstrap.js +12 -0
  13. package/dist/design-token-panel-config/index.d.ts +49 -0
  14. package/dist/design-token-panel-config/index.js +214 -0
  15. package/dist/design-token-panel-config/manifest.d.ts +46 -0
  16. package/dist/design-token-panel-config/manifest.js +105 -0
  17. package/dist/directive-vocabulary-defaults/index.d.ts +16 -0
  18. package/dist/directive-vocabulary-defaults/index.js +12 -0
  19. package/dist/doc-body-end-islands/index.d.ts +30 -7
  20. package/dist/doc-body-end-islands/index.js +27 -0
  21. package/dist/docs-schema/index.d.ts +67 -0
  22. package/dist/docs-schema/index.js +47 -0
  23. package/dist/factory-context/index.d.ts +14 -0
  24. package/dist/features.css +10 -0
  25. package/dist/find-in-page/find-bar.d.ts +9 -0
  26. package/dist/find-in-page/find-bar.js +114 -0
  27. package/dist/find-in-page/find-in-page.d.ts +17 -0
  28. package/dist/find-in-page/find-in-page.js +131 -0
  29. package/dist/find-in-page/index.d.ts +11 -0
  30. package/dist/find-in-page/index.js +49 -0
  31. package/dist/frontmatter-preview-defaults/index.d.ts +16 -0
  32. package/dist/frontmatter-preview-defaults/index.js +25 -0
  33. package/dist/i18n-defaults/index.d.ts +22 -0
  34. package/dist/i18n-defaults/index.js +167 -0
  35. package/dist/plugins/routes.js +44 -20
  36. package/dist/preset.d.ts +9 -0
  37. package/dist/routes/_chrome.js +2 -1
  38. package/dist/safelist.css +1 -1
  39. package/dist/settings.d.ts +37 -0
  40. package/dist/theme.css +319 -0
  41. package/dist/z-index-defaults/index.d.ts +45 -0
  42. package/dist/z-index-defaults/index.js +34 -0
  43. package/package.json +50 -3
  44. package/routes-src/_chrome.tsx +30 -8
  45. package/routes-src/_virtual.d.ts +34 -2
  46. package/tsconfig.base.json +29 -0
  47. package/virtual-modules.d.ts +79 -0
  48. package/zfb-config-shim.d.ts +188 -0
@@ -41,6 +41,27 @@ function deriveRoutes(settings) {
41
41
  }
42
42
  return routes;
43
43
  }
44
+ function resolveHostModuleOverride(projectRoot, settingName, settingValue, hints) {
45
+ if (typeof settingValue === "string" && settingValue.trim() === "") {
46
+ throw new Error(
47
+ `zudo-doc: settings.${settingName} is set to an empty string \u2014 set it to a project-root-relative module path (e.g. "${hints.examplePath}") or remove the setting.`
48
+ );
49
+ }
50
+ const modulePath = typeof settingValue === "string" ? settingValue : void 0;
51
+ if (!modulePath) return void 0;
52
+ const resolved = join(projectRoot, modulePath).split("\\").join("/");
53
+ if (!existsSync(resolved)) {
54
+ throw new Error(
55
+ `zudo-doc: settings.${settingName} is set to "${modulePath}", which resolves to "${resolved}" \u2014 that file does not exist. Create it (must export a named \`${hints.mustExport}\`) or remove the setting.`
56
+ );
57
+ }
58
+ if (!statSync(resolved).isFile()) {
59
+ throw new Error(
60
+ `zudo-doc: settings.${settingName} is set to "${modulePath}", which resolves to "${resolved}" \u2014 that path is a directory, not a module file. Point it at a module file (e.g. "${hints.examplePath}") or remove the setting.`
61
+ );
62
+ }
63
+ return resolved;
64
+ }
44
65
  const plugin = definePlugin({
45
66
  name: "@takazudo/zudo-doc/plugins/routes",
46
67
  setup(ctx) {
@@ -59,31 +80,34 @@ const plugin = definePlugin({
59
80
  })};
60
81
  `
61
82
  );
62
- if (typeof settings.chromeBindingsModule === "string" && settings.chromeBindingsModule.trim() === "") {
63
- throw new Error(
64
- 'zudo-doc: settings.chromeBindingsModule is set to an empty string \u2014 set it to a project-root-relative module path (e.g. "./src/chrome-bindings.tsx") or remove the setting.'
65
- );
66
- }
67
- const chromeBindingsModule = typeof settings.chromeBindingsModule === "string" ? settings.chromeBindingsModule : void 0;
68
- let chromeBindingsAbsPath;
69
- if (chromeBindingsModule) {
70
- const resolved = join(ctx.projectRoot, chromeBindingsModule).split("\\").join("/");
71
- if (!existsSync(resolved)) {
72
- throw new Error(
73
- `zudo-doc: settings.chromeBindingsModule is set to "${chromeBindingsModule}", which resolves to "${resolved}" \u2014 that file does not exist. Create it (must export a named \`chromeBindings: ChromeHostBindings\`) or remove the setting.`
74
- );
83
+ const chromeBindingsAbsPath = resolveHostModuleOverride(
84
+ ctx.projectRoot,
85
+ "chromeBindingsModule",
86
+ settings.chromeBindingsModule,
87
+ {
88
+ examplePath: "./src/chrome-bindings.tsx",
89
+ mustExport: "chromeBindings: ChromeHostBindings"
75
90
  }
76
- if (!statSync(resolved).isFile()) {
77
- throw new Error(
78
- `zudo-doc: settings.chromeBindingsModule is set to "${chromeBindingsModule}", which resolves to "${resolved}" \u2014 that path is a directory, not a module file. Point it at a module file (e.g. "./src/chrome-bindings.tsx") or remove the setting.`
79
- );
80
- }
81
- chromeBindingsAbsPath = resolved;
82
- }
91
+ );
83
92
  ctx.addVirtualModule(
84
93
  "virtual:zudo-doc-chrome-bindings",
85
94
  () => chromeBindingsAbsPath ? `export { chromeBindings } from ${JSON.stringify(chromeBindingsAbsPath)};
86
95
  ` : `export const chromeBindings = {};
96
+ `
97
+ );
98
+ const designTokenPanelConfigAbsPath = resolveHostModuleOverride(
99
+ ctx.projectRoot,
100
+ "designTokenPanelConfigModule",
101
+ settings.designTokenPanelConfigModule,
102
+ {
103
+ examplePath: "./src/design-token-panel-config.ts",
104
+ mustExport: 'buildDesignTokenPanelConfig(mode: "light" | "dark")'
105
+ }
106
+ );
107
+ ctx.addVirtualModule(
108
+ "virtual:zudo-doc-design-token-panel-config",
109
+ () => designTokenPanelConfigAbsPath ? `export { buildDesignTokenPanelConfig } from ${JSON.stringify(designTokenPanelConfigAbsPath)};
110
+ ` : `export { buildDesignTokenPanelConfig } from "@takazudo/zudo-doc/design-token-panel-config";
87
111
  `
88
112
  );
89
113
  const require2 = createRequire(import.meta.url);
package/dist/preset.d.ts CHANGED
@@ -105,6 +105,15 @@ export interface PresetSettings {
105
105
  * package-default stubs (byte-identical to today).
106
106
  */
107
107
  chromeBindingsModule?: string;
108
+ /**
109
+ * Project-root-relative path to a host module exporting a named
110
+ * `buildDesignTokenPanelConfig(mode: "light" | "dark")` (#2658). Only
111
+ * consumed when `packageOwnedRoutes` is on and `designTokenPanel` is true
112
+ * — see `settings.ts` for the full contract. Omit to use the package
113
+ * default design-token-panel config (derived from the shipped token
114
+ * manifest + bundled color schemes).
115
+ */
116
+ designTokenPanelConfigModule?: string;
108
117
  /** Gate for the `/docs/tags` + `/docs/tags/[tag]` injected routes. */
109
118
  docTags?: boolean;
110
119
  /** Gate for the SSR `/api/ai-chat` injected route (`prerender: false`). */
@@ -1,9 +1,10 @@
1
1
  import { routeCtx } from "./_context.js";
2
2
  import { createChrome } from "../chrome/index.js";
3
3
  import { DocHistory } from "../doc-history/index.js";
4
+ import { defineChromeBindings } from "@takazudo/zudo-doc/chrome-bindings";
4
5
  import { chromeBindings } from "virtual:zudo-doc-chrome-bindings";
5
6
  const chrome = createChrome(routeCtx, {
6
- DocHistory,
7
+ ...defineChromeBindings({ DocHistory }),
7
8
  ...chromeBindings
8
9
  });
9
10
  const {
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 -open -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] [zudo-doc] a a2 abbr about above absent absolute accent accent: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-multiline 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 array arrows article as asc aside aspect-[1200/630] aspect-square asset- assets assistant async at attach attribute attributes authored 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 base:base- based baseline 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 boundaries 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 changelog changelogs 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 collapses collision color color-scheme color-scheme-changed color-scheme-provider color-tweak colorization colors column comma command commands comment 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 construction 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-not-allowed cursor-pointer custom danger dark data data-active data-admonition data-base data-close-search data-current-locale data-default-locale data-group-id data-header data-header-logo data-header-nav data-header-right data-kbd-shortcut data-language-switcher 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-trailing-slash data-variant data-version-banner data-version-latest data-version-menu data-version-rewire data-version-slug data-version-switcher data-version-toggle data-version-trigger-label data-zd-nosidebar data-zd-toc data-zd-wide data-zfb-transition-persist dd decimal declare decoration decoration-muted default defaults del delegated dependency depth desc description design design-token design-token-panel design-token-trigger desktop desktop-sidebar desktop-sidebar-toggle desktop-sidebar-toggle-island destructive detach detached details detected 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 e2e each ease-in-out edge eject ejected el element elements els else em embedded 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 faithful 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 format 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 generated 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 hand-copied 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 implementation import important imports in inactive inbox includes index 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 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 line/statement 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 luminance m m-0 m21 m6 main major 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] minifier minor 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 muted 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 none noopener noreferrer normal noscript not not-object notable note notes 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 oklch 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 palette pan panel panels paren-balance-aware parent parse parsed pass passed passes patch path paths pattern pb-[50vh] pb-vsp-md pb-vsp-xl pb-vsp-xs per 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 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 ramp range raw re-encode/decode re-querying re-render re-renders re-run re-running re-selects reach reached reaches read reading ready real real-value received receives recorded recovers redefine ref- references refetch refreshes regenerate regenerates regex reinit reinits relative release reload relying remove removed render rendered renders reorder repaint repair repeated repeating replaced replaces repopulate requires reserved reset 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 roles 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 scored script script- script-eval script-evaluation script-injection scripts scroll scrollbar scrolled scrollend search search-index section section- see select select-none selection-bg selection-fg 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 shipped ships short shortcut should show shown shrink-0 sidebar sidebar- sidebar-toggle-island sidebar-tree-island signal similarity single single-line 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 state:state- status stay staying 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 surface 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 tested 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 unit-tested unknown unmaintained unobserve unreadable unrelated unreleased unset up uppercase usage use used user uses utf-8 utf8 utilities utility v v1 v2 val valid value value-reader values var variable variant verbatim 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-design-tokens/v2 zudo-doc-design-tokens/v3 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 -open -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] [zudo-doc] a a2 abbr about above absent absolute accent accent- accent: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-multiline already-picked an anchor anchored and and/or animate-spin announce ansehen antialiased any anywhere anzeigen 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 array arrows article as asc aside aspect-[1200/630] aspect-square asset- assets assistant async at attach attribute attributes auf authored 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 base- base64 base:base- based baseline batch be bearbeiten because been 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 boundaries 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 changelog changelogs 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 collapses collision color color-scheme color-scheme-changed color-scheme-provider color-tweak colorization colors column comma command commands comment 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 construction 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-not-allowed cursor-pointer custom danger dark data data-active data-admonition data-base data-close-search data-current-locale data-default-locale data-find-active data-find-match data-group-id data-header data-header-logo data-header-nav data-header-right data-kbd-shortcut data-language-switcher 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-trailing-slash data-variant data-version-banner data-version-latest data-version-menu data-version-rewire data-version-slug data-version-switcher data-version-toggle data-version-trigger-label data-zd-nosidebar data-zd-toc data-zd-wide data-zfb-transition-persist dd decimal declare decoration decoration-muted default default-transition-duration defaults del delegated delete dependency depth der desc description design design-token design-token-panel design-token-trigger desktop desktop-sidebar desktop-sidebar-toggle desktop-sidebar-toggle-island destructive detach detached details detected deterministic develop dfn diagram diagrams dialog die 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 documentation documented does double-registration draft drag draggable drop dropdown dropdown-child dropdown-parent dropdowns dt duration-150 duration-200 during dynamically e2e each ease-in-out edge einer eject ejected el element elements els else em embedded 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 f factories failed faithful fall fallback fallbacks falling falls false family fast feature feed fg fields fieldset figcaption figure file fill fills finally find find-match find-match-active 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-sans font-scale font-semibold font-size font-weight font-weight-bold font-weight-medium font-weight-normal font-weight-semibold footer footer- for form format 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 geladen2026 generate generated generation genuine geometry get github github-dark 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 hand-copied 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 hierarchical 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 hsp hsp-2xl hsp-2xs hsp-lg hsp-md hsp-sm hsp-xl hsp-xs html i i18n/theme. i2 i3 i4 icon icon-lg icon-md icon-sm icon-xs identical idle idx if iframe image image-enlarge image-overlay-inset image/png img implementation import important imports in inactive inbox includes index index2026 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 kopieren label landing language-switcher last:border-b-0 later latest launch layout leading-normal leading-relaxed leading-snug leading-tight leaf- leak leaves left left-0 left:calc legend legitimate length 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 line-height line/statement linger link link- links list-disc list-none listener literal literals lives llms llms-txt load local local-1 local-2 local-3 locale locales log longest-match look lostpointercapture lower luminance m m-0 m21 m6 main major 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-[3rem] min-w-[8rem] minifier minor mirror mirrors missing mit ml-auto ml-hsp-2xl ml-hsp-lg ml-hsp-sm ml-hsp-xl mod modal modal-backdrop mode module monospace most mounted mouseenter mouseleave mr-hsp-sm ms 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 muted mx-auto my-vsp-lg my-vsp-md name named native nav nav-active nav-card- nav/doc navigating navigation navigations near needs nested neutral new newly-swapped next nicht no no-enlarge no-op no-repeat no-underline noch node node:buffer node:fs node:fs/promises node:module node:path nodes nofollow noindex non-empty non-light-dark non-persisted none noopener noreferrer normal noscript not not-object notable note notes 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 oklch 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 palette pan panel panels paren-balance-aware parent parse parsed pass passed passes patch path paths pattern pb-[50vh] pb-vsp-md pb-vsp-xl pb-vsp-xs per 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 popover 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 preserving previously 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-[4px] 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 radius-full radius-lg ramp range raw re-encode/decode re-querying re-render re-renders re-run re-running re-selects reach reached reaches read reading ready real real-value received receives recorded recovers redefine ref- references refetch refreshes regenerate regenerates regex reinit reinits relative release released reload relying rem remove removed render rendered renders reorder repaint repair repeated repeating replaced replaces repopulate repository requires reserved reset 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 roles root rotate-180 rotate-90 round round-trip rounded rounded-[0.75rem] rounded-bl-[0.25rem] rounded-bl-[1rem] rounded-bl-lg 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 sans-serif scale scanned schema-mismatch schema-missing scheme scored script script- script-eval script-evaluation script-injection scripts scroll scrollbar scrolled scrollend search search-index section section- see sehen select select-none selection-bg selection-fg self self-start semantic 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 shadow-md shape share shared sharing shiki ship shipped ships short shortcut should show shown shrink-0 sidebar sidebar- sidebar-toggle-island sidebar-tree-island sidebar-w signal similarity single single-line 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 spacing-0 spacing-px span spans spec specifier specifiers splitter square sr-only src stable stale standalone start state state- state:state- status stay staying sticky still stop stored stray strict 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 surface 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- tagged tags tags:audit take tbody td temp-element template temporary temporary-element terminal terms test-results tested 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-fg/60 text-heading text-info text-left text-micro text-muted text-muted/50 text-right text-scale-2xl text-scale-2xs text-scale-lg text-scale-md text-scale-sm text-scale-xl text-scale-xs 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 toast toc toggle toggle-ai-chat toggle-design-token-panel toggles token tokens tolerates too toolbar tooltip 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 translated 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 umschalten unavailable unchanged und undefined under underline underlines understand unit-tested unknown unlisted unmaintained unobserve unreadable unrelated unreleased unset up up-to-date uppercase usage use used user uses utf-8 utf8 utilities utility v v1 v2 val valid value value-reader values var variable variant verbatim version version- version-menu version-switcher versions vertical via video viewing viewport virtual:zudo-doc-chrome-bindings virtual:zudo-doc-design-token-panel-config virtual:zudo-doc-route-context visible vitesse-dark vocabulary von vsp vsp-2xl vsp-2xs vsp-3xs vsp-lg vsp-md vsp-sm vsp-xl vsp-xs w w-1/2 w-48 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 warn warning was watching wbr wbr- we website weight went were what when where whereas whether which while whitespace-nowrap whitespace-pre whole wide wide-gamut width will wird with without word working worktrees would wrap wrapper wrappers written wrong wrote wurde 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-design-tokens/v3 zudo-doc zudo-doc-design-token-panel-modal zudo-doc-design-tokens zudo-doc-design-tokens/v1 zudo-doc-design-tokens/v2 zudo-doc-design-tokens/v3 zudo-doc-sidebar-visible zudo-doc-sidebar-width zudo-doc-theme zudo-doc-theme-bridge zudo-doc-tweak zum");
@@ -305,6 +305,12 @@ export interface Settings {
305
305
  sidebarResizer: boolean;
306
306
  sidebarToggle: boolean;
307
307
  imageEnlarge: boolean;
308
+ /**
309
+ * Mount the `FindInPageInit` island (Cmd/Ctrl+F find bar). Self-gates on
310
+ * `window.__TAURI_INTERNALS__` — a no-op outside a Tauri shell even when
311
+ * `true`, since the OS/browser already own that shortcut elsewhere.
312
+ */
313
+ findInPage: boolean;
308
314
  dynamicPageTransition: boolean;
309
315
  frontmatterPreview: FrontmatterPreviewConfig | false;
310
316
  docHistory: boolean;
@@ -371,4 +377,35 @@ export interface Settings {
371
377
  * graph — see the ADR for detail).
372
378
  */
373
379
  chromeBindingsModule?: string;
380
+ /**
381
+ * Project-root-relative path to a host module that exports a named
382
+ * `buildDesignTokenPanelConfig(mode: "light" | "dark")` zdtp PanelConfig
383
+ * builder (#2658, epic Minimal Scaffold #2651). Only consumed when
384
+ * `packageOwnedRoutes` is on: the routes plugin registers a third virtual
385
+ * module (`virtual:zudo-doc-design-token-panel-config`) that RE-EXPORTS
386
+ * this module — identical mechanics to {@link chromeBindingsModule}
387
+ * (mirrors the `chromeBindingsModule` contract exactly).
388
+ *
389
+ * When `designTokenPanel` is `true` and this setting is omitted (the
390
+ * default), the injected `DesignTokenPanelBootstrap` island uses the
391
+ * PACKAGE-DEFAULT builder (`@takazudo/zudo-doc/design-token-panel-config`)
392
+ * — derived from the shipped token manifest (`@takazudo/zudo-doc/theme.css`)
393
+ * and the bundled "Default Light"/"Default Dark" color schemes — so the
394
+ * panel works with NO host config file.
395
+ *
396
+ * - Absent (the default) → the virtual module re-exports the package
397
+ * default builder — behavior is a fully working panel with the shipped
398
+ * defaults.
399
+ * - Explicitly empty string → build fails loudly at plugin setup.
400
+ * - Present but the resolved file does not exist → the build fails loudly
401
+ * at plugin setup, naming the resolved absolute path (never a silent
402
+ * fallback to the package default).
403
+ * - Present but the resolved path is a directory → the build fails loudly
404
+ * at plugin setup, naming the resolved path.
405
+ *
406
+ * Only the PATH travels through `settings` (a string is serializable
407
+ * data) — the bundler imports the actual builder from the re-exported
408
+ * module. Irrelevant when `designTokenPanel` is `false`.
409
+ */
410
+ designTokenPanelConfigModule?: string;
374
411
  }
package/dist/theme.css ADDED
@@ -0,0 +1,319 @@
1
+ /* ============================================================================
2
+ * @takazudo/zudo-doc — default design tokens + project-agnostic base rules
3
+ *
4
+ * Shipped to consumers as `@takazudo/zudo-doc/theme.css` (copied to
5
+ * `dist/theme.css` by scripts/copy-theme-css.mjs on build). Single source of
6
+ * truth for the default `@theme` token block (colors, spacing, icon sizes,
7
+ * elevation, typography, radius, breakpoints, z-index) plus the small set of
8
+ * project-agnostic base rules (scroll-margin, selection color, focus ring,
9
+ * search / find-in-page highlight, version-switcher visibility) every
10
+ * zudo-doc project needs. See zudolab/zudo-doc#2655.
11
+ *
12
+ * ── @import order (load-bearing) ────────────────────────────────────────────
13
+ * The consumer's global.css MUST import this file:
14
+ * 1. AFTER `@layer zd-preflight, zd-flow;` and the two Tailwind imports
15
+ * (`tailwindcss/preflight` layer(zd-preflight), `tailwindcss/utilities`).
16
+ * Those three lines stay project-side — path-relative `@source`/`@layer`
17
+ * resolution requires them to live in the consumer's own CSS file (see
18
+ * packages/create-zudo-doc/templates/base/src/styles/global.css).
19
+ * 2. BEFORE `@takazudo/zudo-doc/safelist.css`, `content.css`,
20
+ * `page-loading.css`, and `features.css` — all four consume the
21
+ * `@theme` tokens defined here (colors, spacing, typography, z-index),
22
+ * and `content.css`'s `@layer zd-flow` rule depends on the cascade
23
+ * layer order already being established by the time it loads.
24
+ * 3. BEFORE the project's own token-override `@theme { … }` block — Tailwind
25
+ * v4 `@theme` resolution is last-declaration-wins per custom property,
26
+ * so a later project block can redefine any default declared here.
27
+ *
28
+ * ── Consumer contract ────────────────────────────────────────────────────────
29
+ * The consumer must inject the `--zd-*` ramp/role custom properties this file
30
+ * aliases into `--color-*` tokens (`ColorSchemeProvider`, see
31
+ * `@takazudo/zudo-doc/theme`). Without them every `--color-*` token below
32
+ * resolves to nothing (the tight-token guardrail below wipes Tailwind's
33
+ * default palette; only `--zd-*`-backed aliases repopulate it).
34
+ *
35
+ * Deliberately NOT shipped here: `--color-page-loading-overlay`. That scrim
36
+ * token stays feature-injected by a project's `dynamicPageTransition` wiring
37
+ * (its default depends on `--color-overlay`, which IS defined below) — do
38
+ * not add it to this base block.
39
+ *
40
+ * ── Z-index defaults ─────────────────────────────────────────────────────────
41
+ * The 13 `--z-index-*` entries below are the package DEFAULT tiers (mirrors
42
+ * `defaultZIndexTiers` from `@takazudo/zudo-doc/z-index-defaults`, #2654).
43
+ * A project only needs its own `src/config/z-index-tokens.ts` +
44
+ * `gen:z-index`/`check:z-index` codegen wiring if it OVERRIDES a tier — its
45
+ * own `@theme` block (declared after this file's import) simply redefines
46
+ * the specific `--z-index-<name>` it wants to change.
47
+ * ============================================================================ */
48
+
49
+ @theme {
50
+ /* ========================================
51
+ * Tight-token color reset
52
+ *
53
+ * Wipes all Tailwind default color tokens (`--color-*`) so only
54
+ * project-defined palette and semantic tokens remain. This enforces
55
+ * zudo-doc's tight-token policy: "NEVER use Tailwind default colors"
56
+ * (documented per-project in src/CLAUDE.md's Color Rules). Semantic color
57
+ * tokens (defined below) are added back after this reset.
58
+ *
59
+ * The upstream split-import fix (zfb#159 / 9e37551, shipped in f68a9ba)
60
+ * eliminated the original leak cause (zfb no longer prepends the full
61
+ * @import "tailwindcss" bundle). The reset is retained as an explicit
62
+ * design guardrail — it prevents accidental default palette bleed from any
63
+ * future upstream change and keeps the color surface intentional.
64
+ *
65
+ * NOT reset: `--spacing` (the base spacing scale, default 0.25rem).
66
+ * Tailwind spacing utilities compute as calc(var(--spacing) * N); wiping
67
+ * `--spacing` collapses them to zero (observed in Wave 4 Sub-7 #1403).
68
+ * This guardrail resets ONLY the color namespace — never widen it.
69
+ * ======================================== */
70
+ --color-*: initial;
71
+
72
+ /* ========================================
73
+ * Colors — Three-tier token system
74
+ * ======================================== */
75
+
76
+ /* ── Base ── */
77
+ --color-bg: var(--zd-bg);
78
+ --color-fg: var(--zd-fg);
79
+ --color-sel-bg: var(--zd-selection-bg);
80
+ --color-sel-fg: var(--zd-selection-fg);
81
+
82
+ /* ── Semantic aliases ── */
83
+ --color-surface: var(--zd-surface);
84
+ --color-muted: var(--zd-muted);
85
+ --color-accent: var(--zd-accent);
86
+ --color-accent-hover: var(--zd-accent-hover);
87
+ --color-code-bg: var(--zd-code-bg);
88
+ --color-code-fg: var(--zd-code-fg);
89
+ --color-success: var(--zd-success);
90
+ --color-danger: var(--zd-danger);
91
+ --color-warning: var(--zd-warning);
92
+ --color-info: var(--zd-info);
93
+ /* Overlay is intentionally theme-independent (always dark, not scheme-driven) */
94
+ --color-overlay: #000;
95
+ --color-image-overlay-bg: var(--zd-image-overlay-bg);
96
+ --color-image-overlay-fg: var(--zd-image-overlay-fg);
97
+ --color-chat-user-bg: var(--zd-chat-user-bg);
98
+ --color-chat-user-text: var(--zd-chat-user-text);
99
+ --color-chat-assistant-bg: var(--zd-chat-assistant-bg);
100
+ --color-chat-assistant-text: var(--zd-chat-assistant-text);
101
+ --color-matched-keyword-bg: var(--zd-matched-keyword-bg);
102
+ --color-matched-keyword-fg: var(--zd-matched-keyword-fg);
103
+
104
+ /* ========================================
105
+ * Spacing — hsp (horizontal) + vsp (vertical)
106
+ * ======================================== */
107
+ --spacing-0: 0;
108
+ --spacing-px: 1px;
109
+
110
+ /* Horizontal spacing (7 steps) */
111
+ --spacing-hsp-2xs: 0.125rem; /* 2px — tight inline */
112
+ --spacing-hsp-xs: 0.375rem; /* 6px — compact inline */
113
+ --spacing-hsp-sm: 0.5rem; /* 8px — small padding */
114
+ --spacing-hsp-md: 0.75rem; /* 12px — default gaps */
115
+ --spacing-hsp-lg: 1rem; /* 16px — standard padding */
116
+ --spacing-hsp-xl: 1.5rem; /* 24px — generous padding */
117
+ --spacing-hsp-2xl: 2rem; /* 32px — large padding */
118
+
119
+ /* Vertical spacing (8 steps) */
120
+ --spacing-vsp-3xs: 0.25rem; /* 4px — hairline gap */
121
+ --spacing-vsp-2xs: 0.4375rem; /* 7px — tight gap */
122
+ --spacing-vsp-xs: 0.875rem; /* 14px — small gap */
123
+ --spacing-vsp-sm: 1.25rem; /* 20px — compact gap */
124
+ --spacing-vsp-md: 1.5rem; /* 24px — standard gap */
125
+ --spacing-vsp-lg: 1.75rem; /* 28px — section gap */
126
+ --spacing-vsp-xl: 2.5rem; /* 40px — large section gap */
127
+ --spacing-vsp-2xl: 3.5rem; /* 56px — page-level gap */
128
+
129
+ /* ========================================
130
+ * Element sizes — semantic icon dimensions
131
+ * ======================================== */
132
+ --spacing-icon-xs: 0.75rem; /* 12px — inline meta icons, chevrons */
133
+ --spacing-icon-sm: 1rem; /* 16px — standard UI icons */
134
+ --spacing-icon-md: 1.25rem; /* 20px — medium emphasis icons */
135
+ --spacing-icon-lg: 1.5rem; /* 24px — large / mobile icons */
136
+
137
+ /* Image overlay button chrome */
138
+ --spacing-image-overlay-inset: 0.5rem; /* 8px — overlay button corner inset + internal padding */
139
+
140
+ /* ========================================
141
+ * Elevation — the tight `@import "tailwindcss/utilities"` (no default
142
+ * @theme) drops Tailwind's default shadow scale, so `shadow-*` utilities
143
+ * generate nothing. Re-add the one elevation the components use: header
144
+ * and version-switcher dropdown panels apply `shadow-lg`. Value is
145
+ * Tailwind v4's default shadow-lg; the black is intentionally
146
+ * theme-independent (a drop shadow is absence of light, not a themed color).
147
+ * ======================================== */
148
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
149
+
150
+ /* ========================================
151
+ * Typography
152
+ * ======================================== */
153
+
154
+ /* ── Tier 2: Semantic font-size tokens (reference Tier 1 scale only) ── */
155
+ --text-micro: var(--text-scale-2xs); /* 12px — compact panel labels, color swatch annotations */
156
+ --text-caption: var(--text-scale-xs); /* labels, timestamps */
157
+ --text-small: var(--text-scale-sm); /* secondary text, nav items */
158
+ --text-body: var(--text-scale-md); /* paragraphs, default */
159
+ --text-title: var(--text-scale-lg); /* card titles, section labels */
160
+ --text-heading: var(--text-scale-xl); /* page headings */
161
+ --text-display: var(--text-scale-2xl); /* hero text */
162
+
163
+ /* Font families */
164
+ --font-sans: system-ui, sans-serif;
165
+ --font-mono: ui-monospace, monospace;
166
+
167
+ /* Font weights (4 steps) */
168
+ --font-weight-normal: 400;
169
+ --font-weight-medium: 500;
170
+ --font-weight-semibold: 600;
171
+ --font-weight-bold: 700;
172
+
173
+ /* Line heights (4 steps) */
174
+ --leading-tight: 1.25;
175
+ --leading-snug: 1.375;
176
+ --leading-normal: 1.5;
177
+ --leading-relaxed: 1.625;
178
+
179
+ /* Letter spacing / tracking (4 steps) */
180
+ --tracking-tight: -0.025em; /* headings, display text */
181
+ --tracking-normal: normal; /* browser default — resets any inherited tracking */
182
+ --tracking-wide: 0.05em; /* labels, UI text */
183
+ --tracking-wider: 0.1em; /* small caps, decorative */
184
+
185
+ /* ========================================
186
+ * Border radius (3 steps)
187
+ * ======================================== */
188
+ --radius-DEFAULT: 0.25rem; /* 4px — rounded */
189
+ --radius-lg: 0.5rem; /* 8px — rounded-lg */
190
+ --radius-full: 9999px; /* rounded-full */
191
+
192
+ /* ========================================
193
+ * Breakpoints (3 steps)
194
+ * ======================================== */
195
+ --breakpoint-sm: 640px;
196
+ --breakpoint-lg: 1024px;
197
+ --breakpoint-xl: 1280px;
198
+ }
199
+
200
+ /* ========================================
201
+ * Z-index tiers — semantic, single-namespace default scale.
202
+ *
203
+ * The 13 tokens below are the package DEFAULTS (mirrors defaultZIndexTiers
204
+ * from @takazudo/zudo-doc/z-index-defaults, #2654). Tailwind v4 reads each
205
+ * --z-index-<name> theme key and generates a `z-<name>` utility, so e.g.
206
+ * --z-index-toolbar: 20 produces `.z-toolbar { z-index: 20 }`; raw CSS can
207
+ * also reference `z-index: var(--z-index-<name>)`.
208
+ *
209
+ * A project only needs its own src/config/z-index-tokens.ts +
210
+ * gen:z-index/check:z-index codegen if it OVERRIDES a tier — the
211
+ * GENERATED:Z_INDEX block that used to live in every project's global.css is
212
+ * now opt-in customization only, not a mandatory per-project artifact.
213
+ * ======================================== */
214
+ @theme {
215
+ --z-index-content: 0;
216
+ --z-index-local-1: 1;
217
+ --z-index-local-2: 2;
218
+ --z-index-local-3: 3;
219
+ --z-index-sidebar: 10;
220
+ --z-index-toolbar: 20;
221
+ --z-index-dropdown: 30;
222
+ --z-index-popover: 40;
223
+ --z-index-modal-backdrop: 50;
224
+ --z-index-modal: 60;
225
+ --z-index-toast: 70;
226
+ --z-index-tooltip: 80;
227
+ --z-index-drag: 90;
228
+ }
229
+
230
+ :root {
231
+ /* Default responsive range; sidebar-resizer.ts allows 192–448px for explicit resizing. */
232
+ --zd-sidebar-w: clamp(14rem, 20vw, 22rem);
233
+
234
+ /* ── Tier 1: Abstract font-size scale (raw values — NOT for direct component use) ── */
235
+ /* Used only as a source of truth for Tier 2 semantic tokens above. */
236
+ --text-scale-2xs: 0.75rem; /* 12px */
237
+ --text-scale-xs: 0.875rem; /* 14px */
238
+ --text-scale-sm: 1rem; /* 16px */
239
+ --text-scale-md: 1.2rem; /* 19.2px */
240
+ --text-scale-lg: 1.4rem; /* 22.4px */
241
+ --text-scale-xl: 3rem; /* 48px */
242
+ --text-scale-2xl: 3.75rem; /* 60px */
243
+
244
+ --default-transition-duration: 150ms; /* consumed by image-enlarge and hash-link opacity fade */
245
+ --zd-transition-slow: 200ms; /* sidebar transform/visibility and content-band max-width */
246
+ --zd-transition-slower: 300ms; /* view-transition fade-in (contentFadeIn animation) */
247
+ --zd-header-h: 80px; /* sticky header height; consumed by scroll-margin-top on [id] anchors */
248
+ }
249
+
250
+ /* ========================================
251
+ * Base styles
252
+ * ======================================== */
253
+
254
+ [id] {
255
+ scroll-margin-top: var(--zd-header-h);
256
+ }
257
+
258
+ body {
259
+ background-color: var(--color-bg);
260
+ color: var(--color-fg);
261
+ }
262
+
263
+ ::selection {
264
+ background-color: var(--color-sel-bg);
265
+ color: var(--color-sel-fg);
266
+ }
267
+
268
+ @layer base {
269
+ a {
270
+ text-underline-offset: 4px;
271
+ }
272
+ button {
273
+ cursor: pointer;
274
+ }
275
+ :focus-visible {
276
+ outline: 2px solid var(--color-accent);
277
+ outline-offset: 2px;
278
+ }
279
+ }
280
+
281
+ /* ── Search highlight ── */
282
+ [data-search-results] mark {
283
+ background-color: var(--color-matched-keyword-bg);
284
+ color: var(--color-matched-keyword-fg);
285
+ padding: 0;
286
+ border-radius: 2px;
287
+ }
288
+
289
+ /* Version-switcher responsive visibility (was an inline <style> child of
290
+ * the data-version-switcher <div>; moved to global.css to avoid the
291
+ * <style>-inside-<div> HTML5 content-model violation flagged by
292
+ * html-validate — see zudolab/zudo-doc#1505).
293
+ *
294
+ * Pins onto the `.hidden` baseline that Tailwind always generates so
295
+ * consumers wrapping <VersionSwitcher> in `<div class="hidden lg:block">`
296
+ * still get the desktop override even when the content scanner did not
297
+ * generate `.lg:block`. Mobile (<64rem) falls through to `.hidden`'s
298
+ * `display: none`. Inert when no version-switcher is on the page. */
299
+ @media (min-width: 64rem) {
300
+ .hidden:has(> [data-version-switcher]) {
301
+ display: block;
302
+ }
303
+ }
304
+
305
+ /* ── Find-in-page highlight ── */
306
+ /* Deliberate ephemeral-vs-persistent split: find-in-page uses color-mix(warning)
307
+ * because it is a transient browser-controlled overlay that appears and disappears
308
+ * without page navigation. Search results use --color-matched-keyword-bg/fg because
309
+ * they are persistent semantic highlights tied to the current query state.
310
+ * Do NOT unify these two highlight strategies — the visual distinction is intentional. */
311
+ .find-match {
312
+ background-color: color-mix(in oklch, var(--color-warning) 40%, transparent);
313
+ border-radius: 2px;
314
+ }
315
+ .find-match-active {
316
+ background-color: color-mix(in oklch, var(--color-warning) 70%, transparent);
317
+ border-radius: 2px;
318
+ outline: 2px solid color-mix(in oklch, var(--color-warning) 90%, transparent);
319
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Default z-index tiers — 13 tiers, `content` (0) through `drag` (90).
3
+ *
4
+ * Ported from the `create-zudo-doc` base template's
5
+ * `src/config/z-index-tokens.ts` `Z_INDEX_TIERS` export (epic
6
+ * zudolab/zudo-doc#2651, S4 #2654). Consumed by the theme-CSS default
7
+ * (#2655) for the shipped `@theme` z-index block; a project's own
8
+ * `gen-z-index` codegen (from `@takazudo/zudo-doc`'s `gen-z-index` bin)
9
+ * becomes opt-in customization on top of this default rather than the only
10
+ * source.
11
+ *
12
+ * Only `name`/`value` are carried in the exported shape — `purpose`/`kind`
13
+ * were documentation-only in the template and are preserved below as source
14
+ * comments instead.
15
+ *
16
+ * Strategy (from zudolab/zudo-css-wisdom z-index-strategy): semantic single-
17
+ * namespace tokens — names describe ROLES, never magnitudes. One flat ordered
18
+ * list. Values are deliberately gapped but otherwise arbitrary: renaming and
19
+ * reordering is cheap, which is the whole point. Tailwind v4 reads the
20
+ * `--z-index-<name>` theme key and generates a `z-<name>` utility, so e.g.
21
+ * `@theme { --z-index-toolbar: 20 }` produces `.z-toolbar { z-index: 20 }`.
22
+ *
23
+ * `local-1`/`local-2`/`local-3` ("local" kind in the template) are anonymous
24
+ * reusable helpers for promoting a child WITHIN a parent stacking context
25
+ * (`isolation: isolate` / `position: relative`), not a position on the
26
+ * global stacking scale. Every other tier is "global".
27
+ *
28
+ * Rationale for the two zudo-doc-specific additions (NOT in the generic
29
+ * overlay-centric strategy scale):
30
+ * - `sidebar` — persistent layout chrome (desktop sidebar, TOC, sidebar-toggle
31
+ * handle, resizer handle). The strategy's scale has no persistent-sidebar/TOC
32
+ * tier. `toolbar` (the sticky header) is deliberately placed ABOVE `sidebar`
33
+ * to preserve the existing header-wins ordering; they do not overlap
34
+ * spatially, but the historical relationship is kept explicit.
35
+ * - `drag` — transient drag affordance (sidebar-resizer ghost line). Replaces
36
+ * the old `z-9999` anti-pattern with a named top-of-steady-UI tier.
37
+ *
38
+ * `popover`, `toast`, and `tooltip` are reserved canonical tiers from the
39
+ * strategy's scale — kept for completeness (and so downstream `create-zudo-doc`
40
+ * users inherit the full scale) even though zudo-doc does not use them yet.
41
+ */
42
+ export declare const defaultZIndexTiers: ReadonlyArray<{
43
+ name: string;
44
+ value: number;
45
+ }>;
@@ -0,0 +1,34 @@
1
+ const defaultZIndexTiers = [
2
+ // global — default in-flow content (implicit baseline)
3
+ { name: "content", value: 0 },
4
+ // local — child promotion inside an isolated parent stacking context
5
+ { name: "local-1", value: 1 },
6
+ // local — child promotion inside an isolated parent stacking context
7
+ { name: "local-2", value: 2 },
8
+ // local — child promotion inside an isolated parent stacking context
9
+ { name: "local-3", value: 3 },
10
+ // global — persistent layout chrome: desktop sidebar, TOC, sidebar-toggle
11
+ // handle, resizer handle
12
+ { name: "sidebar", value: 10 },
13
+ // global — sticky top header (sits above sidebar chrome)
14
+ { name: "toolbar", value: 20 },
15
+ // global — header menus, version/language switchers
16
+ { name: "dropdown", value: 30 },
17
+ // global — reserved: inline popovers (canonical scale; not yet used)
18
+ { name: "popover", value: 40 },
19
+ // global — mobile drawer backdrop, <dialog> ::backdrop
20
+ { name: "modal-backdrop", value: 50 },
21
+ // global — mobile sidebar drawer panel, search <dialog>
22
+ { name: "modal", value: 60 },
23
+ // global — reserved: transient notifications (canonical scale; not yet used)
24
+ { name: "toast", value: 70 },
25
+ // global — reserved: highest steady UI layer, below only the transient drag
26
+ // tier (canonical scale; not yet used)
27
+ { name: "tooltip", value: 80 },
28
+ // global — transient drag affordance: sidebar-resizer ghost line (replaces
29
+ // the z-9999 anti-pattern)
30
+ { name: "drag", value: 90 }
31
+ ];
32
+ export {
33
+ defaultZIndexTiers
34
+ };