@takazudo/zudo-doc 5.28.2 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (456) hide show
  1. package/CHANGELOG.md +22 -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/category-nav/index.d.ts +1 -2
  43. package/dist/category-nav/index.js +11 -5
  44. package/dist/category-tree-nav/index.d.ts +1 -2
  45. package/dist/category-tree-nav/index.js +3 -3
  46. package/dist/chrome/derive.d.ts +18 -27
  47. package/dist/chrome/derive.js +47 -29
  48. package/dist/chrome/index.d.ts +5 -5
  49. package/dist/chrome/index.js +1 -1
  50. package/dist/chrome/island-data.d.ts +4 -0
  51. package/dist/chrome/island-data.js +52 -0
  52. package/dist/chrome/primary-slots.d.ts +2 -3
  53. package/dist/chrome-bindings.d.ts +28 -22
  54. package/dist/code-group/index.d.ts +3 -4
  55. package/dist/code-group/index.js +3 -7
  56. package/dist/code-syntax/code-block-enhancer.d.ts +1 -2
  57. package/dist/code-syntax/code-block-enhancer.js +2 -2
  58. package/dist/code-syntax/mermaid-init.d.ts +1 -2
  59. package/dist/code-syntax/mermaid-init.js +5 -2
  60. package/dist/code-syntax/tabs-init-script.js +1 -1
  61. package/dist/code-syntax/tabs-init.d.ts +1 -2
  62. package/dist/code-syntax/tabs-init.js +2 -2
  63. package/dist/code-syntax/tabs.d.ts +6 -6
  64. package/dist/code-syntax/tabs.js +8 -8
  65. package/dist/compiled.css +2933 -2943
  66. package/dist/config-assertions/index.d.ts +13 -0
  67. package/dist/config-assertions/index.js +14 -0
  68. package/dist/config.d.ts +36 -17
  69. package/dist/config.js +23 -95
  70. package/dist/content/content-blockquote.d.ts +2 -3
  71. package/dist/content/content-blockquote.js +3 -3
  72. package/dist/content/content-code.d.ts +3 -4
  73. package/dist/content/content-code.js +5 -5
  74. package/dist/content/content-link.d.ts +3 -4
  75. package/dist/content/content-link.js +10 -10
  76. package/dist/content/content-ol.d.ts +2 -3
  77. package/dist/content/content-ol.js +5 -4
  78. package/dist/content/content-paragraph.d.ts +2 -3
  79. package/dist/content/content-paragraph.js +1 -1
  80. package/dist/content/content-strong.d.ts +2 -3
  81. package/dist/content/content-strong.js +3 -3
  82. package/dist/content/content-table.d.ts +2 -3
  83. package/dist/content/content-table.js +4 -4
  84. package/dist/content/content-ul.d.ts +2 -3
  85. package/dist/content/content-ul.js +4 -4
  86. package/dist/content/heading-h2.d.ts +2 -3
  87. package/dist/content/heading-h2.js +4 -4
  88. package/dist/content/heading-h3.d.ts +2 -3
  89. package/dist/content/heading-h3.js +4 -4
  90. package/dist/content/heading-h4.d.ts +2 -3
  91. package/dist/content/heading-h4.js +4 -4
  92. package/dist/content-admonition/index.d.ts +3 -4
  93. package/dist/content-admonition/index.js +2 -2
  94. package/dist/content.css +35 -33
  95. package/dist/design-token-panel-bootstrap-controller.d.ts +178 -0
  96. package/dist/design-token-panel-bootstrap-controller.js +359 -0
  97. package/dist/design-token-panel-bootstrap-island.d.ts +5 -0
  98. package/dist/design-token-panel-bootstrap-island.js +19 -0
  99. package/dist/design-token-panel-bootstrap.d.ts +5 -195
  100. package/dist/design-token-panel-bootstrap.js +3 -288
  101. package/dist/desktop-sidebar-toggle-island/index.d.ts +2 -7
  102. package/dist/desktop-sidebar-toggle-island/index.js +2 -58
  103. package/dist/desktop-sidebar-toggle-island/island.d.ts +4 -0
  104. package/dist/desktop-sidebar-toggle-island/island.js +43 -0
  105. package/dist/desktop-sidebar-toggle-island/storage.d.ts +4 -0
  106. package/dist/desktop-sidebar-toggle-island/storage.js +29 -0
  107. package/dist/desktop-toc-toggle-island/index.d.ts +2 -7
  108. package/dist/desktop-toc-toggle-island/index.js +2 -58
  109. package/dist/desktop-toc-toggle-island/island.d.ts +4 -0
  110. package/dist/desktop-toc-toggle-island/island.js +43 -0
  111. package/dist/desktop-toc-toggle-island/storage.d.ts +4 -0
  112. package/dist/desktop-toc-toggle-island/storage.js +29 -0
  113. package/dist/details/details.d.ts +3 -4
  114. package/dist/details/details.js +1 -1
  115. package/dist/doc-body-end/index.d.ts +1 -2
  116. package/dist/doc-body-end/index.js +1 -1
  117. package/dist/doc-body-end-islands/design-token-panel-island.d.ts +2 -2
  118. package/dist/doc-body-end-islands/design-token-panel-island.js +3 -7
  119. package/dist/doc-body-end-islands/index.d.ts +4 -21
  120. package/dist/doc-body-end-islands/index.js +5 -3
  121. package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +3 -13
  122. package/dist/doc-body-end-islands/theme-pack-switcher-island.js +11 -13
  123. package/dist/doc-content-header/index.d.ts +1 -2
  124. package/dist/doc-content-header/index.js +1 -1
  125. package/dist/doc-history/index.d.ts +1 -1
  126. package/dist/doc-history/index.js +166 -141
  127. package/dist/doc-history-area/index.d.ts +6 -4
  128. package/dist/doc-history-area/index.js +17 -16
  129. package/dist/doc-metainfo-area/index.d.ts +2 -3
  130. package/dist/doc-metainfo-area/index.js +1 -1
  131. package/dist/doc-page-renderer/index.d.ts +13 -7
  132. package/dist/doc-page-renderer/index.js +10 -1
  133. package/dist/doc-page-shell/index.d.ts +20 -7
  134. package/dist/doc-page-shell/index.js +17 -6
  135. package/dist/doc-pager/index.d.ts +1 -2
  136. package/dist/doc-pager/index.js +3 -3
  137. package/dist/doc-tags-area/index.d.ts +2 -3
  138. package/dist/doc-tags-area/index.js +1 -1
  139. package/dist/doclayout/doc-layout-with-defaults.d.ts +9 -9
  140. package/dist/doclayout/doc-layout-with-defaults.js +5 -15
  141. package/dist/doclayout/doc-layout.d.ts +26 -27
  142. package/dist/doclayout/doc-layout.js +23 -14
  143. package/dist/docs-schema/index.d.ts +4 -0
  144. package/dist/docs-schema/index.js +1 -0
  145. package/dist/extract-headings/index.js +43 -12
  146. package/dist/factory-context/index.d.ts +22 -19
  147. package/dist/features.css +70 -8
  148. package/dist/find-in-page/find-bar.d.ts +4 -2
  149. package/dist/find-in-page/find-bar.js +58 -69
  150. package/dist/find-in-page/index.d.ts +2 -8
  151. package/dist/find-in-page/index.js +33 -30
  152. package/dist/footer/footer.d.ts +3 -4
  153. package/dist/footer/footer.js +3 -3
  154. package/dist/footer-with-defaults/index.d.ts +2 -3
  155. package/dist/footer-with-defaults/index.js +1 -1
  156. package/dist/frontmatter-preview-defaults/index.js +1 -0
  157. package/dist/head/doc-head.d.ts +1 -1
  158. package/dist/head/doc-head.js +24 -32
  159. package/dist/head/og-tags.d.ts +1 -1
  160. package/dist/head/og-tags.js +8 -7
  161. package/dist/head/twitter-card.d.ts +1 -1
  162. package/dist/head/twitter-card.js +1 -1
  163. package/dist/head-with-defaults/index.d.ts +7 -2
  164. package/dist/head-with-defaults/index.js +46 -32
  165. package/dist/header/header.d.ts +8 -8
  166. package/dist/header/header.js +9 -11
  167. package/dist/header/types.d.ts +7 -7
  168. package/dist/header-with-defaults/index.d.ts +1 -2
  169. package/dist/header-with-defaults/index.js +18 -8
  170. package/dist/home-intro/index.d.ts +2 -5
  171. package/dist/home-intro/index.js +7 -5
  172. package/dist/home-intro/prepare.js +4 -3
  173. package/dist/home-page/index.d.ts +3 -3
  174. package/dist/home-page/index.js +19 -17
  175. package/dist/html-preview-wrapper/highlighted-code.d.ts +3 -4
  176. package/dist/html-preview-wrapper/highlighted-code.js +19 -17
  177. package/dist/html-preview-wrapper/html-preview-wrapper.d.ts +4 -25
  178. package/dist/html-preview-wrapper/html-preview-wrapper.js +2 -87
  179. package/dist/html-preview-wrapper/html-preview.d.ts +3 -10
  180. package/dist/html-preview-wrapper/html-preview.js +13 -37
  181. package/dist/html-preview-wrapper/index.d.ts +2 -1
  182. package/dist/html-preview-wrapper/index.js +1 -1
  183. package/dist/html-preview-wrapper/preview-base.d.ts +3 -5
  184. package/dist/html-preview-wrapper/preview-base.js +56 -59
  185. package/dist/html-preview-wrapper/wrapper.d.ts +20 -0
  186. package/dist/html-preview-wrapper/wrapper.js +37 -0
  187. package/dist/hydration-pending.d.ts +3 -5
  188. package/dist/hydration-pending.js +7 -5
  189. package/dist/i18n-version/language-switcher.d.ts +5 -32
  190. package/dist/i18n-version/language-switcher.js +5 -106
  191. package/dist/i18n-version/switcher-generated-scripts.d.ts +2 -0
  192. package/dist/i18n-version/switcher-generated-scripts.js +107 -0
  193. package/dist/i18n-version/switcher-url-state.d.ts +76 -0
  194. package/dist/i18n-version/switcher-url-state.js +103 -0
  195. package/dist/i18n-version/version-banner.d.ts +2 -3
  196. package/dist/i18n-version/version-banner.js +1 -1
  197. package/dist/i18n-version/version-switcher.d.ts +5 -50
  198. package/dist/i18n-version/version-switcher.js +5 -157
  199. package/dist/icons/index.d.ts +18 -19
  200. package/dist/icons/index.js +17 -33
  201. package/dist/image-enlarge/index.d.ts +1 -10
  202. package/dist/image-enlarge/index.js +80 -55
  203. package/dist/image-enlarge/public.d.ts +2 -0
  204. package/dist/image-enlarge/public.js +6 -0
  205. package/dist/image-enlarge/ssr-fallback.d.ts +2 -0
  206. package/dist/image-enlarge/ssr-fallback.js +8 -0
  207. package/dist/index.d.ts +11 -4
  208. package/dist/inline-version-switcher/index.d.ts +1 -2
  209. package/dist/inline-version-switcher/index.js +1 -1
  210. package/dist/island-types/index.d.ts +2 -2
  211. package/dist/island-types/index.js +1 -5
  212. package/dist/math-block/index.d.ts +4 -7
  213. package/dist/math-block/index.js +5 -5
  214. package/dist/mcp/handler.d.ts +8 -0
  215. package/dist/mcp/handler.js +129 -0
  216. package/dist/mcp/index.d.ts +4 -0
  217. package/dist/mcp/index.js +7 -0
  218. package/dist/mcp/loader.d.ts +19 -0
  219. package/dist/mcp/loader.js +202 -0
  220. package/dist/mdx-components/index.js +40 -108
  221. package/dist/mermaid-enlarge/index.d.ts +1 -8
  222. package/dist/mermaid-enlarge/index.js +174 -158
  223. package/dist/mermaid-enlarge/public.d.ts +2 -0
  224. package/dist/mermaid-enlarge/public.js +6 -0
  225. package/dist/mermaid-enlarge/ssr-fallback.d.ts +2 -0
  226. package/dist/mermaid-enlarge/ssr-fallback.js +8 -0
  227. package/dist/metainfo/doc-metainfo.d.ts +2 -3
  228. package/dist/metainfo/doc-metainfo.js +1 -4
  229. package/dist/metainfo/doc-tags.d.ts +2 -3
  230. package/dist/metainfo/doc-tags.js +1 -1
  231. package/dist/metainfo/frontmatter-preview.d.ts +3 -4
  232. package/dist/metainfo/frontmatter-preview.js +1 -1
  233. package/dist/nav-data-prep/index.js +6 -4
  234. package/dist/nav-indexing/category-nav.d.ts +2 -3
  235. package/dist/nav-indexing/category-nav.js +1 -2
  236. package/dist/nav-indexing/category-tree-nav.d.ts +2 -3
  237. package/dist/nav-indexing/category-tree-nav.js +1 -1
  238. package/dist/nav-indexing/doc-card-grid.d.ts +2 -3
  239. package/dist/nav-indexing/doc-card-grid.js +1 -2
  240. package/dist/nav-indexing/docs-sitemap.d.ts +2 -3
  241. package/dist/nav-indexing/docs-sitemap.js +2 -2
  242. package/dist/nav-indexing/index.d.ts +1 -1
  243. package/dist/nav-indexing/nav-card-grid.d.ts +2 -3
  244. package/dist/nav-indexing/nav-card-grid.js +1 -2
  245. package/dist/nav-indexing/note-tray-index-parts/card-list.d.ts +1 -2
  246. package/dist/nav-indexing/note-tray-index-parts/card-list.js +4 -4
  247. package/dist/nav-indexing/note-tray-index-parts/date-line.d.ts +2 -3
  248. package/dist/nav-indexing/note-tray-index-parts/date-line.js +1 -1
  249. package/dist/nav-indexing/note-tray-index-parts/index-list.d.ts +1 -2
  250. package/dist/nav-indexing/note-tray-index-parts/index-list.js +2 -2
  251. package/dist/nav-indexing/note-tray-index-parts/timeline.d.ts +1 -2
  252. package/dist/nav-indexing/note-tray-index-parts/timeline.js +2 -2
  253. package/dist/nav-indexing/note-tray-index.d.ts +1 -2
  254. package/dist/nav-indexing/note-tray-index.js +1 -1
  255. package/dist/nav-indexing/site-tree-nav-demo.d.ts +2 -3
  256. package/dist/nav-indexing/site-tree-nav-demo.js +2 -2
  257. package/dist/nav-indexing/tag-nav.d.ts +1 -2
  258. package/dist/nav-indexing/tag-nav.js +1 -1
  259. package/dist/nav-indexing/types.d.ts +2 -2
  260. package/dist/nav-indexing/versions-page-content.d.ts +2 -3
  261. package/dist/nav-indexing/versions-page-content.js +8 -8
  262. package/dist/note-tray-index/index.d.ts +1 -2
  263. package/dist/note-tray-index/index.js +1 -1
  264. package/dist/page-loading/page-loading-overlay.d.ts +1 -2
  265. package/dist/page-loading/page-loading-overlay.js +3 -5
  266. package/dist/plugins/agent-export.d.ts +3 -0
  267. package/dist/plugins/agent-export.js +34 -0
  268. package/dist/plugins/internal/agent-export/chunk.d.ts +5 -0
  269. package/dist/plugins/internal/agent-export/chunk.js +90 -0
  270. package/dist/plugins/internal/agent-export/index.d.ts +24 -0
  271. package/dist/plugins/internal/agent-export/index.js +123 -0
  272. package/dist/plugins/internal/agent-export/normalize.d.ts +5 -0
  273. package/dist/plugins/internal/agent-export/normalize.js +73 -0
  274. package/dist/plugins/internal/llms-txt/dev-middleware.d.ts +6 -0
  275. package/dist/plugins/internal/llms-txt/dev-middleware.js +8 -3
  276. package/dist/plugins/internal/llms-txt/emit.js +23 -6
  277. package/dist/plugins/internal/llms-txt/generate.d.ts +7 -1
  278. package/dist/plugins/internal/llms-txt/generate.js +9 -2
  279. package/dist/plugins/internal/llms-txt/load.d.ts +2 -0
  280. package/dist/plugins/internal/llms-txt/load.js +20 -4
  281. package/dist/plugins/internal/llms-txt/types.d.ts +10 -0
  282. package/dist/plugins/routes.js +4 -0
  283. package/dist/preset.d.ts +19 -9
  284. package/dist/preset.js +20 -1
  285. package/dist/route-context-payload/index.js +1 -1
  286. package/dist/routes/404.d.ts +2 -3
  287. package/dist/routes/404.js +1 -1
  288. package/dist/routes/_chrome.d.ts +5 -5
  289. package/dist/routes/_chrome.js +7 -2
  290. package/dist/routes/_context.d.ts +4 -4
  291. package/dist/routes/_design-token-panel-bootstrap.d.ts +1 -4
  292. package/dist/routes/_design-token-panel-bootstrap.js +9 -1
  293. package/dist/routes/docs-slug.d.ts +2 -3
  294. package/dist/routes/docs-tags-index.d.ts +2 -3
  295. package/dist/routes/docs-tags-index.js +1 -1
  296. package/dist/routes/docs-tags-tag.d.ts +2 -3
  297. package/dist/routes/docs-tags-tag.js +1 -1
  298. package/dist/routes/docs-versions.d.ts +2 -3
  299. package/dist/routes/docs-versions.js +1 -1
  300. package/dist/routes/files-path.d.ts +2 -3
  301. package/dist/routes/files-path.js +1 -1
  302. package/dist/routes/index.d.ts +2 -3
  303. package/dist/routes/index.js +1 -1
  304. package/dist/routes/locale-docs-slug.d.ts +2 -3
  305. package/dist/routes/locale-docs-tags-index.d.ts +2 -3
  306. package/dist/routes/locale-docs-tags-index.js +1 -1
  307. package/dist/routes/locale-docs-tags-tag.d.ts +2 -3
  308. package/dist/routes/locale-docs-tags-tag.js +1 -1
  309. package/dist/routes/locale-docs-versions.d.ts +2 -3
  310. package/dist/routes/locale-docs-versions.js +1 -1
  311. package/dist/routes/locale-files-path.d.ts +2 -3
  312. package/dist/routes/locale-files-path.js +1 -1
  313. package/dist/routes/locale-index.d.ts +2 -3
  314. package/dist/routes/locale-index.js +1 -1
  315. package/dist/routes/mcp.d.ts +5 -0
  316. package/dist/routes/mcp.js +25 -0
  317. package/dist/routes/v-docs-slug.d.ts +2 -3
  318. package/dist/routes/v-locale-docs-slug.d.ts +2 -3
  319. package/dist/search-widget/index.d.ts +1 -2
  320. package/dist/search-widget/index.js +4 -7
  321. package/dist/search-widget-script/generated-script.js +12 -5
  322. package/dist/settings-defaults.d.ts +2 -0
  323. package/dist/settings-defaults.js +93 -0
  324. package/dist/settings.d.ts +8 -2
  325. package/dist/sidebar/index.d.ts +1 -1
  326. package/dist/sidebar/sidebar.d.ts +12 -44
  327. package/dist/sidebar/sidebar.js +4 -3
  328. package/dist/sidebar/types.d.ts +14 -0
  329. package/dist/sidebar-prepaint/index.d.ts +1 -2
  330. package/dist/sidebar-prepaint/index.js +4 -6
  331. package/dist/sidebar-resizer/sidebar-resizer-init.d.ts +2 -3
  332. package/dist/sidebar-resizer/sidebar-resizer-init.js +3 -3
  333. package/dist/sidebar-toggle-island/index.d.ts +8 -11
  334. package/dist/sidebar-toggle-island/index.js +75 -62
  335. package/dist/sidebar-tree/build-tree.js +5 -6
  336. package/dist/sidebar-tree/types.d.ts +2 -0
  337. package/dist/sidebar-tree-island/index.d.ts +4 -19
  338. package/dist/sidebar-tree-island/index.js +782 -436
  339. package/dist/sidebar-tree-island/scope-state.d.ts +38 -0
  340. package/dist/sidebar-tree-island/scope-state.js +151 -0
  341. package/dist/sidebar-tree-island/sidebar-scroll-preserve.js +6 -2
  342. package/dist/sidebar-utils/index.d.ts +17 -19
  343. package/dist/sidebar-utils/index.js +100 -3
  344. package/dist/sidebar-utils/scope.d.ts +11 -0
  345. package/dist/sidebar-utils/scope.js +67 -0
  346. package/dist/sidebar-with-defaults/index.d.ts +1 -2
  347. package/dist/sidebar-with-defaults/index.js +19 -18
  348. package/dist/site-schema/nav-tree.js +15 -15
  349. package/dist/site-schema/types.d.ts +1 -0
  350. package/dist/site-tree-nav/index.d.ts +2 -3
  351. package/dist/site-tree-nav/index.js +11 -12
  352. package/dist/site-tree-nav/normalize-island-props.d.ts +16 -0
  353. package/dist/site-tree-nav/normalize-island-props.js +122 -0
  354. package/dist/site-tree-nav-island/index.d.ts +3 -3
  355. package/dist/site-tree-nav-island/index.js +243 -144
  356. package/dist/smart-break/index.d.ts +3 -4
  357. package/dist/smart-break/index.js +1 -1
  358. package/dist/tab-item/tab-item.d.ts +3 -4
  359. package/dist/tab-item/tab-item.js +1 -1
  360. package/dist/tag-pages/index.d.ts +3 -3
  361. package/dist/tag-pages/index.js +10 -10
  362. package/dist/theme/color-scheme-provider.d.ts +3 -3
  363. package/dist/theme/color-scheme-provider.js +3 -3
  364. package/dist/theme/theme-pack-provider.d.ts +1 -1
  365. package/dist/theme/theme-pack-provider.js +3 -3
  366. package/dist/theme/theme-toggle.d.ts +2 -3
  367. package/dist/theme/theme-toggle.js +1 -1
  368. package/dist/theme-pack-dialog/index.d.ts +1 -1
  369. package/dist/theme-pack-dialog/index.js +69 -75
  370. package/dist/theme-pack-dialog/theme-pack-card.d.ts +3 -4
  371. package/dist/theme-pack-dialog/theme-pack-card.js +19 -17
  372. package/dist/theme-pack-switcher/index.d.ts +4 -5
  373. package/dist/theme-pack-switcher/index.js +52 -49
  374. package/dist/theme-toggle/index.d.ts +1 -1
  375. package/dist/theme-toggle/index.js +154 -167
  376. package/dist/theme.css +47 -121
  377. package/dist/toc/mobile-toc.d.ts +3 -5
  378. package/dist/toc/mobile-toc.js +29 -27
  379. package/dist/toc/toc.d.ts +3 -4
  380. package/dist/toc/toc.js +18 -18
  381. package/dist/toc/use-active-heading.d.ts +5 -4
  382. package/dist/toc/use-active-heading.js +36 -30
  383. package/dist/toc-prepaint/index.d.ts +1 -2
  384. package/dist/toc-prepaint/index.js +4 -6
  385. package/dist/transitions/nested-island-props-refresh.d.ts +3 -16
  386. package/dist/transitions/nested-island-props-refresh.js +133 -151
  387. package/dist/transitions/page-events.d.ts +8 -13
  388. package/dist/tree-nav-shared/index.d.ts +4 -5
  389. package/dist/tree-nav-shared/index.js +6 -7
  390. package/dist/use-modal-dialog/index.d.ts +9 -63
  391. package/dist/use-modal-dialog/index.js +41 -59
  392. package/dist/versions-page/index.d.ts +3 -3
  393. package/dist/versions-page/index.js +5 -5
  394. package/dist/wind/index.d.ts +5 -0
  395. package/dist/wind/index.js +169 -0
  396. package/dist/wind.json +498 -0
  397. package/dist/z-index-defaults/index.d.ts +4 -4
  398. package/dist/zdtp-loader.d.ts +7 -0
  399. package/dist/zdtp-loader.js +8 -0
  400. package/eject/asset-components/asset-card.tsx +14 -16
  401. package/eject/asset-components/asset-code.tsx +10 -12
  402. package/eject/asset-components/shared.tsx +5 -7
  403. package/eject/breadcrumb/breadcrumb.tsx +15 -16
  404. package/eject/code-group/index.tsx +4 -10
  405. package/eject/content-admonition/index.tsx +5 -6
  406. package/eject/desktop-sidebar-toggle-island/index.ts +4 -0
  407. package/eject/desktop-sidebar-toggle-island/island.tsx +50 -0
  408. package/eject/desktop-sidebar-toggle-island/storage.ts +27 -0
  409. package/eject/details/details.tsx +3 -5
  410. package/eject/doc-history/index.tsx +193 -179
  411. package/eject/doc-pager/index.tsx +3 -4
  412. package/eject/footer/footer.tsx +7 -9
  413. package/eject/header/header.tsx +42 -54
  414. package/eject/header/nav-overflow-script.ts +1 -1
  415. package/eject/header/types.ts +12 -13
  416. package/eject/image-enlarge/index.tsx +84 -69
  417. package/eject/image-enlarge/public.ts +2 -0
  418. package/eject/image-enlarge/ssr-fallback.tsx +7 -0
  419. package/eject/page-loading/page-loading-overlay.tsx +8 -15
  420. package/eject/sidebar/index.ts +1 -0
  421. package/eject/sidebar/sidebar.tsx +16 -97
  422. package/eject/sidebar/types.ts +15 -0
  423. package/eject/sidebar-toggle-island/index.tsx +103 -102
  424. package/eject/sidebar-tree-island/index.tsx +827 -615
  425. package/eject/sidebar-tree-island/scope-state.ts +154 -0
  426. package/eject/sidebar-tree-island/sidebar-scroll-preserve.ts +8 -2
  427. package/eject/site-tree-nav-island/index.tsx +349 -222
  428. package/eject/tab-item/tab-item.tsx +2 -4
  429. package/eject/theme-toggle/hydration-pending.ts +6 -10
  430. package/eject/theme-toggle/index.tsx +133 -173
  431. package/eject/toc/mobile-toc.tsx +27 -31
  432. package/eject/toc/toc.tsx +21 -24
  433. package/eject/toc/use-active-heading.ts +43 -38
  434. package/package.json +40 -22
  435. package/routes-src/404.tsx +2 -3
  436. package/routes-src/_chrome.tsx +7 -2
  437. package/routes-src/_design-token-panel-bootstrap.tsx +1 -63
  438. package/routes-src/docs-slug.tsx +2 -3
  439. package/routes-src/docs-tags-index.tsx +2 -3
  440. package/routes-src/docs-tags-tag.tsx +2 -3
  441. package/routes-src/docs-versions.tsx +2 -3
  442. package/routes-src/files-path.tsx +2 -4
  443. package/routes-src/index.tsx +2 -3
  444. package/routes-src/locale-docs-slug.tsx +2 -3
  445. package/routes-src/locale-docs-tags-index.tsx +2 -3
  446. package/routes-src/locale-docs-tags-tag.tsx +2 -3
  447. package/routes-src/locale-docs-versions.tsx +2 -3
  448. package/routes-src/locale-files-path.tsx +2 -4
  449. package/routes-src/locale-index.tsx +2 -3
  450. package/routes-src/mcp.tsx +25 -0
  451. package/routes-src/v-docs-slug.tsx +2 -3
  452. package/routes-src/v-locale-docs-slug.tsx +2 -3
  453. package/tsconfig.base.json +1 -1
  454. package/dist/safelist.css +0 -2
  455. package/dist/theme-no-reset.css +0 -379
  456. package/eject/desktop-sidebar-toggle-island/index.tsx +0 -110
@@ -1,6 +1,6 @@
1
1
  /** @jsxRuntime automatic */
2
- /** @jsxImportSource preact */
3
- import type { JSX, VNode } from "preact";
2
+ import type { Child, Description } from "@takazudo/zfb/zudo-react";
3
+ import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
4
4
  import type { DocPageBaseProps, DocNavNode, DocPageEntry } from "../doc-page-props/index.js";
5
5
  import type { VersionBannerLabels } from "../i18n-version/index.js";
6
6
  import type { ChromeContext } from "../factory-context/index.js";
@@ -70,6 +70,12 @@ export interface DocPageRendererDeps {
70
70
  title: string;
71
71
  description?: string;
72
72
  canonical?: string;
73
+ alternateLinks?: ReadonlyArray<{
74
+ rel: string;
75
+ href: string;
76
+ type?: string;
77
+ title?: string;
78
+ }>;
73
79
  breadcrumbs: Array<{
74
80
  label: string;
75
81
  href?: string;
@@ -102,10 +108,10 @@ export interface DocPageRendererDeps {
102
108
  versionBannerLabels?: VersionBannerLabels;
103
109
  autoIndexLabel?: string;
104
110
  autoIndexChildren?: DocNavNode[];
105
- metainfoSlot?: VNode | null;
106
- contentHeaderSlot?: VNode;
107
- contentSlot?: VNode;
108
- docHistorySlot?: VNode | null;
111
+ metainfoSlot?: Child;
112
+ contentHeaderSlot?: Child;
113
+ contentSlot?: Child;
114
+ docHistorySlot?: Child;
109
115
  }) => JSX.Element;
110
116
  /**
111
117
  * The `DocContentHeader` component (host-side factory result).
@@ -135,7 +141,7 @@ export interface DocPageRendererDeps {
135
141
  sourceFileExt?: ".mdx" | ".md";
136
142
  contentDir?: string;
137
143
  isFallback?: boolean;
138
- }) => VNode | null;
144
+ }) => Description | null;
139
145
  }
140
146
  /**
141
147
  * Create a `renderDocPage` function from the unified {@link ChromeContext}
@@ -1,4 +1,5 @@
1
- import { jsx } from "preact/jsx-runtime";
1
+ import { jsx } from "@takazudo/zfb/zudo-react/jsx-runtime";
2
+ import { agentPageKey } from "../agent-docs/identity.js";
2
3
  import { createDocPageShell } from "../doc-page-shell/index.js";
3
4
  import { createDocContentHeader } from "../doc-content-header/index.js";
4
5
  import { createDocMetainfoArea } from "../doc-metainfo-area/index.js";
@@ -55,6 +56,13 @@ function createRenderDocPage(ctx) {
55
56
  const hideToc = entryData ? entryData.hide_toc || standalone : void 0;
56
57
  const contentWide = entryData ? entryData.wide : void 0;
57
58
  const sidebarPersistKey = hideSidebar ? void 0 : `sidebar-${locale}-${navSection ?? "default"}`;
59
+ const agentMarkdownAlternates = ctx.settings.agentExport === true && !version && !isFallback && props.kind === "entry" && !Boolean(
60
+ entryData?.draft || entryData?.unlisted || entryData?.search_exclude || entryData?.category_no_page
61
+ ) ? [{
62
+ rel: "alternate",
63
+ type: "text/markdown",
64
+ href: ctx.withBase(`/agent/v1/pages/${agentPageKey(locale, slug)}.md`)
65
+ }] : void 0;
58
66
  const ContentComponent = props.kind === "entry" ? props.entry.Content : null;
59
67
  return /* @__PURE__ */ jsx(
60
68
  DocPageShell,
@@ -65,6 +73,7 @@ function createRenderDocPage(ctx) {
65
73
  title,
66
74
  description,
67
75
  canonical,
76
+ alternateLinks: agentMarkdownAlternates,
68
77
  breadcrumbs,
69
78
  prev,
70
79
  next,
@@ -1,6 +1,6 @@
1
1
  /** @jsxRuntime automatic */
2
- /** @jsxImportSource preact */
3
- import type { ComponentChildren, JSX, VNode } from "preact";
2
+ import type { Child } from "@takazudo/zfb/zudo-react";
3
+ import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
4
4
  import type { VersionBannerLabels } from "../i18n-version/index.js";
5
5
  import type { ChromeContext } from "../factory-context/index.js";
6
6
  import type { Settings } from "../settings.js";
@@ -43,6 +43,13 @@ export interface DocPageShellProps {
43
43
  description?: string;
44
44
  /** Absolute canonical URL, or undefined when siteUrl is unset. */
45
45
  canonical?: string;
46
+ /** Additional per-page alternate links passed through to the head defaults. */
47
+ alternateLinks?: ReadonlyArray<{
48
+ rel: string;
49
+ href: string;
50
+ type?: string;
51
+ title?: string;
52
+ }>;
46
53
  /** Pre-resolved breadcrumb trail (hrefs already remapped per route). */
47
54
  breadcrumbs: DocPageBreadcrumbItem[];
48
55
  /** Pre-resolved prev/next nav nodes (hrefs already remapped per route). */
@@ -65,7 +72,7 @@ export interface DocPageShellProps {
65
72
  /** Version slug for Header/Sidebar active-state, or undefined on latest routes. */
66
73
  currentVersion?: string;
67
74
  /** Inline version switcher VNode for the breadcrumb right-slot. */
68
- versionSwitcher: ComponentChildren;
75
+ versionSwitcher: Child;
69
76
  /**
70
77
  * This page's unavailable-version slugs, straight from
71
78
  * `getUnavailableVersions(slug, locale)` (`../version-availability`) —
@@ -93,19 +100,19 @@ export interface DocPageShellProps {
93
100
  * Auto-index branch slot: the build-time date block (DocMetainfoArea), or
94
101
  * null to omit it.
95
102
  */
96
- metainfoSlot?: VNode | null;
103
+ metainfoSlot?: Child;
97
104
  /**
98
105
  * Entry branch slot: the content header (h1 + meta + tags + description +
99
106
  * frontmatter preview), built per route (carries isFallback).
100
107
  */
101
- contentHeaderSlot?: VNode;
108
+ contentHeaderSlot?: Child;
102
109
  /** Entry branch slot: the rendered MDX `<Content />`. */
103
- contentSlot?: VNode;
110
+ contentSlot?: Child;
104
111
  /**
105
112
  * Entry branch slot: the document-utilities area (DocHistoryArea), or null
106
113
  * to omit it.
107
114
  */
108
- docHistorySlot?: VNode | null;
115
+ docHistorySlot?: Child;
109
116
  }
110
117
  /** Settings subset read by {@link createDocPageShell}. */
111
118
  export interface DocPageShellSettings {
@@ -124,6 +131,12 @@ export interface DocPageShellDeps {
124
131
  title: string;
125
132
  description?: string;
126
133
  canonical?: string;
134
+ alternateLinks?: ReadonlyArray<{
135
+ rel: string;
136
+ href: string;
137
+ type?: string;
138
+ title?: string;
139
+ }>;
127
140
  }) => JSX.Element;
128
141
  SidebarWithDefaults: (props: {
129
142
  currentSlug?: string;
@@ -1,7 +1,7 @@
1
- import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
2
2
  import { Island } from "@takazudo/zfb";
3
3
  import { DocLayoutWithDefaults } from "../doclayout/index.js";
4
- import { MobileToc, getTocTitle } from "../toc/index.js";
4
+ import { Toc as DefaultToc, MobileToc, getTocTitle } from "../toc/index.js";
5
5
  import { NavCardGrid } from "../nav-indexing/index.js";
6
6
  import {
7
7
  createSidebarPrepaint,
@@ -16,6 +16,7 @@ import { createHeadWithDefaults } from "../head-with-defaults/index.js";
16
16
  import { resolveThemePackSsrSlug } from "../theme/theme-pack-provider.js";
17
17
  import { createDocBodyEnd } from "../doc-body-end/index.js";
18
18
  import { deriveComposeMetaTitle } from "../chrome/derive.js";
19
+ import { normalizeIslandData } from "../chrome/island-data.js";
19
20
  import { derivePrimaryChromeSlots } from "../chrome/primary-slots.js";
20
21
  import { assertChromeContext } from "../chrome/assert-chrome-context.js";
21
22
  function createDocPageShell(ctx) {
@@ -60,6 +61,7 @@ function createDocPageShell(ctx) {
60
61
  title,
61
62
  description,
62
63
  canonical,
64
+ alternateLinks,
63
65
  breadcrumbs,
64
66
  prev,
65
67
  next,
@@ -84,9 +86,10 @@ function createDocPageShell(ctx) {
84
86
  docHistorySlot
85
87
  } = props;
86
88
  const tocTitle = getTocTitle(locale);
89
+ const transportHeadings = normalizeIslandData(headings);
87
90
  const shouldRenderToc = !hideToc && headings.length > 0;
88
91
  const shouldRenderDefaultToc = shouldRenderToc && !customTocIsPresent;
89
- const tocOverride = shouldRenderToc ? customTocIsPresent ? /* @__PURE__ */ jsx(Toc, { headings, title: tocTitle }) : (
92
+ const tocOverride = shouldRenderToc ? customTocIsPresent ? /* @__PURE__ */ jsx(Toc, { headings: transportHeadings, title: tocTitle }) : (
90
93
  // The zfb <Island> wrapper renders a bare <div> with no class, so
91
94
  // below xl (where <Toc> itself is `hidden xl:flex`) it would remain
92
95
  // an in-flow, zero-width flex child of the content band and reserve a
@@ -111,12 +114,12 @@ function createDocPageShell(ctx) {
111
114
  // bare and unaffected by the toggle feature.
112
115
  /* @__PURE__ */ jsx("div", { class: "zd-toc-col hidden xl:flex", children: Island({
113
116
  when: "load",
114
- children: /* @__PURE__ */ jsx(Toc, { headings, title: tocTitle })
117
+ children: /* @__PURE__ */ jsx(DefaultToc, { headings: transportHeadings, title: tocTitle })
115
118
  }) })
116
119
  ) : void 0;
117
120
  const mobileTocOverride = shouldRenderToc ? Island({
118
121
  when: "load",
119
- children: /* @__PURE__ */ jsx(MobileToc, { headings, title: tocTitle })
122
+ children: /* @__PURE__ */ jsx(MobileToc, { headings: transportHeadings, title: tocTitle })
120
123
  }) : void 0;
121
124
  return /* @__PURE__ */ jsx(
122
125
  DocLayoutWithDefaults,
@@ -124,7 +127,15 @@ function createDocPageShell(ctx) {
124
127
  title: composeMetaTitle(title),
125
128
  description: settings.metaTags.description ? description : void 0,
126
129
  head: /* @__PURE__ */ jsxs(Fragment, { children: [
127
- /* @__PURE__ */ jsx(HeadWithDefaults, { title, description, canonical }),
130
+ /* @__PURE__ */ jsx(
131
+ HeadWithDefaults,
132
+ {
133
+ title,
134
+ description,
135
+ canonical,
136
+ alternateLinks
137
+ }
138
+ ),
128
139
  /* @__PURE__ */ jsx(SidebarVisibilityPrepaint, { hideSidebar }),
129
140
  /* @__PURE__ */ jsx(TocVisibilityPrepaint, { shouldRenderDefaultToc })
130
141
  ] }),
@@ -1,6 +1,5 @@
1
1
  /** @jsxRuntime automatic */
2
- /** @jsxImportSource preact */
3
- import type { JSX } from "preact";
2
+ import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
4
3
  import type { ChromeContext } from "../factory-context/index.js";
5
4
  import type { Settings } from "../settings.js";
6
5
  interface PagerNode {
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "preact/jsx-runtime";
1
+ import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
2
2
  import { ChevronLeft, ChevronRight } from "../icons/index.js";
3
3
  import { assertChromeContext } from "../chrome/assert-chrome-context.js";
4
4
  import { deriveDateFormats } from "../chrome/derive.js";
@@ -16,7 +16,7 @@ function createDocPager(ctx) {
16
16
  class: "group border border-muted rounded-lg p-hsp-lg hover:border-accent",
17
17
  children: [
18
18
  /* @__PURE__ */ jsxs("div", { class: "flex items-center gap-hsp-xs text-caption text-muted mb-vsp-2xs group-hover:text-accent group-focus-visible:text-accent", children: [
19
- /* @__PURE__ */ jsx(ChevronLeft, { className: "h-[1.125rem] w-[1.125rem]" }),
19
+ /* @__PURE__ */ jsx(ChevronLeft, { class: "h-[1.125rem] w-[1.125rem]" }),
20
20
  /* @__PURE__ */ jsx("span", { class: "no-underline", children: t("nav.previous", locale) })
21
21
  ] }),
22
22
  /* @__PURE__ */ jsx("p", { class: "text-small font-semibold text-fg group-hover:text-accent group-hover:underline group-focus-visible:text-accent group-focus-visible:underline", children: prev.label }),
@@ -32,7 +32,7 @@ function createDocPager(ctx) {
32
32
  children: [
33
33
  /* @__PURE__ */ jsxs("div", { class: "flex items-center justify-end gap-hsp-xs text-caption text-muted mb-vsp-2xs group-hover:text-accent group-focus-visible:text-accent", children: [
34
34
  /* @__PURE__ */ jsx("span", { class: "no-underline", children: t("nav.next", locale) }),
35
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-[1.125rem] w-[1.125rem]" })
35
+ /* @__PURE__ */ jsx(ChevronRight, { class: "h-[1.125rem] w-[1.125rem]" })
36
36
  ] }),
37
37
  /* @__PURE__ */ jsx("p", { class: "text-small font-semibold text-fg group-hover:text-accent group-hover:underline group-focus-visible:text-accent group-focus-visible:underline", children: next.label }),
38
38
  next.date && /* @__PURE__ */ jsx("p", { class: "text-caption text-muted", children: formatDate(next.date, locale, dateFormatsFor(locale).full) })
@@ -1,6 +1,5 @@
1
1
  /** @jsxRuntime automatic */
2
- /** @jsxImportSource preact */
3
- import type { VNode } from "preact";
2
+ import type { Child } from "@takazudo/zfb/zudo-react";
4
3
  import type { TagVocabularyEntry, TagGovernanceMode, Settings } from "../settings.js";
5
4
  import type { ChromeContext } from "../factory-context/index.js";
6
5
  /** Settings subset read by the DocTagsArea factory. */
@@ -25,4 +24,4 @@ export interface DocTagsAreaProps {
25
24
  * vocabulary is a HOST-bound slot (`ctx.hostBindings.tagVocabulary`, default
26
25
  * `[]`); `tagHref` is reconstructed inline (identical to the pre-collapse wiring).
27
26
  */
28
- export declare function createDocTagsArea<S extends Settings = Settings>(ctx: ChromeContext<S>): (props: DocTagsAreaProps) => VNode | null;
27
+ export declare function createDocTagsArea<S extends Settings = Settings>(ctx: ChromeContext<S>): (props: DocTagsAreaProps) => Child;
@@ -1,4 +1,4 @@
1
- import { jsx } from "preact/jsx-runtime";
1
+ import { jsx } from "@takazudo/zfb/zudo-react/jsx-runtime";
2
2
  import { DocTags } from "../metainfo/index.js";
3
3
  import { resolvePageTags } from "../tag-helpers/index.js";
4
4
  import { assertChromeContext } from "../chrome/assert-chrome-context.js";
@@ -1,5 +1,5 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren, JSX } from "preact";
1
+ import type { Child } from "@takazudo/zfb/zudo-react";
2
+ import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
3
3
  import { type DocLayoutProps } from "./doc-layout.js";
4
4
  import type { HeadingItem } from "../toc/types.js";
5
5
  import { type VersionBannerLabels } from "../i18n-version/version-banner.js";
@@ -15,19 +15,19 @@ import { type VersionBannerLabels } from "../i18n-version/version-banner.js";
15
15
  */
16
16
  export interface DocLayoutWithDefaultsProps extends Omit<DocLayoutProps, "header" | "sidebar" | "toc" | "mobileToc" | "breadcrumb" | "footer" | "main"> {
17
17
  /** The page's article body. Required. */
18
- children: ComponentChildren;
18
+ children: Child;
19
19
  /** Replace the default site header. */
20
- headerOverride?: ComponentChildren;
20
+ headerOverride?: Child;
21
21
  /** Replace the default sidebar contents; pass `false` to omit its landmark entirely. */
22
- sidebarOverride?: ComponentChildren;
22
+ sidebarOverride?: Child;
23
23
  /** Replace the default desktop TOC. */
24
- tocOverride?: ComponentChildren;
24
+ tocOverride?: Child;
25
25
  /** Replace the default mobile TOC. */
26
- mobileTocOverride?: ComponentChildren;
26
+ mobileTocOverride?: Child;
27
27
  /** Replace the default breadcrumb. */
28
- breadcrumbOverride?: ComponentChildren;
28
+ breadcrumbOverride?: Child;
29
29
  /** Replace the default footer. */
30
- footerOverride?: ComponentChildren;
30
+ footerOverride?: Child;
31
31
  /**
32
32
  * Heading items extracted from the page's MDX body. When provided, the
33
33
  * default Toc and MobileToc instances render the full item list in SSG
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
2
2
  import { Island } from "@takazudo/zfb";
3
3
  import { DocLayout } from "./doc-layout.js";
4
4
  import { Sidebar } from "../sidebar/sidebar.js";
@@ -97,19 +97,9 @@ function DocLayoutWithDefaults(props) {
97
97
  }
98
98
  ),
99
99
  sidebar: (
100
- // Empty-data Sidebar emits the SSG marker via an explicit
101
- // `<Island when="load">` wrap at this call site (not inside
102
- // `<Sidebar>` itself) so the bundle's hydrate pass targets
103
- // the bare component and Preact doesn't append a duplicate
104
- // wrapper-div alongside the SSR'd tree. See `../sidebar/sidebar.tsx`
105
- // for the full diagnosis. Hosts that have a real nav tree
106
- // pass it through `sidebarOverride` and apply their own
107
- // `<Island>` wrap (see `pages/lib/_sidebar-with-defaults.tsx`
108
- // in the host project).
109
- sidebarOverride === false ? void 0 : sidebarOverride ?? Island({
110
- when: "load",
111
- children: /* @__PURE__ */ jsx(Sidebar, { nodes: [] })
112
- })
100
+ // The empty Sidebar keeps the complementary landmark without
101
+ // registering an island that has no navigation data.
102
+ sidebarOverride === false ? void 0 : sidebarOverride ?? /* @__PURE__ */ jsx(Sidebar, { nodes: [] })
113
103
  ),
114
104
  toc: tocOverride ?? defaultToc,
115
105
  mobileToc: mobileTocOverride ?? defaultMobileToc,
@@ -144,7 +134,7 @@ function DocLayoutWithDefaults(props) {
144
134
  /* @__PURE__ */ jsx(CodeBlockEnhancer, {}),
145
135
  /* @__PURE__ */ jsx(TabsInit, {}),
146
136
  /* @__PURE__ */ jsx(MermaidInit, {}),
147
- /* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: VERSION_SWITCHER_INIT_SCRIPT } })
137
+ /* @__PURE__ */ jsx("script", { rawHtml: VERSION_SWITCHER_INIT_SCRIPT })
148
138
  ] }),
149
139
  main: children
150
140
  }
@@ -1,5 +1,5 @@
1
- /** @jsxImportSource preact */
2
- import type { ComponentChildren, JSX } from "preact";
1
+ import type { Child } from "@takazudo/zfb/zudo-react";
2
+ import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
3
3
  /**
4
4
  * Direction-and-mode metadata for the root `<html>` element. Keeps the
5
5
  * shell from depending on a project's i18n module.
@@ -27,10 +27,9 @@ export interface DocLayoutHtmlAttrs {
27
27
  htmlStyle?: string;
28
28
  }
29
29
  /**
30
- * Full prop surface for the composable layout. Every "slot" is a
31
- * `ComponentChildren` so consumers can pass arbitrary JSX (Preact, zfb
32
- * Island wrappers, server-rendered output projected through the
33
- * boundary, etc.).
30
+ * Full prop surface for the composable layout. Every content slot uses
31
+ * zudo-react's `Child` type so consumers can pass intrinsic descriptions,
32
+ * package components and zfb island descriptions.
34
33
  */
35
34
  export interface DocLayoutProps extends DocLayoutHtmlAttrs {
36
35
  /** Page title — rendered as the `<title>` value. */
@@ -40,21 +39,20 @@ export interface DocLayoutProps extends DocLayoutHtmlAttrs {
40
39
  /** Optional `<meta name="robots" content="noindex">` toggle. */
41
40
  noindex?: boolean;
42
41
  /**
43
- * Free-form children injected at the top of `<head>`, after the
44
- * baseline `<title>` / charset / viewport meta. Use this for OG/
45
- * Twitter meta, preload hints, color-scheme provider scripts, RSS
46
- * links, the `<ClientRouter />` (Astro) or its zfb-equivalent — the
47
- * shell stays out of the way.
42
+ * Pure head descriptions appended after the baseline tags and ClientRouter
43
+ * metadata. Use this for OG/Twitter metadata, preload hints, color-scheme
44
+ * providers, prepaint scripts and configured links. The shell serializes
45
+ * the complete sequence as native head children.
48
46
  */
49
- head?: ComponentChildren;
47
+ head?: Child;
50
48
  /** Required. The site header. Consumer ships its own `<header>`. */
51
- header: ComponentChildren;
49
+ header: Child;
52
50
  /**
53
51
  * Optional sidebar content. When omitted (or when `hideSidebar` is
54
52
  * true) the desktop-sidebar `<aside>` is not rendered and the
55
53
  * content-margin wrapper collapses to full width.
56
54
  */
57
- sidebar?: ComponentChildren;
55
+ sidebar?: Child;
58
56
  /**
59
57
  * Hide the sidebar even if the slot is provided. Mirrors the
60
58
  * `hide_sidebar` page frontmatter flag.
@@ -62,9 +60,10 @@ export interface DocLayoutProps extends DocLayoutHtmlAttrs {
62
60
  hideSidebar?: boolean;
63
61
  /**
64
62
  * When present, sets `data-zfb-transition-persist` on the desktop
65
- * sidebar `<aside>`. Keyed as `sidebar-{lang}-{navSection}` so zfb's
66
- * Strategy B persist swaps reuse the same DOM node across same-locale +
67
- * same-section navigations. Omit for back-compat (no attribute). Must
63
+ * sidebar `<aside>`. Keyed as `sidebar-{lang}-{navSection}` so native zfb
64
+ * 3.1 persist reconciliation reuses the same DOM node across same-locale +
65
+ * same-section navigations and retains unchanged descendant island handles.
66
+ * Omit for back-compat (no attribute). Must
68
67
  * NOT be passed when `hideSidebar` is true — the sr-only aside contains
69
68
  * no real sidebar content and persisting it conflicts with the new
70
69
  * page's tree on cross-type navigations. Resolves #1546.
@@ -74,21 +73,21 @@ export interface DocLayoutProps extends DocLayoutHtmlAttrs {
74
73
  * Slot rendered between the desktop sidebar and the content-margin
75
74
  * wrapper. Used by the sidebar-toggle feature in `create-zudo-doc`.
76
75
  */
77
- afterSidebar?: ComponentChildren;
76
+ afterSidebar?: Child;
78
77
  /** Optional breadcrumb shown above the article. */
79
- breadcrumb?: ComponentChildren;
78
+ breadcrumb?: Child;
80
79
  /** Optional content slot rendered between breadcrumb and article. */
81
- afterBreadcrumb?: ComponentChildren;
80
+ afterBreadcrumb?: Child;
82
81
  /** Optional mobile-only TOC, rendered above the article. */
83
- mobileToc?: ComponentChildren;
82
+ mobileToc?: Child;
84
83
  /** Required. The page's article body. */
85
- main: ComponentChildren;
84
+ main: Child;
86
85
  /**
87
86
  * Optional content slot rendered immediately after `<article>` but
88
87
  * still inside `<main>`. Used by the body-foot util area and the
89
88
  * doc-history feature.
90
89
  */
91
- afterContent?: ComponentChildren;
90
+ afterContent?: Child;
92
91
  /**
93
92
  * Raw `data-*` attributes spread onto the `<article>` element. This shell
94
93
  * stays version/i18n-agnostic on purpose (see the module header), so it
@@ -104,7 +103,7 @@ export interface DocLayoutProps extends DocLayoutHtmlAttrs {
104
103
  */
105
104
  articleAttrs?: Record<string, string>;
106
105
  /** Optional desktop TOC rendered alongside `<main>` on wide screens. */
107
- toc?: ComponentChildren;
106
+ toc?: Child;
108
107
  /** Hide the TOC (both desktop and mobile) regardless of slot value. */
109
108
  hideToc?: boolean;
110
109
  /**
@@ -132,20 +131,20 @@ export interface DocLayoutProps extends DocLayoutHtmlAttrs {
132
131
  */
133
132
  navSection?: string;
134
133
  /** Optional footer rendered below the content. */
135
- footer?: ComponentChildren;
134
+ footer?: Child;
136
135
  /**
137
136
  * Components rendered just before `</body>`. Use for modals,
138
137
  * design-token panels, code-block enhancers, mock initializers, and
139
138
  * other globally-mounted islands.
140
139
  */
141
- bodyEndComponents?: ComponentChildren;
140
+ bodyEndComponents?: Child;
142
141
  /**
143
142
  * Scripts / inline `<script>` islands rendered last in `</body>`.
144
143
  * Kept distinct from `bodyEndComponents` because the original Astro
145
144
  * layout had two separate anchors here, and downstream features (e.g.
146
145
  * the sidebar resizer) inject into the scripts slot specifically.
147
146
  */
148
- bodyEndScripts?: ComponentChildren;
147
+ bodyEndScripts?: Child;
149
148
  /**
150
149
  * When `false`, the zfb SPA soft-swap router (`ClientRouter`) is not
151
150
  * mounted — the page uses plain full-page navigation instead. This
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "preact/jsx-runtime";
1
+ import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
2
2
  import { ClientRouter } from "@takazudo/zfb-runtime";
3
3
  const DESKTOP_SIDEBAR_ID = "desktop-sidebar";
4
4
  function DocLayout(props) {
@@ -44,14 +44,20 @@ function DocLayout(props) {
44
44
  if (htmlStyle !== void 0) {
45
45
  htmlAttrs.style = htmlStyle;
46
46
  }
47
- return /* @__PURE__ */ jsxs("html", { ...htmlAttrs, children: [
48
- /* @__PURE__ */ jsxs("head", { children: [
49
- /* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
50
- /* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }),
51
- /* @__PURE__ */ jsx("title", { children: title }),
52
- description !== void 0 && /* @__PURE__ */ jsx("meta", { name: "description", content: description }),
53
- noindex && /* @__PURE__ */ jsx("meta", { name: "robots", content: "noindex, nofollow" }),
54
- enableClientRouter !== false ? ClientRouter({
47
+ const headChildren = [
48
+ /* @__PURE__ */ jsx("meta", { charset: "utf-8" }),
49
+ /* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }),
50
+ /* @__PURE__ */ jsx("title", { children: title })
51
+ ];
52
+ if (description !== void 0) {
53
+ headChildren.push(/* @__PURE__ */ jsx("meta", { name: "description", content: description }));
54
+ }
55
+ if (noindex) {
56
+ headChildren.push(/* @__PURE__ */ jsx("meta", { name: "robots", content: "noindex, nofollow" }));
57
+ }
58
+ if (enableClientRouter !== false) {
59
+ headChildren.push(
60
+ ClientRouter({
55
61
  preserveHtmlAttrs: [
56
62
  "data-sidebar-hidden",
57
63
  "data-theme",
@@ -60,9 +66,12 @@ function DocLayout(props) {
60
66
  "data-toc-hidden",
61
67
  "data-asset-details-hidden"
62
68
  ]
63
- }) : null,
64
- head
65
- ] }),
69
+ })
70
+ );
71
+ }
72
+ if (head !== void 0) headChildren.push(head);
73
+ return /* @__PURE__ */ jsxs("html", { ...htmlAttrs, children: [
74
+ /* @__PURE__ */ jsx("head", { children: headChildren }),
66
75
  /* @__PURE__ */ jsxs("body", { class: "min-h-screen antialiased", children: [
67
76
  header,
68
77
  hasSidebar && /* @__PURE__ */ jsx(
@@ -70,7 +79,7 @@ function DocLayout(props) {
70
79
  {
71
80
  id: DESKTOP_SIDEBAR_ID,
72
81
  "aria-label": "Documentation sidebar",
73
- class: showSidebar ? "hidden lg:block fixed top-[3.5rem] left-0 z-sidebar w-[var(--zd-sidebar-w)] h-[calc(100vh-3.5rem)] overflow-y-auto bg-bg border-r border-muted pb-vsp-xl" : "sr-only",
82
+ class: showSidebar ? "hidden lg:block fixed top-[3.5rem] left-0 z-sidebar w-[var(--zd-sidebar-w)] h-[calc(100vh_-_3.5rem)] overflow-y-auto bg-bg border-r border-muted pb-vsp-xl" : "sr-only",
74
83
  ...sidebarPersistKey !== void 0 ? { "data-zfb-transition-persist": sidebarPersistKey } : {},
75
84
  children: sidebar
76
85
  }
@@ -81,7 +90,7 @@ function DocLayout(props) {
81
90
  {
82
91
  class: `zd-sidebar-content-wrapper${showSidebar ? " lg:ml-[var(--zd-sidebar-w)]" : ""}`,
83
92
  children: [
84
- /* @__PURE__ */ jsx("div", { class: "flex min-h-[calc(100vh-3.5rem)] justify-center", children: /* @__PURE__ */ jsxs(
93
+ /* @__PURE__ */ jsx("div", { class: "flex min-h-[calc(100vh_-_3.5rem)] justify-center", children: /* @__PURE__ */ jsxs(
85
94
  "div",
86
95
  {
87
96
  class: "zd-doc-content-band flex w-full gap-[clamp(1.5rem,3vw,4rem)]",
@@ -38,6 +38,10 @@ export declare function buildDocsSchema(opts?: BuildDocsSchemaOptions): z.ZodObj
38
38
  category: z.ZodOptional<z.ZodString>;
39
39
  sidebar_position: z.ZodOptional<z.ZodNumber>;
40
40
  sidebar_label: z.ZodOptional<z.ZodString>;
41
+ sidebar_initial_expansion: z.ZodOptional<z.ZodEnum<{
42
+ collapsed: "collapsed";
43
+ expanded: "expanded";
44
+ }>>;
41
45
  tags: z.ZodOptional<z.ZodArray<z.ZodString>> | z.ZodOptional<z.ZodArray<z.ZodEnum<{
42
46
  [x: string]: string;
43
47
  }>>>;
@@ -16,6 +16,7 @@ function buildDocsSchema(opts) {
16
16
  category: z.string().optional(),
17
17
  sidebar_position: z.number().optional(),
18
18
  sidebar_label: z.string().optional(),
19
+ sidebar_initial_expansion: z.enum(["collapsed", "expanded"]).optional(),
19
20
  tags: buildTagsSchema(opts),
20
21
  search_exclude: z.boolean().optional(),
21
22
  pagination_next: z.string().nullable().optional(),