@takazudo/zudo-doc 5.28.2 → 6.0.1

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 (511) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +49 -16
  3. package/bin/gen-z-index.mjs +18 -18
  4. package/dist/agent-docs/identity.d.ts +4 -0
  5. package/dist/agent-docs/identity.js +24 -0
  6. package/dist/agent-docs/index.d.ts +5 -0
  7. package/dist/agent-docs/index.js +5 -0
  8. package/dist/agent-docs/limits.d.ts +11 -0
  9. package/dist/agent-docs/limits.js +24 -0
  10. package/dist/agent-docs/search.d.ts +14 -0
  11. package/dist/agent-docs/search.js +82 -0
  12. package/dist/agent-docs/tokenize.d.ts +2 -0
  13. package/dist/agent-docs/tokenize.js +22 -0
  14. package/dist/agent-docs/types.d.ts +68 -0
  15. package/dist/agent-docs/types.js +0 -0
  16. package/dist/ai-chat-modal/index.d.ts +1 -4
  17. package/dist/ai-chat-modal/index.js +183 -123
  18. package/dist/asset-components/asset-card.d.ts +1 -2
  19. package/dist/asset-components/asset-card.js +12 -12
  20. package/dist/asset-components/asset-code.d.ts +1 -2
  21. package/dist/asset-components/asset-code.js +10 -10
  22. package/dist/asset-components/shared.d.ts +3 -4
  23. package/dist/asset-components/shared.js +4 -4
  24. package/dist/asset-index-page/body.d.ts +5 -6
  25. package/dist/asset-index-page/body.js +6 -6
  26. package/dist/asset-index-page/index.d.ts +1 -2
  27. package/dist/asset-index-page/index.js +1 -1
  28. package/dist/asset-page/body.d.ts +5 -9
  29. package/dist/asset-page/body.js +3 -3
  30. package/dist/asset-page/components.d.ts +16 -17
  31. package/dist/asset-page/components.js +10 -9
  32. package/dist/asset-page/index.d.ts +1 -2
  33. package/dist/asset-page/index.js +1 -1
  34. package/dist/auto-logo/index.d.ts +1 -2
  35. package/dist/auto-logo/index.js +2 -2
  36. package/dist/body-foot-util/body-foot-util-area.d.ts +3 -4
  37. package/dist/body-foot-util/body-foot-util-area.js +1 -2
  38. package/dist/body-foot-util/edit-link.d.ts +2 -3
  39. package/dist/body-foot-util/edit-link.js +1 -2
  40. package/dist/breadcrumb/breadcrumb.d.ts +6 -6
  41. package/dist/breadcrumb/breadcrumb.js +3 -4
  42. package/dist/catalog.js +1 -1
  43. package/dist/category-nav/index.d.ts +1 -2
  44. package/dist/category-nav/index.js +11 -5
  45. package/dist/category-tree-nav/index.d.ts +1 -2
  46. package/dist/category-tree-nav/index.js +3 -3
  47. package/dist/chrome/derive.d.ts +18 -27
  48. package/dist/chrome/derive.js +47 -29
  49. package/dist/chrome/index.d.ts +5 -5
  50. package/dist/chrome/index.js +1 -1
  51. package/dist/chrome/island-data.d.ts +4 -0
  52. package/dist/chrome/island-data.js +52 -0
  53. package/dist/chrome/primary-slots.d.ts +2 -3
  54. package/dist/chrome-bindings.d.ts +30 -22
  55. package/dist/code-group/index.d.ts +3 -4
  56. package/dist/code-group/index.js +3 -7
  57. package/dist/code-syntax/code-block-enhancer.d.ts +1 -2
  58. package/dist/code-syntax/code-block-enhancer.js +2 -2
  59. package/dist/code-syntax/mermaid-init.d.ts +1 -2
  60. package/dist/code-syntax/mermaid-init.js +5 -2
  61. package/dist/code-syntax/tabs-init-script.js +1 -1
  62. package/dist/code-syntax/tabs-init.d.ts +1 -2
  63. package/dist/code-syntax/tabs-init.js +2 -2
  64. package/dist/code-syntax/tabs.d.ts +6 -6
  65. package/dist/code-syntax/tabs.js +8 -8
  66. package/dist/compiled.css +2937 -2942
  67. package/dist/config/component-tokens.d.ts +1 -1
  68. package/dist/config/component-tokens.js +22 -0
  69. package/dist/config-assertions/index.d.ts +13 -0
  70. package/dist/config-assertions/index.js +14 -0
  71. package/dist/config.d.ts +36 -17
  72. package/dist/config.js +23 -95
  73. package/dist/content/content-blockquote.d.ts +2 -3
  74. package/dist/content/content-blockquote.js +3 -3
  75. package/dist/content/content-code.d.ts +3 -4
  76. package/dist/content/content-code.js +5 -5
  77. package/dist/content/content-link.d.ts +3 -4
  78. package/dist/content/content-link.js +10 -10
  79. package/dist/content/content-ol.d.ts +2 -3
  80. package/dist/content/content-ol.js +5 -4
  81. package/dist/content/content-paragraph.d.ts +2 -3
  82. package/dist/content/content-paragraph.js +1 -1
  83. package/dist/content/content-strong.d.ts +2 -3
  84. package/dist/content/content-strong.js +3 -3
  85. package/dist/content/content-table.d.ts +2 -3
  86. package/dist/content/content-table.js +4 -4
  87. package/dist/content/content-ul.d.ts +2 -3
  88. package/dist/content/content-ul.js +4 -4
  89. package/dist/content/heading-h2.d.ts +2 -3
  90. package/dist/content/heading-h2.js +4 -4
  91. package/dist/content/heading-h3.d.ts +2 -3
  92. package/dist/content/heading-h3.js +4 -4
  93. package/dist/content/heading-h4.d.ts +2 -3
  94. package/dist/content/heading-h4.js +4 -4
  95. package/dist/content-admonition/index.d.ts +3 -4
  96. package/dist/content-admonition/index.js +2 -2
  97. package/dist/content.css +35 -33
  98. package/dist/design-token-panel-bootstrap-controller.d.ts +178 -0
  99. package/dist/design-token-panel-bootstrap-controller.js +359 -0
  100. package/dist/design-token-panel-bootstrap-island.d.ts +5 -0
  101. package/dist/design-token-panel-bootstrap-island.js +19 -0
  102. package/dist/design-token-panel-bootstrap.d.ts +5 -195
  103. package/dist/design-token-panel-bootstrap.js +3 -288
  104. package/dist/desktop-sidebar-toggle-island/index.d.ts +2 -7
  105. package/dist/desktop-sidebar-toggle-island/index.js +2 -58
  106. package/dist/desktop-sidebar-toggle-island/island.d.ts +4 -0
  107. package/dist/desktop-sidebar-toggle-island/island.js +43 -0
  108. package/dist/desktop-sidebar-toggle-island/storage.d.ts +4 -0
  109. package/dist/desktop-sidebar-toggle-island/storage.js +29 -0
  110. package/dist/desktop-toc-toggle-island/index.d.ts +2 -7
  111. package/dist/desktop-toc-toggle-island/index.js +2 -58
  112. package/dist/desktop-toc-toggle-island/island.d.ts +4 -0
  113. package/dist/desktop-toc-toggle-island/island.js +43 -0
  114. package/dist/desktop-toc-toggle-island/storage.d.ts +4 -0
  115. package/dist/desktop-toc-toggle-island/storage.js +29 -0
  116. package/dist/details/details.d.ts +3 -4
  117. package/dist/details/details.js +1 -1
  118. package/dist/doc-body-end/index.d.ts +1 -2
  119. package/dist/doc-body-end/index.js +1 -1
  120. package/dist/doc-body-end-islands/design-token-panel-island.d.ts +2 -2
  121. package/dist/doc-body-end-islands/design-token-panel-island.js +3 -7
  122. package/dist/doc-body-end-islands/index.d.ts +4 -21
  123. package/dist/doc-body-end-islands/index.js +5 -3
  124. package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +3 -13
  125. package/dist/doc-body-end-islands/theme-pack-switcher-island.js +11 -13
  126. package/dist/doc-content-header/index.d.ts +1 -2
  127. package/dist/doc-content-header/index.js +1 -1
  128. package/dist/doc-history/index.d.ts +1 -1
  129. package/dist/doc-history/index.js +166 -141
  130. package/dist/doc-history-area/index.d.ts +6 -4
  131. package/dist/doc-history-area/index.js +17 -16
  132. package/dist/doc-metainfo-area/index.d.ts +2 -3
  133. package/dist/doc-metainfo-area/index.js +1 -1
  134. package/dist/doc-page-renderer/index.d.ts +13 -7
  135. package/dist/doc-page-renderer/index.js +10 -1
  136. package/dist/doc-page-shell/index.d.ts +20 -7
  137. package/dist/doc-page-shell/index.js +17 -6
  138. package/dist/doc-pager/index.d.ts +1 -2
  139. package/dist/doc-pager/index.js +3 -3
  140. package/dist/doc-tags-area/index.d.ts +2 -3
  141. package/dist/doc-tags-area/index.js +1 -1
  142. package/dist/doclayout/doc-layout-with-defaults.d.ts +9 -9
  143. package/dist/doclayout/doc-layout-with-defaults.js +5 -15
  144. package/dist/doclayout/doc-layout.d.ts +26 -27
  145. package/dist/doclayout/doc-layout.js +23 -14
  146. package/dist/docs-schema/index.d.ts +4 -0
  147. package/dist/docs-schema/index.js +1 -0
  148. package/dist/extract-headings/index.js +43 -12
  149. package/dist/factory-context/index.d.ts +22 -19
  150. package/dist/features.css +75 -8
  151. package/dist/find-in-page/find-bar.d.ts +4 -2
  152. package/dist/find-in-page/find-bar.js +58 -69
  153. package/dist/find-in-page/index.d.ts +2 -8
  154. package/dist/find-in-page/index.js +33 -30
  155. package/dist/footer/footer.d.ts +3 -4
  156. package/dist/footer/footer.js +3 -3
  157. package/dist/footer-with-defaults/index.d.ts +2 -3
  158. package/dist/footer-with-defaults/index.js +1 -1
  159. package/dist/frontmatter-preview-defaults/index.js +1 -0
  160. package/dist/head/doc-head.d.ts +1 -1
  161. package/dist/head/doc-head.js +24 -32
  162. package/dist/head/og-tags.d.ts +1 -1
  163. package/dist/head/og-tags.js +8 -7
  164. package/dist/head/twitter-card.d.ts +1 -1
  165. package/dist/head/twitter-card.js +1 -1
  166. package/dist/head-with-defaults/index.d.ts +7 -2
  167. package/dist/head-with-defaults/index.js +46 -32
  168. package/dist/header/header.d.ts +8 -8
  169. package/dist/header/header.js +9 -11
  170. package/dist/header/types.d.ts +7 -7
  171. package/dist/header-with-defaults/index.d.ts +3 -4
  172. package/dist/header-with-defaults/index.js +27 -14
  173. package/dist/home-intro/index.d.ts +2 -5
  174. package/dist/home-intro/index.js +7 -5
  175. package/dist/home-intro/prepare.js +4 -3
  176. package/dist/home-page/index.d.ts +3 -3
  177. package/dist/home-page/index.js +19 -17
  178. package/dist/html-preview-wrapper/highlighted-code.d.ts +3 -4
  179. package/dist/html-preview-wrapper/highlighted-code.js +19 -17
  180. package/dist/html-preview-wrapper/html-preview-wrapper.d.ts +4 -25
  181. package/dist/html-preview-wrapper/html-preview-wrapper.js +2 -87
  182. package/dist/html-preview-wrapper/html-preview.d.ts +3 -10
  183. package/dist/html-preview-wrapper/html-preview.js +13 -37
  184. package/dist/html-preview-wrapper/index.d.ts +2 -1
  185. package/dist/html-preview-wrapper/index.js +1 -1
  186. package/dist/html-preview-wrapper/preview-base.d.ts +3 -5
  187. package/dist/html-preview-wrapper/preview-base.js +56 -59
  188. package/dist/html-preview-wrapper/wrapper.d.ts +20 -0
  189. package/dist/html-preview-wrapper/wrapper.js +37 -0
  190. package/dist/hydration-pending.d.ts +3 -5
  191. package/dist/hydration-pending.js +7 -5
  192. package/dist/i18n-version/language-switcher.d.ts +5 -32
  193. package/dist/i18n-version/language-switcher.js +5 -106
  194. package/dist/i18n-version/switcher-generated-scripts.d.ts +2 -0
  195. package/dist/i18n-version/switcher-generated-scripts.js +107 -0
  196. package/dist/i18n-version/switcher-url-state.d.ts +76 -0
  197. package/dist/i18n-version/switcher-url-state.js +103 -0
  198. package/dist/i18n-version/version-banner.d.ts +2 -3
  199. package/dist/i18n-version/version-banner.js +1 -1
  200. package/dist/i18n-version/version-switcher.d.ts +5 -50
  201. package/dist/i18n-version/version-switcher.js +5 -157
  202. package/dist/icons/index.d.ts +18 -19
  203. package/dist/icons/index.js +17 -33
  204. package/dist/image-enlarge/index.d.ts +1 -10
  205. package/dist/image-enlarge/index.js +80 -55
  206. package/dist/image-enlarge/public.d.ts +2 -0
  207. package/dist/image-enlarge/public.js +6 -0
  208. package/dist/image-enlarge/ssr-fallback.d.ts +2 -0
  209. package/dist/image-enlarge/ssr-fallback.js +8 -0
  210. package/dist/index.d.ts +11 -4
  211. package/dist/inline-version-switcher/index.d.ts +1 -2
  212. package/dist/inline-version-switcher/index.js +1 -1
  213. package/dist/island-types/index.d.ts +2 -2
  214. package/dist/island-types/index.js +1 -5
  215. package/dist/math-block/index.d.ts +4 -7
  216. package/dist/math-block/index.js +5 -5
  217. package/dist/mcp/handler.d.ts +8 -0
  218. package/dist/mcp/handler.js +129 -0
  219. package/dist/mcp/index.d.ts +4 -0
  220. package/dist/mcp/index.js +7 -0
  221. package/dist/mcp/loader.d.ts +19 -0
  222. package/dist/mcp/loader.js +202 -0
  223. package/dist/mdx-components/index.js +40 -108
  224. package/dist/mermaid-enlarge/index.d.ts +1 -8
  225. package/dist/mermaid-enlarge/index.js +174 -158
  226. package/dist/mermaid-enlarge/public.d.ts +2 -0
  227. package/dist/mermaid-enlarge/public.js +6 -0
  228. package/dist/mermaid-enlarge/ssr-fallback.d.ts +2 -0
  229. package/dist/mermaid-enlarge/ssr-fallback.js +8 -0
  230. package/dist/metainfo/doc-metainfo.d.ts +2 -3
  231. package/dist/metainfo/doc-metainfo.js +1 -4
  232. package/dist/metainfo/doc-tags.d.ts +2 -3
  233. package/dist/metainfo/doc-tags.js +1 -1
  234. package/dist/metainfo/frontmatter-preview.d.ts +3 -4
  235. package/dist/metainfo/frontmatter-preview.js +1 -1
  236. package/dist/nav-data-prep/index.js +6 -4
  237. package/dist/nav-indexing/category-nav.d.ts +2 -3
  238. package/dist/nav-indexing/category-nav.js +1 -2
  239. package/dist/nav-indexing/category-tree-nav.d.ts +2 -3
  240. package/dist/nav-indexing/category-tree-nav.js +1 -1
  241. package/dist/nav-indexing/doc-card-grid.d.ts +2 -3
  242. package/dist/nav-indexing/doc-card-grid.js +1 -2
  243. package/dist/nav-indexing/docs-sitemap.d.ts +2 -3
  244. package/dist/nav-indexing/docs-sitemap.js +2 -2
  245. package/dist/nav-indexing/index.d.ts +1 -1
  246. package/dist/nav-indexing/nav-card-grid.d.ts +2 -3
  247. package/dist/nav-indexing/nav-card-grid.js +1 -2
  248. package/dist/nav-indexing/note-tray-index-parts/card-list.d.ts +1 -2
  249. package/dist/nav-indexing/note-tray-index-parts/card-list.js +4 -4
  250. package/dist/nav-indexing/note-tray-index-parts/date-line.d.ts +2 -3
  251. package/dist/nav-indexing/note-tray-index-parts/date-line.js +1 -1
  252. package/dist/nav-indexing/note-tray-index-parts/index-list.d.ts +1 -2
  253. package/dist/nav-indexing/note-tray-index-parts/index-list.js +2 -2
  254. package/dist/nav-indexing/note-tray-index-parts/timeline.d.ts +1 -2
  255. package/dist/nav-indexing/note-tray-index-parts/timeline.js +2 -2
  256. package/dist/nav-indexing/note-tray-index.d.ts +1 -2
  257. package/dist/nav-indexing/note-tray-index.js +1 -1
  258. package/dist/nav-indexing/site-tree-nav-demo.d.ts +2 -3
  259. package/dist/nav-indexing/site-tree-nav-demo.js +2 -2
  260. package/dist/nav-indexing/tag-nav.d.ts +1 -2
  261. package/dist/nav-indexing/tag-nav.js +1 -1
  262. package/dist/nav-indexing/types.d.ts +2 -2
  263. package/dist/nav-indexing/versions-page-content.d.ts +2 -3
  264. package/dist/nav-indexing/versions-page-content.js +8 -8
  265. package/dist/note-tray-index/index.d.ts +1 -2
  266. package/dist/note-tray-index/index.js +1 -1
  267. package/dist/page-loading/page-loading-overlay.d.ts +1 -2
  268. package/dist/page-loading/page-loading-overlay.js +3 -5
  269. package/dist/plugins/agent-export.d.ts +3 -0
  270. package/dist/plugins/agent-export.js +34 -0
  271. package/dist/plugins/internal/agent-export/chunk.d.ts +5 -0
  272. package/dist/plugins/internal/agent-export/chunk.js +90 -0
  273. package/dist/plugins/internal/agent-export/index.d.ts +24 -0
  274. package/dist/plugins/internal/agent-export/index.js +123 -0
  275. package/dist/plugins/internal/agent-export/normalize.d.ts +5 -0
  276. package/dist/plugins/internal/agent-export/normalize.js +73 -0
  277. package/dist/plugins/internal/llms-txt/dev-middleware.d.ts +6 -0
  278. package/dist/plugins/internal/llms-txt/dev-middleware.js +8 -3
  279. package/dist/plugins/internal/llms-txt/emit.js +23 -6
  280. package/dist/plugins/internal/llms-txt/generate.d.ts +7 -1
  281. package/dist/plugins/internal/llms-txt/generate.js +9 -2
  282. package/dist/plugins/internal/llms-txt/load.d.ts +2 -0
  283. package/dist/plugins/internal/llms-txt/load.js +20 -4
  284. package/dist/plugins/internal/llms-txt/types.d.ts +10 -0
  285. package/dist/plugins/routes.js +4 -0
  286. package/dist/preset.d.ts +19 -9
  287. package/dist/preset.js +20 -1
  288. package/dist/route-context-payload/index.js +1 -1
  289. package/dist/routes/404.d.ts +2 -3
  290. package/dist/routes/404.js +1 -1
  291. package/dist/routes/_chrome.d.ts +5 -5
  292. package/dist/routes/_chrome.js +7 -2
  293. package/dist/routes/_context.d.ts +4 -4
  294. package/dist/routes/_design-token-panel-bootstrap.d.ts +1 -4
  295. package/dist/routes/_design-token-panel-bootstrap.js +9 -1
  296. package/dist/routes/docs-slug.d.ts +2 -3
  297. package/dist/routes/docs-tags-index.d.ts +2 -3
  298. package/dist/routes/docs-tags-index.js +1 -1
  299. package/dist/routes/docs-tags-tag.d.ts +2 -3
  300. package/dist/routes/docs-tags-tag.js +1 -1
  301. package/dist/routes/docs-versions.d.ts +2 -3
  302. package/dist/routes/docs-versions.js +1 -1
  303. package/dist/routes/files-path.d.ts +2 -3
  304. package/dist/routes/files-path.js +1 -1
  305. package/dist/routes/index.d.ts +2 -3
  306. package/dist/routes/index.js +1 -1
  307. package/dist/routes/locale-docs-slug.d.ts +2 -3
  308. package/dist/routes/locale-docs-tags-index.d.ts +2 -3
  309. package/dist/routes/locale-docs-tags-index.js +1 -1
  310. package/dist/routes/locale-docs-tags-tag.d.ts +2 -3
  311. package/dist/routes/locale-docs-tags-tag.js +1 -1
  312. package/dist/routes/locale-docs-versions.d.ts +2 -3
  313. package/dist/routes/locale-docs-versions.js +1 -1
  314. package/dist/routes/locale-files-path.d.ts +2 -3
  315. package/dist/routes/locale-files-path.js +1 -1
  316. package/dist/routes/locale-index.d.ts +2 -3
  317. package/dist/routes/locale-index.js +1 -1
  318. package/dist/routes/mcp.d.ts +5 -0
  319. package/dist/routes/mcp.js +25 -0
  320. package/dist/routes/v-docs-slug.d.ts +2 -3
  321. package/dist/routes/v-locale-docs-slug.d.ts +2 -3
  322. package/dist/search-widget/index.d.ts +1 -2
  323. package/dist/search-widget/index.js +4 -7
  324. package/dist/search-widget-script/generated-script.js +12 -5
  325. package/dist/settings-defaults.d.ts +2 -0
  326. package/dist/settings-defaults.js +93 -0
  327. package/dist/settings.d.ts +8 -2
  328. package/dist/sidebar/client-data.d.ts +18 -0
  329. package/dist/sidebar/client-data.js +47 -0
  330. package/dist/sidebar/index.d.ts +3 -1
  331. package/dist/sidebar/index.js +3 -1
  332. package/dist/sidebar/sidebar.d.ts +12 -44
  333. package/dist/sidebar/sidebar.js +4 -3
  334. package/dist/sidebar/types.d.ts +14 -0
  335. package/dist/sidebar-prepaint/index.d.ts +1 -2
  336. package/dist/sidebar-prepaint/index.js +4 -6
  337. package/dist/sidebar-resizer/sidebar-resizer-init.d.ts +2 -3
  338. package/dist/sidebar-resizer/sidebar-resizer-init.js +3 -3
  339. package/dist/sidebar-toggle-island/index.d.ts +8 -11
  340. package/dist/sidebar-toggle-island/index.js +75 -62
  341. package/dist/sidebar-tree/build-tree.js +5 -6
  342. package/dist/sidebar-tree/types.d.ts +2 -0
  343. package/dist/sidebar-tree-island/index.d.ts +4 -19
  344. package/dist/sidebar-tree-island/index.js +782 -436
  345. package/dist/sidebar-tree-island/scope-state.d.ts +38 -0
  346. package/dist/sidebar-tree-island/scope-state.js +151 -0
  347. package/dist/sidebar-tree-island/sidebar-scroll-preserve.js +6 -2
  348. package/dist/sidebar-utils/index.d.ts +17 -19
  349. package/dist/sidebar-utils/index.js +100 -3
  350. package/dist/sidebar-utils/scope.d.ts +11 -0
  351. package/dist/sidebar-utils/scope.js +67 -0
  352. package/dist/sidebar-with-defaults/index.d.ts +1 -2
  353. package/dist/sidebar-with-defaults/index.js +19 -18
  354. package/dist/site-schema/nav-tree.js +15 -15
  355. package/dist/site-schema/types.d.ts +1 -0
  356. package/dist/site-tree-nav/index.d.ts +2 -3
  357. package/dist/site-tree-nav/index.js +11 -12
  358. package/dist/site-tree-nav/normalize-island-props.d.ts +16 -0
  359. package/dist/site-tree-nav/normalize-island-props.js +122 -0
  360. package/dist/site-tree-nav-island/index.d.ts +3 -3
  361. package/dist/site-tree-nav-island/index.js +243 -144
  362. package/dist/smart-break/index.d.ts +3 -4
  363. package/dist/smart-break/index.js +1 -1
  364. package/dist/tab-item/tab-item.d.ts +3 -4
  365. package/dist/tab-item/tab-item.js +1 -1
  366. package/dist/tag-pages/index.d.ts +3 -3
  367. package/dist/tag-pages/index.js +10 -10
  368. package/dist/theme/color-scheme-provider.d.ts +3 -3
  369. package/dist/theme/color-scheme-provider.js +3 -3
  370. package/dist/theme/theme-pack-provider.d.ts +1 -1
  371. package/dist/theme/theme-pack-provider.js +3 -3
  372. package/dist/theme/theme-toggle.d.ts +2 -3
  373. package/dist/theme/theme-toggle.js +1 -1
  374. package/dist/theme-pack-dialog/index.d.ts +1 -1
  375. package/dist/theme-pack-dialog/index.js +69 -75
  376. package/dist/theme-pack-dialog/theme-pack-card.d.ts +3 -4
  377. package/dist/theme-pack-dialog/theme-pack-card.js +19 -17
  378. package/dist/theme-pack-switcher/index.d.ts +4 -5
  379. package/dist/theme-pack-switcher/index.js +52 -49
  380. package/dist/theme-packs/academia/meta.json +1 -1
  381. package/dist/theme-packs/academia/pack.css +1 -1
  382. package/dist/theme-packs/bauhaus/meta.json +1 -1
  383. package/dist/theme-packs/bauhaus/pack.css +2 -2
  384. package/dist/theme-packs/blueprint/meta.json +1 -1
  385. package/dist/theme-packs/blueprint/pack.css +2 -2
  386. package/dist/theme-packs/botanica/meta.json +1 -1
  387. package/dist/theme-packs/botanica/pack.css +2 -2
  388. package/dist/theme-packs/broadsheet/meta.json +1 -1
  389. package/dist/theme-packs/broadsheet/pack.css +2 -2
  390. package/dist/theme-packs/brutalist/meta.json +1 -1
  391. package/dist/theme-packs/brutalist/pack.css +2 -2
  392. package/dist/theme-packs/eink/meta.json +1 -1
  393. package/dist/theme-packs/eink/pack.css +1 -1
  394. package/dist/theme-packs/futura-editorial/meta.json +1 -1
  395. package/dist/theme-packs/futura-editorial/pack.css +2 -2
  396. package/dist/theme-packs/hearth/meta.json +1 -1
  397. package/dist/theme-packs/hearth/pack.css +2 -2
  398. package/dist/theme-packs/ledger/meta.json +1 -1
  399. package/dist/theme-packs/ledger/pack.css +1 -1
  400. package/dist/theme-packs/manuscript/meta.json +1 -1
  401. package/dist/theme-packs/manuscript/pack.css +1 -1
  402. package/dist/theme-packs/matcha/meta.json +1 -1
  403. package/dist/theme-packs/matcha/pack.css +2 -2
  404. package/dist/theme-packs/nocturne/meta.json +1 -1
  405. package/dist/theme-packs/nocturne/pack.css +2 -2
  406. package/dist/theme-packs/observatory/meta.json +1 -1
  407. package/dist/theme-packs/observatory/pack.css +2 -2
  408. package/dist/theme-packs/onyx/meta.json +1 -1
  409. package/dist/theme-packs/onyx/pack.css +2 -2
  410. package/dist/theme-packs/phosphor/meta.json +1 -1
  411. package/dist/theme-packs/phosphor/pack.css +2 -2
  412. package/dist/theme-packs/riso/meta.json +1 -1
  413. package/dist/theme-packs/riso/pack.css +2 -2
  414. package/dist/theme-packs/sakura/meta.json +1 -1
  415. package/dist/theme-packs/sakura/pack.css +2 -2
  416. package/dist/theme-packs/scandi/meta.json +1 -1
  417. package/dist/theme-packs/scandi/pack.css +1 -1
  418. package/dist/theme-packs/solar/meta.json +1 -1
  419. package/dist/theme-packs/solar/pack.css +1 -1
  420. package/dist/theme-packs/sumi/meta.json +1 -1
  421. package/dist/theme-packs/sumi/pack.css +2 -2
  422. package/dist/theme-packs/swissgrid/meta.json +1 -1
  423. package/dist/theme-packs/swissgrid/pack.css +1 -1
  424. package/dist/theme-packs/timberline/meta.json +1 -1
  425. package/dist/theme-packs/timberline/pack.css +2 -2
  426. package/dist/theme-packs/washi/meta.json +1 -1
  427. package/dist/theme-packs/washi/pack.css +2 -2
  428. package/dist/theme-toggle/index.d.ts +1 -1
  429. package/dist/theme-toggle/index.js +154 -167
  430. package/dist/theme.css +47 -121
  431. package/dist/toc/mobile-toc.d.ts +3 -5
  432. package/dist/toc/mobile-toc.js +29 -27
  433. package/dist/toc/toc.d.ts +3 -4
  434. package/dist/toc/toc.js +18 -18
  435. package/dist/toc/use-active-heading.d.ts +5 -4
  436. package/dist/toc/use-active-heading.js +36 -30
  437. package/dist/toc-prepaint/index.d.ts +1 -2
  438. package/dist/toc-prepaint/index.js +4 -6
  439. package/dist/transitions/nested-island-props-refresh.d.ts +3 -16
  440. package/dist/transitions/nested-island-props-refresh.js +133 -151
  441. package/dist/transitions/page-events.d.ts +8 -13
  442. package/dist/tree-nav-shared/index.d.ts +4 -5
  443. package/dist/tree-nav-shared/index.js +6 -7
  444. package/dist/use-modal-dialog/index.d.ts +9 -63
  445. package/dist/use-modal-dialog/index.js +41 -59
  446. package/dist/versions-page/index.d.ts +3 -3
  447. package/dist/versions-page/index.js +5 -5
  448. package/dist/wind/index.d.ts +5 -0
  449. package/dist/wind/index.js +169 -0
  450. package/dist/wind.json +498 -0
  451. package/dist/z-index-defaults/index.d.ts +4 -4
  452. package/dist/zdtp-loader.d.ts +7 -0
  453. package/dist/zdtp-loader.js +8 -0
  454. package/eject/asset-components/asset-card.tsx +14 -16
  455. package/eject/asset-components/asset-code.tsx +10 -12
  456. package/eject/asset-components/shared.tsx +5 -7
  457. package/eject/breadcrumb/breadcrumb.tsx +15 -16
  458. package/eject/code-group/index.tsx +4 -10
  459. package/eject/content-admonition/index.tsx +5 -6
  460. package/eject/desktop-sidebar-toggle-island/index.ts +4 -0
  461. package/eject/desktop-sidebar-toggle-island/island.tsx +50 -0
  462. package/eject/desktop-sidebar-toggle-island/storage.ts +27 -0
  463. package/eject/details/details.tsx +3 -5
  464. package/eject/doc-history/index.tsx +193 -179
  465. package/eject/doc-pager/index.tsx +3 -4
  466. package/eject/footer/footer.tsx +7 -9
  467. package/eject/header/header.tsx +42 -54
  468. package/eject/header/nav-overflow-script.ts +1 -1
  469. package/eject/header/types.ts +12 -13
  470. package/eject/image-enlarge/index.tsx +84 -69
  471. package/eject/image-enlarge/public.ts +2 -0
  472. package/eject/image-enlarge/ssr-fallback.tsx +7 -0
  473. package/eject/page-loading/page-loading-overlay.tsx +8 -15
  474. package/eject/sidebar/client-data.ts +68 -0
  475. package/eject/sidebar/index.ts +3 -0
  476. package/eject/sidebar/sidebar.tsx +16 -97
  477. package/eject/sidebar/types.ts +15 -0
  478. package/eject/sidebar-toggle-island/index.tsx +103 -102
  479. package/eject/sidebar-tree-island/index.tsx +827 -615
  480. package/eject/sidebar-tree-island/scope-state.ts +154 -0
  481. package/eject/sidebar-tree-island/sidebar-scroll-preserve.ts +8 -2
  482. package/eject/site-tree-nav-island/index.tsx +349 -222
  483. package/eject/tab-item/tab-item.tsx +2 -4
  484. package/eject/theme-toggle/hydration-pending.ts +6 -10
  485. package/eject/theme-toggle/index.tsx +133 -173
  486. package/eject/toc/mobile-toc.tsx +27 -31
  487. package/eject/toc/toc.tsx +21 -24
  488. package/eject/toc/use-active-heading.ts +43 -38
  489. package/package.json +40 -22
  490. package/routes-src/404.tsx +2 -3
  491. package/routes-src/_chrome.tsx +7 -2
  492. package/routes-src/_design-token-panel-bootstrap.tsx +1 -63
  493. package/routes-src/docs-slug.tsx +2 -3
  494. package/routes-src/docs-tags-index.tsx +2 -3
  495. package/routes-src/docs-tags-tag.tsx +2 -3
  496. package/routes-src/docs-versions.tsx +2 -3
  497. package/routes-src/files-path.tsx +2 -4
  498. package/routes-src/index.tsx +2 -3
  499. package/routes-src/locale-docs-slug.tsx +2 -3
  500. package/routes-src/locale-docs-tags-index.tsx +2 -3
  501. package/routes-src/locale-docs-tags-tag.tsx +2 -3
  502. package/routes-src/locale-docs-versions.tsx +2 -3
  503. package/routes-src/locale-files-path.tsx +2 -4
  504. package/routes-src/locale-index.tsx +2 -3
  505. package/routes-src/mcp.tsx +25 -0
  506. package/routes-src/v-docs-slug.tsx +2 -3
  507. package/routes-src/v-locale-docs-slug.tsx +2 -3
  508. package/tsconfig.base.json +1 -1
  509. package/dist/safelist.css +0 -2
  510. package/dist/theme-no-reset.css +0 -379
  511. package/eject/desktop-sidebar-toggle-island/index.tsx +0 -110
package/CHANGELOG.md CHANGED
@@ -8,6 +8,39 @@ The format is based on Keep a Changelog, and release notes are generated from th
8
8
 
9
9
  No unreleased changes.
10
10
 
11
+ ## [6.0.1] - 2026-10-12
12
+
13
+ ### Features
14
+
15
+ - Add `--zdc-header-logo-font` and `--zdc-header-logo-weight` to style the site-name anchor independently of navigation and controls. Shipped theme packs honor both tokens while preserving their existing defaults ([#4533](https://github.com/zudolab/zudo-doc/issues/4533)). (96243bc6)
16
+
17
+ ### Bug Fixes
18
+
19
+ - `defineChromeBindings({ mdxExtras })` accepts MDX components with their own required typed props again (for example `(props: { html: string }) => Child`), fixing a 6.0.0 TS2322 regression. Entries must still be components returning a renderable `Child`; fixed chrome slots keep their call-side prop checks ([#4530](https://github.com/zudolab/zudo-doc/issues/4530)). (bd090491)
20
+ - The native sidebar islands (`SidebarToggle`, `SidebarTree`) no longer serialize page descriptions into their client payload, shrinking each page's hydration data. The new `toSidebarClientData(nodes, navigation?)` helper in `@takazudo/zudo-doc/sidebar` gives custom island hosts the same projection. Custom `sidebarNodes` arrays are now copied rather than passed by identity ([#4536](https://github.com/zudolab/zudo-doc/issues/4536)). (a1e01aad)
21
+
22
+ ## [6.0.0] - 2026-10-11
23
+
24
+ ### Breaking Changes
25
+
26
+ - Moves the framework to the zfb 4 engine family. `@takazudo/zfb`, `@takazudo/zfb-runtime` and `@takazudo/zfb-md-wasm` are now required at `^4.3.1`. Follow the [migration guide](https://zudo-doc.takazudomodular.com/docs/guides/migrating-to-zudo-doc-6/) to upgrade a 5.x project. (b9dd43b0d)
27
+ - Rendering uses zfb's owned zudo-react runtime instead of Preact, so Preact is no longer a peer of the core package. Extend `@takazudo/zudo-doc/tsconfig.base.json`, remove React→Preact compatibility paths, and port host or ejected components to zudo-react signals and `on:*` events. (b9dd43b0d)
28
+ - Styling uses the zudo-wind utility compiler instead of Tailwind. Remove Tailwind directives from your CSS entry and declare tokens as plain `:root` variables. The `./safelist.css` and `./theme-no-reset.css` exports are removed, and `./wind.json` is added and registered automatically by `zudoDoc()`. (b9dd43b0d)
29
+ - Public types move to zudo-react. Element descriptions use `Description`/`Child` and component callbacks use `Component`. Intrinsic-compatible components take `class` instead of `className`. `useModalDialog(...)` becomes `modalDialog(scope, options)`, and `ThemePackDialogProps.open` is a `ReadonlySignal<boolean>`. (b9dd43b0d)
30
+ - `DocHistory` and `DesignTokenPanelBootstrap` chrome-binding overrides are now server boundaries that own their Island mount. Use the exported `DocHistoryBoundary` for standard history. (84333fa7e)
31
+ - The optional `@takazudo/zudo-doc-history-server` peer now requires `^6.0.0`.
32
+
33
+ ### Features
34
+
35
+ - Adds an opt-in agent-readable documentation export (`agentExport`) and a read-only MCP server (`mcp`) with full-text search and fetch tools, plus agent discovery links. Both default to `false`. (4591145b0, 860eda41e, 578abf4ec)
36
+ - Adds Broader Tree sidebar controls: broaden the tree to its editorial parent, show only one branch, and restore the current page's local tree. Object-form sidebar configs with `items` and `initialPath` supply editorial parents outside a local view. (9c9826dcc)
37
+
38
+ ### Bug Fixes
39
+
40
+ - Heading references and code-fence anchors now match zfb's native heading IDs. (3f35bff85)
41
+ - The agent export honors `copyPublicWithBase: false` when it places `agent/v1`. (db8e8495d)
42
+ - The search shortcut placeholder survives reconnects. (05c35801e, dab099db9)
43
+
11
44
  ## [5.28.2] - 2026-09-28
12
45
 
13
46
  ### Bug Fixes
package/README.md CHANGED
@@ -9,14 +9,14 @@ instead of editing the generated markdown directly.
9
9
  This package provides the missing-by-design framework concerns:
10
10
 
11
11
  - **Sidebar tree builder** (`./sidebar-tree`) — turns collection entries + `_category_.json` into breadcrumb/navigation nodes.
12
- - **Theme controls** (`./theme`) — color scheme provider + design-token tweak panel (Preact island that wraps an iframe).
12
+ - **Theme controls** (`./theme`) — color scheme provider + design-token panel bootstrap (the optional zdtp package owns its opaque Preact UI).
13
13
  - **Theme toggle (bare)** (`./theme-toggle`) — the un-wrapped ThemeToggle component for call sites that compose their own `<Island>` (the `./theme` barrel exports an Island-wrapped variant of the same component).
14
- - **TOC** (`./toc`) — desktop and mobile TOC Preact islands fed by MDX `headings` export.
14
+ - **TOC** (`./toc`) — desktop and mobile TOC zudo-react islands fed by MDX `headings` export.
15
15
  - **Breadcrumb** (`./breadcrumb`) — JSX breadcrumb fed by the sidebar tree.
16
16
  - **DocLayout** (`./doclayout`) — composable layout shell with explicit `<Header>`, `<Sidebar>`, `<Main>`, `<Toc>`, `<Footer>` props; ships a `<DocLayoutWithDefaults>` wrapper that holds the 16 `create-zudo-doc` injection anchors.
17
17
  - **View Transitions** (`./transitions`) — native View Transitions API shim (Chrome/Edge/Safari 18+); persistent regions via `view-transition-name`. No-op fallback in Firefox.
18
18
  - **Head injection** (`./head`) — canonical, og:\*, twitter:\*, robots, preload hints, RSS link, sitemap link, and theme-color output.
19
- - **SSR-skip wrappers** (`./ssr-skip`) — `<AiChatModalIsland>`, `<ImageEnlargeIsland>`, `<DesignTokenTweakPanelIsland>`, `<MockInitIsland>` — wrap zfb's `<Island ssrFallback>` with the right fallback markup so doc pages don't have to re-implement the SSR-skip pattern.
19
+ - **SSR fallbacks** — fixed-target Island boundaries keep server fallback markup outside serialized client props; the image/mermaid fallback components remain public.
20
20
  - **Site schema** (`./site-schema`) — browser-safe nav tree / breadcrumb / pager domain, with zero zfb engine or filesystem coupling. See below.
21
21
 
22
22
  ## `./site-schema` — the browser-safe site-shape domain
@@ -105,25 +105,58 @@ If your project renders **semi-trusted or user-submitted** HTML in a preview, ov
105
105
 
106
106
  **Caveat:** removing `allow-same-origin` gives the iframe an opaque origin, which blocks the parent from reading `iframe.contentDocument`. That **disables auto-height** — always pair a stricter `sandbox` with a fixed `height`. Passing the empty string `""` is honored verbatim (only omitting the prop falls back to the computed default).
107
107
 
108
- ## Styling — Tailwind setup for consumers
109
-
110
- This package ships **no precompiled CSS** — the component utility classes are inlined in the `dist/` JavaScript, and Tailwind v4 does not scan `node_modules`. Without help, those utilities never make it into your build, so the components render unstyled.
111
-
112
- The fix is to import the package's build-generated safelist into your Tailwind CSS entry, right next to your `@import "tailwindcss";`:
108
+ ## 6.0 migration and peers
109
+
110
+ **6.0.0** is the coordinated major release of `@takazudo/zudo-doc`,
111
+ `@takazudo/zudo-doc-history-server` and `create-zudo-doc`. It targets the
112
+ published **zfb 4.3.1** family (peer floor **^4.3.1**).
113
+ [Upstream #4097](https://github.com/Takazudo/zudo-front-builder/issues/4097) is
114
+ resolved; its strict published 4.3.1 consumer control passed 3/3 with no skips or
115
+ retries in the [source-bound verification](../../docs/findings/zfb-4.3.1/verification.md).
116
+ That is Linux Chromium evidence; native macOS WebKit and the human/platform
117
+ limits retain their [recorded disposition](../../docs/findings/4430-zfb3-migration/2026-10-11-post-merge-status.md). See the
118
+ [5.x → 6.0 migration guide](../../src/content/docs/guides/migrating-to-zudo-doc-6.mdx)
119
+ for the full public API and host-boundary census.
120
+
121
+ Core rendering uses `@takazudo/zfb/zudo-react`, not Preact. Extend
122
+ `@takazudo/zudo-doc/tsconfig.base.json`, remove React→Preact compatibility paths,
123
+ and port host/ejected components to owned JSX/signals. zod remains required;
124
+ `katex`, `diff`, `@takazudo/zfb-md-wasm`, history-server, zdtp and MCP SDK peers
125
+ are feature-dependent. Package defaults for `agentExport`, `mcp`, and `llmsTxt`
126
+ are all `false`. The create-zudo-doc initializer enables `llmsTxt` by default;
127
+ agent export and MCP remain opt-in.
128
+
129
+ For the panel, the installed **zdtp 0.8.6** manifest carries **Preact ^10.29.1** as
130
+ its own dependency (it was a peer through 0.8.5) and exports `./styles.css` (also `./styles`) to `dist/zdtp.css`. Its internal
131
+ Tailwind browser dependency and Preact subtree are isolated from host JSX.
132
+ Install `@takazudo/zdtp` and import `@takazudo/zdtp/styles.css` when enabling it.
133
+
134
+ ## Styling — Wind and public CSS
135
+
136
+ `zudoDoc()` registers the public `@takazudo/zudo-doc/wind.json` manifest and
137
+ var-backed Wind defaults automatically. No package-dist scanning or consumer
138
+ manifest import is needed. Remove the retired `safelist.css` and
139
+ `theme-no-reset.css` imports, Tailwind imports/directives and palette reset.
113
140
 
114
141
  ```css
115
- @import "tailwindcss";
116
- @import "@takazudo/zudo-doc/safelist.css";
117
- ```
142
+ @layer zw-reset, zd-flow;
143
+ @import "@takazudo/zudo-doc/theme.css";
144
+ @import "@takazudo/zudo-doc/content.css";
145
+ @import "@takazudo/zudo-doc/page-loading.css";
146
+ @import "@takazudo/zudo-doc/features.css";
118
147
 
119
- `dist/safelist.css` is generated at package build time and contains an `@source inline()` set covering every utility the components use (including arbitrary-value classes like `w-[var(--zd-sidebar-w)]`). It auto-syncs whenever you upgrade the package — no drift, no manual maintenance. Available in `@takazudo/zudo-doc` **>= 0.2.0**.
120
-
121
- > **Don't `@source` into `node_modules`.** A glob like `@source "../node_modules/@takazudo/zudo-doc/dist/**"` looks plausible but is unreliable: pnpm surfaces packages via symlinks and Tailwind v4's file scanner does not reliably traverse them, so utilities get intermittently dropped across rebuilds (see zudolab/zudo-doc#1989). Import the package safelist instead.
148
+ :root { --spacing-hsp-md: 1rem; }
149
+ ```
122
150
 
123
- **Migrating from a pre-0.2.0 workaround?** If you vendored or copied the package `dist/` to get its styles, delete that workaround and replace it with the single `@import "@takazudo/zudo-doc/safelist.css";` line above.
151
+ Override CSS variable values in `:root` after package imports, or utility token
152
+ mappings with `zudoDoc({ wind: { tokens: { colors: { accent: "var(--brand-accent)" } } } })`.
153
+ The top-level `wind` override deep-merges over package defaults; reset is
154
+ selected with `wind.reset` (default `"owned-v1"`), and `wind: false` disables it.
155
+ Public `compiled.css` remains the browser-ready embedding option when not using
156
+ zfb CSS generation. Do not use physical package `dist/*.css` import paths.
124
157
 
125
158
  ## Dev workflow (in this repo)
126
159
 
127
160
  This package is published to npm as `@takazudo/zudo-doc` (since `0.2.0`, `latest` tracks the current line). Inside this repo the host site consumes it as a workspace package through its compiled `dist/` — `pnpm dev` at the repo root runs two watchers in parallel, `tsup --watch` for the JS and `tsc -p tsconfig.build.json --watch` for the `.d.ts`, so edits under `src/` rebuild both halves automatically; for a one-off rebuild use `pnpm --filter @takazudo/zudo-doc build`.
128
161
 
129
- zfb itself comes from npm (versions pinned in the root `package.json`). To develop against a local zfb checkout, use the temporary `pnpm.overrides` link escape hatch documented in the root `CLAUDE.md` — do not commit the override.
162
+ zfb itself comes from npm (versions pinned in the root `package.json`). To develop against a local zfb checkout, use the temporary `pnpm.overrides` link escape hatch documented in root `CONTRIBUTING.md` — do not commit the override.
@@ -10,10 +10,10 @@
10
10
  // - CSS: src/styles/global.css (override with --css <path>)
11
11
  //
12
12
  // Usage (after pnpm install, via scripts in package.json):
13
- // gen-z-index # rewrite the @theme block (conventional paths)
13
+ // gen-z-index # rewrite the :root block (conventional paths)
14
14
  // gen-z-index --check # verify committed block is up to date (exit 1 on drift)
15
15
  // gen-z-index --tokens <path> --css <path> # use non-conventional source/destination paths
16
- // gen-z-index --no-theme-wrapper # emit bare --z-index-<name> declarations, no @theme wrapper
16
+ // gen-z-index --no-theme-wrapper # emit bare --z-index-<name> declarations, no :root wrapper
17
17
  // gen-z-index --md-table <path> # also generate/verify a Z_INDEX_TABLE region in a
18
18
  // # markdown/MDX file (opt-in, no conventional default path)
19
19
  //
@@ -27,11 +27,11 @@
27
27
  // this repo's own b4push or CI; that integration was retired in
28
28
  // zudolab/zudo-doc#2661.
29
29
  //
30
- // The block is a Tailwind v4 `@theme { --z-index-<name>: <value>; }` for every
31
- // tier, so Tailwind generates `z-<name>` utilities and raw CSS can reference
32
- // `z-index: var(--z-index-<name>)`. `--no-theme-wrapper` drops the `@theme`
30
+ // The block is an authored `:root { --z-index-<name>: <value>; }` for every
31
+ // tier. Matching wind tokens generate `z-<name>` utilities and raw CSS can reference
32
+ // `z-index: var(--z-index-<name>)`. `--no-theme-wrapper` drops the `:root`
33
33
  // wrapper and emits bare `--z-index-<name>: <value>;` declarations instead,
34
- // for projects that want to compose the block into their own `@theme` block.
34
+ // for projects that want to compose the block into their own `:root` block.
35
35
  //
36
36
  // `--md-table <path>` additionally generates/verifies a second, independent
37
37
  // `GENERATED:Z_INDEX_TABLE` region — a `| Token | Kind | Role |` table, one
@@ -660,7 +660,7 @@ function buildRerunCommand({ tokensPath, cssPath, themeWrapper, mdTablePath }) {
660
660
 
661
661
  /**
662
662
  * Build the full generated block (markers included). Two leading spaces of
663
- * indentation match the surrounding `@theme` style in global.css.
663
+ * indentation match the surrounding `:root` style in global.css.
664
664
  *
665
665
  * `options.tokensPath`/`options.cssPath` feed the "Source of truth:" and
666
666
  * rerun-guidance lines in the header comment — pass the SAME path strings
@@ -670,9 +670,9 @@ function buildRerunCommand({ tokensPath, cssPath, themeWrapper, mdTablePath }) {
670
670
  * its default, the header is byte-identical to the pre-flag generator.
671
671
  *
672
672
  * `options.themeWrapper` (default `true`) wraps the declarations in an
673
- * `@theme { ... }` block; `false` (the `--no-theme-wrapper` CLI flag) emits
673
+ * `:root { ... }` block; `false` (the `--no-theme-wrapper` CLI flag) emits
674
674
  * bare `--z-index-<name>: <value>;` declarations at 2-space indent instead,
675
- * for projects composing the block into their own `@theme` block.
675
+ * for projects composing the block into their own `:root` block.
676
676
  *
677
677
  * Deliberately does NOT accept `mdTablePath`: the CSS block's own content
678
678
  * must depend only on the CSS-region flags (--tokens/--css/--no-theme-
@@ -696,12 +696,12 @@ export function buildBlock(tiers, options = {}) {
696
696
  lines.push(
697
697
  ` * GENERATED:Z_INDEX — do not hand-edit; run ${buildRerunCommand({ tokensPath, cssPath, themeWrapper })}.`,
698
698
  );
699
- lines.push(` * Source of truth: ${tokensPath}. Tailwind v4 reads the`);
699
+ lines.push(` * Source of truth: ${tokensPath}. zudo-wind reads the`);
700
700
  lines.push(
701
- ` * --z-index-<name> theme key and generates a z-<name> utility. */`,
701
+ ` * --z-index-<name> custom property and generates a z-<name> utility. */`,
702
702
  );
703
703
  if (themeWrapper) {
704
- lines.push(` @theme {`);
704
+ lines.push(` :root {`);
705
705
  for (const tier of tiers) {
706
706
  lines.push(` --z-index-${tier.name}: ${tier.value};`);
707
707
  }
@@ -867,7 +867,7 @@ export function scanMarkerLines(source, marker, options = {}) {
867
867
  * error for each failure mode: missing (the block must be seeded once by
868
868
  * hand), duplicated, or inverted markers.
869
869
  *
870
- * `beginMarker`/`endMarker` default to the CSS `@theme` block's markers so
870
+ * `beginMarker`/`endMarker` default to the CSS `:root` block's markers so
871
871
  * existing call sites (the CSS region) are unaffected; the `--md-table`
872
872
  * region passes `MD_TABLE_BEGIN_MARKER`/`MD_TABLE_END_MARKER` instead — same
873
873
  * function, parameterized, mirroring how gen-component-tokens.mjs reuses one
@@ -1053,7 +1053,7 @@ function readNamedFile(absPath, asGivenPath, label) {
1053
1053
  * message and into the generated header — never the resolved absolute path —
1054
1054
  * so the committed CSS/md file never embeds a machine-specific path.
1055
1055
  *
1056
- * The CSS `@theme` region is always generated/verified. The `--md-table`
1056
+ * The CSS `:root` region is always generated/verified. The `--md-table`
1057
1057
  * region is entirely opt-in: when `--md-table <path>` isn't passed, no md
1058
1058
  * file is read, built, or written, and `--check` only covers the CSS region
1059
1059
  * (unchanged from pre-`--md-table` behavior). When it IS passed, `--check`
@@ -1114,19 +1114,19 @@ export function main(argv = process.argv.slice(2)) {
1114
1114
  }
1115
1115
  console.log(
1116
1116
  mdTablePath !== undefined
1117
- ? `OK — z-index @theme block and md table are up to date (${tiers.length} tiers).`
1118
- : `OK — z-index @theme block is up to date (${tiers.length} tiers).`,
1117
+ ? `OK — z-index :root block and md table are up to date (${tiers.length} tiers).`
1118
+ : `OK — z-index :root block is up to date (${tiers.length} tiers).`,
1119
1119
  );
1120
1120
  return 0;
1121
1121
  }
1122
1122
 
1123
1123
  if (nextCss === css) {
1124
1124
  console.log(
1125
- `z-index @theme block already up to date (${tiers.length} tiers); no change.`,
1125
+ `z-index :root block already up to date (${tiers.length} tiers); no change.`,
1126
1126
  );
1127
1127
  } else {
1128
1128
  writeFileSync(cssAbsPath, nextCss);
1129
- console.log(`Wrote z-index @theme block to ${cssPath} (${tiers.length} tiers).`);
1129
+ console.log(`Wrote z-index :root block to ${cssPath} (${tiers.length} tiers).`);
1130
1130
  }
1131
1131
 
1132
1132
  if (mdTablePath !== undefined) {
@@ -0,0 +1,4 @@
1
+ /** Stable filename-safe key for the actual locale and effective route slug. */
2
+ export declare function agentPageKey(locale: string, effectiveRouteSlug: string): string;
3
+ /** One-based part key. The exporter checks duplicate keys and validates part counts. */
4
+ export declare function agentItemKey(pageId: string, oneBasedPart: number): string;
@@ -0,0 +1,24 @@
1
+ const FNV_OFFSET = 14695981039346656037n;
2
+ const FNV_PRIME = 1099511628211n;
3
+ const FNV_MASK = (1n << 64n) - 1n;
4
+ function agentPageKey(locale, effectiveRouteSlug) {
5
+ const bytes = new TextEncoder().encode(JSON.stringify([locale, effectiveRouteSlug]));
6
+ let hash = FNV_OFFSET;
7
+ for (const byte of bytes) {
8
+ hash = (hash ^ BigInt(byte)) * FNV_PRIME & FNV_MASK;
9
+ }
10
+ return `p-${hash.toString(16).padStart(16, "0")}`;
11
+ }
12
+ function agentItemKey(pageId, oneBasedPart) {
13
+ if (!/^p-[0-9a-f]{16}$/.test(pageId)) {
14
+ throw new Error("Invalid agent page ID.");
15
+ }
16
+ if (!Number.isSafeInteger(oneBasedPart) || oneBasedPart < 1 || oneBasedPart > 999999) {
17
+ throw new Error("Agent item part must be between 1 and 999999.");
18
+ }
19
+ return `${pageId}-${String(oneBasedPart).padStart(6, "0")}`;
20
+ }
21
+ export {
22
+ agentItemKey,
23
+ agentPageKey
24
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./types.js";
2
+ export * from "./limits.js";
3
+ export * from "./identity.js";
4
+ export * from "./tokenize.js";
5
+ export * from "./search.js";
@@ -0,0 +1,5 @@
1
+ export * from "./types.js";
2
+ export * from "./limits.js";
3
+ export * from "./identity.js";
4
+ export * from "./tokenize.js";
5
+ export * from "./search.js";
@@ -0,0 +1,11 @@
1
+ export declare const AGENT_SCHEMA_VERSION: 1;
2
+ export declare const AGENT_MAX_ITEM_TEXT_UNITS = 8000;
3
+ export declare const AGENT_MAX_TOOL_RESPONSE_BYTES = 131072;
4
+ export declare const AGENT_MAX_SEARCH_RESULTS = 10;
5
+ export declare const AGENT_MAX_QUERY_UNITS = 500;
6
+ export declare const AGENT_MAX_POST_BYTES = 65536;
7
+ export declare const AGENT_MAX_MANIFEST_BYTES: number;
8
+ export declare const AGENT_MAX_SEARCH_INDEX_BYTES: number;
9
+ export declare const AGENT_MAX_ITEMS = 10000;
10
+ export declare const AGENT_RETAINED_MEMORY_TARGET_BYTES: number;
11
+ export declare const AGENT_COLD_LOAD_TARGET_MS = 2000;
@@ -0,0 +1,24 @@
1
+ const AGENT_SCHEMA_VERSION = 1;
2
+ const AGENT_MAX_ITEM_TEXT_UNITS = 8e3;
3
+ const AGENT_MAX_TOOL_RESPONSE_BYTES = 131072;
4
+ const AGENT_MAX_SEARCH_RESULTS = 10;
5
+ const AGENT_MAX_QUERY_UNITS = 500;
6
+ const AGENT_MAX_POST_BYTES = 65536;
7
+ const AGENT_MAX_MANIFEST_BYTES = 8 * 1024 * 1024;
8
+ const AGENT_MAX_SEARCH_INDEX_BYTES = 16 * 1024 * 1024;
9
+ const AGENT_MAX_ITEMS = 1e4;
10
+ const AGENT_RETAINED_MEMORY_TARGET_BYTES = 64 * 1024 * 1024;
11
+ const AGENT_COLD_LOAD_TARGET_MS = 2e3;
12
+ export {
13
+ AGENT_COLD_LOAD_TARGET_MS,
14
+ AGENT_MAX_ITEMS,
15
+ AGENT_MAX_ITEM_TEXT_UNITS,
16
+ AGENT_MAX_MANIFEST_BYTES,
17
+ AGENT_MAX_POST_BYTES,
18
+ AGENT_MAX_QUERY_UNITS,
19
+ AGENT_MAX_SEARCH_INDEX_BYTES,
20
+ AGENT_MAX_SEARCH_RESULTS,
21
+ AGENT_MAX_TOOL_RESPONSE_BYTES,
22
+ AGENT_RETAINED_MEMORY_TARGET_BYTES,
23
+ AGENT_SCHEMA_VERSION
24
+ };
@@ -0,0 +1,14 @@
1
+ import type { AgentSearchIndex, AgentSearchResult, AgentItem } from "./types.js";
2
+ interface Posting {
3
+ item: number;
4
+ weight: number;
5
+ }
6
+ export interface BuiltAgentSearchIndex {
7
+ readonly items: readonly AgentItem[];
8
+ readonly postings: ReadonlyMap<string, readonly Posting[]>;
9
+ }
10
+ /** Build postings from complete item text, including content after UI-search truncation. */
11
+ export declare function buildAgentSearchIndex(source: AgentSearchIndex | readonly AgentItem[]): BuiltAgentSearchIndex;
12
+ /** Returns a validation result for bad queries and [] for valid queries with no matches. */
13
+ export declare function searchAgentIndex(index: BuiltAgentSearchIndex, query: string, topK?: number): AgentSearchResult;
14
+ export {};
@@ -0,0 +1,82 @@
1
+ import { AGENT_MAX_ITEMS, AGENT_MAX_QUERY_UNITS, AGENT_MAX_SEARCH_RESULTS } from "./limits.js";
2
+ import { tokenizeAgentText } from "./tokenize.js";
3
+ const HEADING = /^#{1,6}\s+(.+)$/gm;
4
+ function buildAgentSearchIndex(source) {
5
+ const artifact = Array.isArray(source) ? void 0 : source;
6
+ if (artifact && artifact.schemaVersion !== 1) {
7
+ throw new Error("Unsupported agent search index schema version.");
8
+ }
9
+ const items = artifact ? artifact.items : source;
10
+ if (items.length > AGENT_MAX_ITEMS) throw new Error(`Agent search index exceeds ${AGENT_MAX_ITEMS} items.`);
11
+ const postings = /* @__PURE__ */ new Map();
12
+ items.forEach((item, itemIndex) => {
13
+ const weights = /* @__PURE__ */ new Map();
14
+ const add = (text, weight) => {
15
+ for (const token of tokenizeAgentText(text)) {
16
+ weights.set(token, (weights.get(token) ?? 0) + weight);
17
+ }
18
+ };
19
+ add(item.text, 1);
20
+ add(item.title, 12);
21
+ if (item.metadata.description) add(item.metadata.description, 5);
22
+ if (item.metadata.section) add(item.metadata.section, 7);
23
+ for (const match of item.text.matchAll(HEADING)) add(match[1], 6);
24
+ for (const [token, weight] of weights) {
25
+ const list = postings.get(token);
26
+ if (list) list.push({ item: itemIndex, weight });
27
+ else postings.set(token, [{ item: itemIndex, weight }]);
28
+ }
29
+ });
30
+ return { items, postings };
31
+ }
32
+ function displayTitle(item, duplicateTitle, duplicateQualifier) {
33
+ const { locale, section, part, partCount } = item.metadata;
34
+ const qualifiers = [locale];
35
+ if (section && section !== item.title) qualifiers.push(section);
36
+ if (partCount > 1) qualifiers.push(`part ${part}/${partCount}`);
37
+ if (duplicateQualifier) qualifiers.push(item.id);
38
+ return duplicateTitle || qualifiers.length > 1 ? `${item.title} (${qualifiers.join(" \xB7 ")})` : item.title;
39
+ }
40
+ function searchAgentIndex(index, query, topK = AGENT_MAX_SEARCH_RESULTS) {
41
+ if (query.length > AGENT_MAX_QUERY_UNITS) {
42
+ return { ok: false, error: `Query exceeds ${AGENT_MAX_QUERY_UNITS} UTF-16 code units.` };
43
+ }
44
+ if (!query.trim()) return { ok: false, error: "Query must not be empty." };
45
+ const tokens = tokenizeAgentText(query);
46
+ if (tokens.length === 0) return { ok: false, error: "Query has no searchable terms." };
47
+ const scores = /* @__PURE__ */ new Map();
48
+ for (const token of tokens) {
49
+ const list = index.postings.get(token);
50
+ if (!list) continue;
51
+ const idf = 1 + Math.log((index.items.length + 1) / (list.length + 1));
52
+ const specificity = Array.from(token).length === 1 ? 0.25 : 1;
53
+ for (const { item, weight } of list) {
54
+ scores.set(item, (scores.get(item) ?? 0) + weight * idf * specificity);
55
+ }
56
+ }
57
+ const boundedK = Number.isFinite(topK) ? Math.max(0, Math.min(AGENT_MAX_SEARCH_RESULTS, Math.floor(topK))) : AGENT_MAX_SEARCH_RESULTS;
58
+ const ranked = [...scores.keys()].sort((a, b) => {
59
+ const difference = scores.get(b) - scores.get(a);
60
+ if (difference) return difference;
61
+ const first = index.items[a].id;
62
+ const second = index.items[b].id;
63
+ return first < second ? -1 : first > second ? 1 : 0;
64
+ }).slice(0, boundedK);
65
+ const titleCounts = /* @__PURE__ */ new Map();
66
+ for (const item of index.items) titleCounts.set(item.title, (titleCounts.get(item.title) ?? 0) + 1);
67
+ const qualifiedCounts = /* @__PURE__ */ new Map();
68
+ for (const item of index.items) {
69
+ const title = displayTitle(item, (titleCounts.get(item.title) ?? 0) > 1, false);
70
+ qualifiedCounts.set(title, (qualifiedCounts.get(title) ?? 0) + 1);
71
+ }
72
+ const results = ranked.map((i) => {
73
+ const item = index.items[i];
74
+ const title = displayTitle(item, (titleCounts.get(item.title) ?? 0) > 1, false);
75
+ return { id: item.id, title: displayTitle(item, (titleCounts.get(item.title) ?? 0) > 1, (qualifiedCounts.get(title) ?? 0) > 1), url: item.url };
76
+ });
77
+ return { ok: true, results };
78
+ }
79
+ export {
80
+ buildAgentSearchIndex,
81
+ searchAgentIndex
82
+ };
@@ -0,0 +1,2 @@
1
+ /** Pure tokenizer shared by Node export code and workerd retrieval. */
2
+ export declare function tokenizeAgentText(input: string): string[];
@@ -0,0 +1,22 @@
1
+ const TOKEN_RUN = /[a-z0-9_]+|[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}ー]+/gu;
2
+ const IDENTIFIER = /^[a-z0-9_]+$/;
3
+ function tokenizeAgentText(input) {
4
+ const normalized = input.normalize("NFKC").toLowerCase();
5
+ const tokens = /* @__PURE__ */ new Set();
6
+ for (const match of normalized.matchAll(TOKEN_RUN)) {
7
+ const run = match[0];
8
+ if (IDENTIFIER.test(run)) {
9
+ tokens.add(run);
10
+ continue;
11
+ }
12
+ const points = Array.from(run);
13
+ for (let i = 0; i < points.length; i += 1) {
14
+ tokens.add(points[i]);
15
+ if (i + 1 < points.length) tokens.add(points[i] + points[i + 1]);
16
+ }
17
+ }
18
+ return [...tokens].sort();
19
+ }
20
+ export {
21
+ tokenizeAgentText
22
+ };
@@ -0,0 +1,68 @@
1
+ /** Version 1 of the published, read-only agent corpus. */
2
+ export interface AgentItem {
3
+ id: string;
4
+ title: string;
5
+ text: string;
6
+ url: string;
7
+ metadata: {
8
+ locale: string;
9
+ pageId: string;
10
+ fingerprint: string;
11
+ part: number;
12
+ partCount: number;
13
+ description?: string;
14
+ section?: string;
15
+ unsupportedDynamicContent?: boolean;
16
+ };
17
+ }
18
+ export interface AgentManifest {
19
+ schemaVersion: 1;
20
+ fingerprint: string;
21
+ site: {
22
+ name: string;
23
+ url: string;
24
+ base: string;
25
+ };
26
+ defaultLocale: string;
27
+ locales: string[];
28
+ searchIndex: {
29
+ url: string;
30
+ sha256: string;
31
+ };
32
+ documents: Array<{
33
+ id: string;
34
+ key: string;
35
+ locale: string;
36
+ title: string;
37
+ url: string;
38
+ markdownUrl: string;
39
+ itemIds: string[];
40
+ }>;
41
+ items: Array<{
42
+ id: string;
43
+ key: string;
44
+ pageId: string;
45
+ url: string;
46
+ artifactUrl: string;
47
+ sha256: string;
48
+ part: number;
49
+ partCount: number;
50
+ }>;
51
+ }
52
+ export interface AgentSearchIndex {
53
+ schemaVersion: 1;
54
+ fingerprint: string;
55
+ items: AgentItem[];
56
+ }
57
+ export interface AgentSearchResultItem {
58
+ id: string;
59
+ title: string;
60
+ url: string;
61
+ }
62
+ export type AgentSearchResult = {
63
+ ok: true;
64
+ results: AgentSearchResultItem[];
65
+ } | {
66
+ ok: false;
67
+ error: string;
68
+ };
File without changes
@@ -1,8 +1,5 @@
1
1
  interface AiChatModalProps {
2
2
  basePath: string;
3
3
  }
4
- export declare function AiChatModal({ basePath }: AiChatModalProps): import("preact").JSX.Element;
5
- export declare namespace AiChatModal {
6
- var displayName: string;
7
- }
4
+ export declare function AiChatModal({ basePath }: AiChatModalProps): import("@takazudo/zfb").Description;
8
5
  export {};