@takazudo/zudo-doc 3.3.0 → 4.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 (417) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +2 -2
  3. package/bin/tag-cli-config.ts +126 -0
  4. package/bin/tags-audit-runner.ts +60 -76
  5. package/bin/tags-audit.mjs +17 -36
  6. package/bin/tags-suggest-runner.ts +429 -0
  7. package/bin/tags-suggest.mjs +30 -0
  8. package/bin/zudo-doc.mjs +78 -25
  9. package/dist/breadcrumb/breadcrumb.d.ts +4 -4
  10. package/dist/breadcrumb/find-path.d.ts +2 -2
  11. package/dist/breadcrumb/index.d.ts +1 -1
  12. package/dist/breadcrumb/types.d.ts +0 -5
  13. package/dist/chrome/derive.d.ts +16 -10
  14. package/dist/chrome/derive.js +53 -4
  15. package/dist/chrome/index.d.ts +13 -10
  16. package/dist/chrome/index.js +12 -6
  17. package/dist/chrome/primary-slots.d.ts +21 -0
  18. package/dist/chrome/primary-slots.js +59 -0
  19. package/dist/chrome-bindings.d.ts +68 -0
  20. package/dist/code-syntax/code-block-enhancer-script.d.ts +4 -0
  21. package/dist/code-syntax/code-block-enhancer-script.js +7 -4
  22. package/dist/code-syntax/code-block-enhancer.d.ts +2 -2
  23. package/dist/code-syntax/code-block-enhancer.js +1 -3
  24. package/dist/code-syntax/index.d.ts +5 -5
  25. package/dist/code-syntax/index.js +4 -13
  26. package/dist/code-syntax/mermaid-init-script.d.ts +1 -22
  27. package/dist/code-syntax/mermaid-init-script.js +0 -2
  28. package/dist/code-syntax/mermaid-init.d.ts +0 -1
  29. package/dist/code-syntax/mermaid-init.js +3 -4
  30. package/dist/code-syntax/tabs-init.d.ts +0 -1
  31. package/dist/code-syntax/tabs-init.js +1 -3
  32. package/dist/code-syntax/tabs.d.ts +0 -1
  33. package/dist/code-syntax/tabs.js +1 -3
  34. package/dist/color-scheme-utils.d.ts +71 -3
  35. package/dist/color-scheme-utils.js +137 -0
  36. package/dist/color-schemes-defaults/index.js +13 -0
  37. package/dist/config.d.ts +28 -12
  38. package/dist/config.js +11 -2
  39. package/dist/content/component-map.d.ts +0 -16
  40. package/dist/content/component-map.js +2 -4
  41. package/dist/content/index.d.ts +1 -1
  42. package/dist/content/index.js +2 -3
  43. package/dist/content.css +1 -1
  44. package/dist/design-token-panel-bootstrap.d.ts +45 -40
  45. package/dist/design-token-panel-bootstrap.js +98 -21
  46. package/dist/design-token-panel-config/index.js +1 -4
  47. package/dist/doc-body-end-islands/design-token-panel-island.d.ts +15 -0
  48. package/dist/doc-body-end-islands/design-token-panel-island.js +31 -0
  49. package/dist/doc-body-end-islands/index.d.ts +39 -17
  50. package/dist/doc-body-end-islands/index.js +13 -21
  51. package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +37 -0
  52. package/dist/doc-body-end-islands/theme-pack-switcher-island.js +18 -0
  53. package/dist/doc-content-header/index.js +1 -1
  54. package/dist/doc-history-area/index.d.ts +10 -4
  55. package/dist/doc-history-area/index.js +3 -2
  56. package/dist/doc-metainfo-area/index.d.ts +1 -0
  57. package/dist/doc-page-props/index.d.ts +7 -23
  58. package/dist/doc-page-renderer/index.d.ts +1 -0
  59. package/dist/doc-page-renderer/index.js +1 -0
  60. package/dist/doc-page-shell/index.js +19 -12
  61. package/dist/doc-pager/index.js +1 -1
  62. package/dist/doc-route-entries/index.d.ts +2 -2
  63. package/dist/doclayout/doc-layout-with-defaults.js +4 -4
  64. package/dist/doclayout/doc-layout.d.ts +8 -0
  65. package/dist/doclayout/doc-layout.js +10 -1
  66. package/dist/docs-schema/index.js +1 -5
  67. package/dist/eject/index.d.ts +16 -0
  68. package/dist/eject/index.js +122 -28
  69. package/dist/extract-headings/index.d.ts +5 -8
  70. package/dist/extract-headings/index.js +2 -9
  71. package/dist/factory-context/index.d.ts +42 -4
  72. package/dist/features.css +55 -43
  73. package/dist/footer/footer.js +1 -0
  74. package/dist/head-with-defaults/index.d.ts +2 -0
  75. package/dist/head-with-defaults/index.js +16 -0
  76. package/dist/header/header.d.ts +10 -5
  77. package/dist/header/header.js +45 -5
  78. package/dist/header/index.d.ts +1 -1
  79. package/dist/header/types.d.ts +30 -1
  80. package/dist/header-with-defaults/index.js +1 -0
  81. package/dist/home-page/index.d.ts +2 -0
  82. package/dist/home-page/index.js +11 -5
  83. package/dist/home-page/prepare-home-data.js +1 -1
  84. package/dist/locale-merge/index.d.ts +9 -14
  85. package/dist/locale-merge/index.js +6 -4
  86. package/dist/mdx-components/index.js +4 -4
  87. package/dist/plugins/claude-resources.d.ts +1 -0
  88. package/dist/plugins/claude-resources.js +4 -2
  89. package/dist/plugins/doc-history.js +1 -1
  90. package/dist/{integrations → plugins/internal}/claude-resources/index.d.ts +1 -16
  91. package/dist/{integrations → plugins/internal}/claude-resources/index.js +0 -9
  92. package/dist/{integrations → plugins/internal}/doc-history/index.d.ts +0 -17
  93. package/dist/{integrations → plugins/internal}/doc-history/index.js +0 -4
  94. package/dist/{integrations → plugins/internal}/doc-history/pre-build.d.ts +2 -4
  95. package/dist/plugins/internal/llms-txt/index.d.ts +7 -0
  96. package/dist/{integrations → plugins/internal}/llms-txt/load.d.ts +1 -1
  97. package/dist/{integrations → plugins/internal}/llms-txt/load.js +2 -2
  98. package/dist/{integrations → plugins/internal}/llms-txt/strip.d.ts +2 -3
  99. package/dist/{integrations → plugins/internal}/llms-txt/strip.js +1 -1
  100. package/dist/{integrations → plugins/internal}/llms-txt/types.d.ts +13 -22
  101. package/dist/{integrations → plugins/internal}/search-index/collect.js +1 -1
  102. package/dist/plugins/internal/theme-packs/copy.d.ts +32 -0
  103. package/dist/plugins/internal/theme-packs/copy.js +45 -0
  104. package/dist/plugins/internal/theme-packs/dev-middleware.d.ts +22 -0
  105. package/dist/plugins/internal/theme-packs/dev-middleware.js +80 -0
  106. package/dist/plugins/internal/theme-packs/index.d.ts +6 -0
  107. package/dist/plugins/internal/theme-packs/index.js +9 -0
  108. package/dist/plugins/internal/theme-packs/resolve.d.ts +17 -0
  109. package/dist/plugins/internal/theme-packs/resolve.js +17 -0
  110. package/dist/plugins/internal/theme-packs/types.d.ts +22 -0
  111. package/dist/plugins/internal/theme-packs/types.js +0 -0
  112. package/dist/plugins/llms-txt.js +1 -1
  113. package/dist/plugins/routes.js +11 -1
  114. package/dist/plugins/search-index.js +1 -1
  115. package/dist/plugins/theme-packs.d.ts +3 -0
  116. package/dist/plugins/theme-packs.js +40 -0
  117. package/dist/preset.d.ts +19 -14
  118. package/dist/preset.js +24 -9
  119. package/dist/route-context/index.js +4 -6
  120. package/dist/route-enumerators/index.d.ts +6 -18
  121. package/dist/route-enumerators/index.js +8 -6
  122. package/dist/routes/404.js +3 -1
  123. package/dist/routes/_chrome.js +2 -2
  124. package/dist/routes/_context.d.ts +7 -3
  125. package/dist/routes/_context.js +2 -0
  126. package/dist/routes/_docs-helpers.js +9 -21
  127. package/dist/safelist.css +1 -1
  128. package/dist/settings.d.ts +27 -12
  129. package/dist/sidebar-tree/build-tree.d.ts +3 -4
  130. package/dist/sidebar-tree/build-tree.js +4 -3
  131. package/dist/sidebar-tree/index.d.ts +2 -2
  132. package/dist/sidebar-tree/types.d.ts +6 -17
  133. package/dist/site-tree-nav-island/index.d.ts +3 -1
  134. package/dist/site-tree-nav-island/index.js +17 -5
  135. package/dist/site-tree-nav-island/state.d.ts +4 -0
  136. package/dist/site-tree-nav-island/state.js +10 -0
  137. package/dist/tag-helpers/index.d.ts +6 -13
  138. package/dist/tag-helpers/index.js +5 -23
  139. package/dist/tag-pages/index.d.ts +8 -21
  140. package/dist/tag-pages/index.js +14 -10
  141. package/dist/tags-audit.d.ts +16 -44
  142. package/dist/tags-audit.js +9 -172
  143. package/dist/theme/color-scheme-provider.d.ts +2 -3
  144. package/dist/theme/color-scheme-provider.js +2 -10
  145. package/dist/theme/index.d.ts +1 -4
  146. package/dist/theme/index.js +2 -30
  147. package/dist/theme/theme-pack-provider.d.ts +42 -0
  148. package/dist/theme/theme-pack-provider.js +75 -0
  149. package/dist/theme-cli/apply.d.ts +16 -0
  150. package/dist/theme-cli/apply.js +61 -0
  151. package/dist/theme-cli/config-io.d.ts +15 -0
  152. package/dist/theme-cli/config-io.js +51 -0
  153. package/dist/theme-cli/config-rewriter.d.ts +21 -0
  154. package/dist/theme-cli/config-rewriter.js +141 -0
  155. package/dist/theme-cli/config-scanner.d.ts +63 -0
  156. package/dist/theme-cli/config-scanner.js +288 -0
  157. package/dist/theme-cli/index.d.ts +7 -0
  158. package/dist/theme-cli/index.js +38 -0
  159. package/dist/theme-cli/list.d.ts +27 -0
  160. package/dist/theme-cli/list.js +64 -0
  161. package/dist/theme-cli/provenance.d.ts +17 -0
  162. package/dist/theme-cli/provenance.js +35 -0
  163. package/dist/theme-cli/registry.d.ts +14 -0
  164. package/dist/theme-cli/registry.js +13 -0
  165. package/dist/theme-pack-dialog/dialog-state.d.ts +25 -0
  166. package/dist/theme-pack-dialog/dialog-state.js +40 -0
  167. package/dist/theme-pack-dialog/index.d.ts +5 -0
  168. package/dist/theme-pack-dialog/index.js +152 -0
  169. package/dist/theme-pack-dialog/theme-pack-card.d.ts +25 -0
  170. package/dist/theme-pack-dialog/theme-pack-card.js +72 -0
  171. package/dist/theme-pack-switcher/index.d.ts +49 -0
  172. package/dist/theme-pack-switcher/index.js +205 -0
  173. package/dist/theme-pack-switcher/switcher-state.d.ts +56 -0
  174. package/dist/theme-pack-switcher/switcher-state.js +43 -0
  175. package/dist/theme-pack-switcher/theme-pack-sync.d.ts +85 -0
  176. package/dist/theme-pack-switcher/theme-pack-sync.js +121 -0
  177. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-400-latin.woff2 +0 -0
  178. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-700-latin.woff2 +0 -0
  179. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-400-latin.woff2 +0 -0
  180. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-700-latin.woff2 +0 -0
  181. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-italic-latin.woff2 +0 -0
  182. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-latin.woff2 +0 -0
  183. package/dist/theme-packs/beacon/fonts/OFL.txt +94 -0
  184. package/dist/theme-packs/beacon/meta.json +37 -0
  185. package/dist/theme-packs/beacon/pack.css +442 -0
  186. package/dist/theme-packs/broadsheet/fonts/CourierPrime-400-latin.woff2 +0 -0
  187. package/dist/theme-packs/broadsheet/fonts/CourierPrime-700-latin.woff2 +0 -0
  188. package/dist/theme-packs/broadsheet/fonts/OFL.txt +95 -0
  189. package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-italic-latin.woff2 +0 -0
  190. package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-latin.woff2 +0 -0
  191. package/dist/theme-packs/broadsheet/fonts/SourceSerif4-italic-latin.woff2 +0 -0
  192. package/dist/theme-packs/broadsheet/fonts/SourceSerif4-latin.woff2 +0 -0
  193. package/dist/theme-packs/broadsheet/meta.json +38 -0
  194. package/dist/theme-packs/broadsheet/pack.css +448 -0
  195. package/dist/theme-packs/brutalist/fonts/ArchivoBlack-latin.woff2 +0 -0
  196. package/dist/theme-packs/brutalist/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  197. package/dist/theme-packs/brutalist/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  198. package/dist/theme-packs/brutalist/fonts/IBMPlexMono-700-latin.woff2 +0 -0
  199. package/dist/theme-packs/brutalist/fonts/OFL.txt +95 -0
  200. package/dist/theme-packs/brutalist/fonts/SpaceGrotesk-latin.woff2 +0 -0
  201. package/dist/theme-packs/brutalist/meta.json +38 -0
  202. package/dist/theme-packs/brutalist/pack.css +546 -0
  203. package/dist/theme-packs/default/meta.json +37 -0
  204. package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  205. package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  206. package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  207. package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  208. package/dist/theme-packs/drift/fonts/IBMPlexSans-italic-latin.woff2 +0 -0
  209. package/dist/theme-packs/drift/fonts/IBMPlexSans-latin-ext.woff2 +0 -0
  210. package/dist/theme-packs/drift/fonts/IBMPlexSans-latin.woff2 +0 -0
  211. package/dist/theme-packs/drift/fonts/OFL.txt +93 -0
  212. package/dist/theme-packs/drift/meta.json +37 -0
  213. package/dist/theme-packs/drift/pack.css +478 -0
  214. package/dist/theme-packs/fjord/fonts/Inter-latin-ext.woff2 +0 -0
  215. package/dist/theme-packs/fjord/fonts/Inter-latin.woff2 +0 -0
  216. package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
  217. package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin.woff2 +0 -0
  218. package/dist/theme-packs/fjord/fonts/OFL.txt +94 -0
  219. package/dist/theme-packs/fjord/meta.json +37 -0
  220. package/dist/theme-packs/fjord/pack.css +375 -0
  221. package/dist/theme-packs/foundry/fonts/Inter-latin-ext.woff2 +0 -0
  222. package/dist/theme-packs/foundry/fonts/Inter-latin.woff2 +0 -0
  223. package/dist/theme-packs/foundry/fonts/OFL.txt +93 -0
  224. package/dist/theme-packs/foundry/meta.json +37 -0
  225. package/dist/theme-packs/foundry/pack.css +202 -0
  226. package/dist/theme-packs/futura-editorial/fonts/Jost-latin.woff2 +0 -0
  227. package/dist/theme-packs/futura-editorial/fonts/NotoSans-italic-latin.woff2 +0 -0
  228. package/dist/theme-packs/futura-editorial/fonts/NotoSans-latin.woff2 +0 -0
  229. package/dist/theme-packs/futura-editorial/fonts/OFL.txt +95 -0
  230. package/dist/theme-packs/futura-editorial/fonts/SpaceMono-400-latin.woff2 +0 -0
  231. package/dist/theme-packs/futura-editorial/fonts/SpaceMono-700-latin.woff2 +0 -0
  232. package/dist/theme-packs/futura-editorial/meta.json +38 -0
  233. package/dist/theme-packs/futura-editorial/pack.css +313 -0
  234. package/dist/theme-packs/hearth/fonts/Fraunces-italic-latin.woff2 +0 -0
  235. package/dist/theme-packs/hearth/fonts/Fraunces-latin.woff2 +0 -0
  236. package/dist/theme-packs/hearth/fonts/Nunito-latin.woff2 +0 -0
  237. package/dist/theme-packs/hearth/fonts/OFL.txt +95 -0
  238. package/dist/theme-packs/hearth/fonts/SplineSansMono-latin.woff2 +0 -0
  239. package/dist/theme-packs/hearth/meta.json +38 -0
  240. package/dist/theme-packs/hearth/pack.css +385 -0
  241. package/dist/theme-packs/hollow/fonts/OFL.txt +94 -0
  242. package/dist/theme-packs/hollow/fonts/SpaceGrotesk-latin.woff2 +0 -0
  243. package/dist/theme-packs/hollow/fonts/SpaceMono-400-italic-latin.woff2 +0 -0
  244. package/dist/theme-packs/hollow/fonts/SpaceMono-400-latin.woff2 +0 -0
  245. package/dist/theme-packs/hollow/fonts/SpaceMono-700-latin.woff2 +0 -0
  246. package/dist/theme-packs/hollow/meta.json +37 -0
  247. package/dist/theme-packs/hollow/pack.css +428 -0
  248. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext-italic.woff2 +0 -0
  249. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext.woff2 +0 -0
  250. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-italic.woff2 +0 -0
  251. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin.woff2 +0 -0
  252. package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  253. package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  254. package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  255. package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  256. package/dist/theme-packs/ledger/fonts/OFL.txt +94 -0
  257. package/dist/theme-packs/ledger/meta.json +37 -0
  258. package/dist/theme-packs/ledger/pack.css +463 -0
  259. package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin-ext.woff2 +0 -0
  260. package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin.woff2 +0 -0
  261. package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin-ext.woff2 +0 -0
  262. package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin.woff2 +0 -0
  263. package/dist/theme-packs/manuscript/fonts/EBGaramond-latin-italic.woff2 +0 -0
  264. package/dist/theme-packs/manuscript/fonts/EBGaramond-latin.woff2 +0 -0
  265. package/dist/theme-packs/manuscript/fonts/OFL.txt +94 -0
  266. package/dist/theme-packs/manuscript/meta.json +37 -0
  267. package/dist/theme-packs/manuscript/pack.css +376 -0
  268. package/dist/theme-packs/matcha/fonts/MPLUS1Code-latin.woff2 +0 -0
  269. package/dist/theme-packs/matcha/fonts/OFL.txt +95 -0
  270. package/dist/theme-packs/matcha/fonts/ShipporiMincho-500-latin.woff2 +0 -0
  271. package/dist/theme-packs/matcha/fonts/ShipporiMincho-700-latin.woff2 +0 -0
  272. package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
  273. package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
  274. package/dist/theme-packs/matcha/meta.json +38 -0
  275. package/dist/theme-packs/matcha/pack.css +409 -0
  276. package/dist/theme-packs/nocturne/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
  277. package/dist/theme-packs/nocturne/fonts/CormorantGaramond-latin.woff2 +0 -0
  278. package/dist/theme-packs/nocturne/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  279. package/dist/theme-packs/nocturne/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  280. package/dist/theme-packs/nocturne/fonts/IBMPlexMono-italic-latin.woff2 +0 -0
  281. package/dist/theme-packs/nocturne/fonts/Manrope-latin.woff2 +0 -0
  282. package/dist/theme-packs/nocturne/fonts/OFL.txt +95 -0
  283. package/dist/theme-packs/nocturne/meta.json +38 -0
  284. package/dist/theme-packs/nocturne/pack.css +502 -0
  285. package/dist/theme-packs/observatory/fonts/JosefinSans-latin.woff2 +0 -0
  286. package/dist/theme-packs/observatory/fonts/Jost-italic-latin.woff2 +0 -0
  287. package/dist/theme-packs/observatory/fonts/Jost-latin.woff2 +0 -0
  288. package/dist/theme-packs/observatory/fonts/OFL.txt +95 -0
  289. package/dist/theme-packs/observatory/fonts/SpaceMono-400-latin.woff2 +0 -0
  290. package/dist/theme-packs/observatory/fonts/SpaceMono-700-latin.woff2 +0 -0
  291. package/dist/theme-packs/observatory/fonts/SpaceMono-italic-latin.woff2 +0 -0
  292. package/dist/theme-packs/observatory/meta.json +38 -0
  293. package/dist/theme-packs/observatory/pack.css +728 -0
  294. package/dist/theme-packs/onyx/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
  295. package/dist/theme-packs/onyx/fonts/CormorantGaramond-latin.woff2 +0 -0
  296. package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  297. package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  298. package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  299. package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  300. package/dist/theme-packs/onyx/fonts/Jost-latin.woff2 +0 -0
  301. package/dist/theme-packs/onyx/fonts/OFL.txt +95 -0
  302. package/dist/theme-packs/onyx/meta.json +38 -0
  303. package/dist/theme-packs/onyx/pack.css +497 -0
  304. package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
  305. package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin.woff2 +0 -0
  306. package/dist/theme-packs/phosphor/fonts/OFL.txt +94 -0
  307. package/dist/theme-packs/phosphor/fonts/VT323-latin-ext.woff2 +0 -0
  308. package/dist/theme-packs/phosphor/fonts/VT323-latin.woff2 +0 -0
  309. package/dist/theme-packs/phosphor/meta.json +38 -0
  310. package/dist/theme-packs/phosphor/pack.css +493 -0
  311. package/dist/theme-packs/solar/fonts/OFL.txt +94 -0
  312. package/dist/theme-packs/solar/fonts/SourceCodePro-italic-latin.woff2 +0 -0
  313. package/dist/theme-packs/solar/fonts/SourceCodePro-latin.woff2 +0 -0
  314. package/dist/theme-packs/solar/fonts/SourceSans3-italic-latin.woff2 +0 -0
  315. package/dist/theme-packs/solar/fonts/SourceSans3-latin.woff2 +0 -0
  316. package/dist/theme-packs/solar/meta.json +37 -0
  317. package/dist/theme-packs/solar/pack.css +380 -0
  318. package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  319. package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  320. package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  321. package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  322. package/dist/theme-packs/sumi/fonts/OFL.txt +95 -0
  323. package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-600-latin.woff2 +0 -0
  324. package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-700-latin.woff2 +0 -0
  325. package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-800-latin.woff2 +0 -0
  326. package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
  327. package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
  328. package/dist/theme-packs/sumi/meta.json +38 -0
  329. package/dist/theme-packs/sumi/pack.css +502 -0
  330. package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  331. package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  332. package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-600-latin.woff2 +0 -0
  333. package/dist/theme-packs/swissgrid/fonts/Inter-latin-ext.woff2 +0 -0
  334. package/dist/theme-packs/swissgrid/fonts/Inter-latin.woff2 +0 -0
  335. package/dist/theme-packs/swissgrid/fonts/InterTight-latin.woff2 +0 -0
  336. package/dist/theme-packs/swissgrid/fonts/OFL.txt +95 -0
  337. package/dist/theme-packs/swissgrid/meta.json +38 -0
  338. package/dist/theme-packs/swissgrid/pack.css +518 -0
  339. package/dist/theme-packs/washi/fonts/MPlus1Code-400-latin.woff2 +0 -0
  340. package/dist/theme-packs/washi/fonts/MPlus1Code-500-latin.woff2 +0 -0
  341. package/dist/theme-packs/washi/fonts/OFL.txt +95 -0
  342. package/dist/theme-packs/washi/fonts/ShipporiMincho-500-latin.woff2 +0 -0
  343. package/dist/theme-packs/washi/fonts/ShipporiMincho-600-latin.woff2 +0 -0
  344. package/dist/theme-packs/washi/fonts/ShipporiMincho-700-latin.woff2 +0 -0
  345. package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
  346. package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
  347. package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-700-latin.woff2 +0 -0
  348. package/dist/theme-packs/washi/meta.json +38 -0
  349. package/dist/theme-packs/washi/pack.css +479 -0
  350. package/dist/theme-packs-registry/index.d.ts +5 -0
  351. package/dist/theme-packs-registry/index.js +30 -0
  352. package/dist/theme-packs-registry/load-registry.d.ts +23 -0
  353. package/dist/theme-packs-registry/load-registry.js +64 -0
  354. package/dist/theme-packs-registry/meta-schema.d.ts +70 -0
  355. package/dist/theme-packs-registry/meta-schema.js +38 -0
  356. package/dist/theme-packs-registry/resolve-enabled-packs.d.ts +25 -0
  357. package/dist/theme-packs-registry/resolve-enabled-packs.js +43 -0
  358. package/dist/theme-packs-registry/token-manifest.d.ts +19 -0
  359. package/dist/theme-packs-registry/token-manifest.js +57 -0
  360. package/dist/theme-packs-registry/validator.d.ts +35 -0
  361. package/dist/theme-packs-registry/validator.js +284 -0
  362. package/dist/theme-toggle/color-scheme-sync.d.ts +2 -4
  363. package/dist/versions-page/index.d.ts +2 -2
  364. package/dist/versions-page/index.js +8 -8
  365. package/eject/breadcrumb/breadcrumb.tsx +4 -4
  366. package/eject/breadcrumb/find-path.ts +2 -2
  367. package/eject/breadcrumb/index.ts +1 -1
  368. package/eject/breadcrumb/types.ts +0 -6
  369. package/eject/code-group/index.tsx +2 -2
  370. package/eject/doc-history/index.tsx +1 -1
  371. package/eject/doc-pager/index.tsx +1 -1
  372. package/eject/footer/footer.tsx +1 -0
  373. package/eject/header/header.tsx +86 -21
  374. package/eject/header/index.ts +3 -0
  375. package/eject/header/types.ts +39 -1
  376. package/eject/site-tree-nav-island/index.tsx +15 -3
  377. package/eject/site-tree-nav-island/state.ts +9 -0
  378. package/eject/theme-toggle/color-scheme-sync.ts +2 -4
  379. package/package.json +35 -29
  380. package/routes-src/404.tsx +4 -1
  381. package/routes-src/_chrome.tsx +6 -5
  382. package/routes-src/_context.ts +4 -0
  383. package/routes-src/_docs-helpers.ts +9 -29
  384. package/routes-src/_virtual.d.ts +4 -0
  385. package/virtual-modules.d.ts +4 -0
  386. package/zfb-config-shim.d.ts +40 -18
  387. package/dist/integrations/llms-txt/index.d.ts +0 -33
  388. package/dist/theme/color-tweak-export-modal.d.ts +0 -16
  389. package/dist/theme/color-tweak-export-modal.js +0 -138
  390. package/dist/theme/design-token-serde.d.ts +0 -183
  391. package/dist/theme/design-token-serde.js +0 -346
  392. package/dist/theme/design-token-types.d.ts +0 -13
  393. package/dist/theme/design-token-types.js +0 -6
  394. package/dist/theme/iframe-bridge.d.ts +0 -42
  395. package/dist/theme/iframe-bridge.js +0 -72
  396. /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.d.ts +0 -0
  397. /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.js +0 -0
  398. /package/dist/{integrations → plugins/internal}/claude-resources/generate.d.ts +0 -0
  399. /package/dist/{integrations → plugins/internal}/claude-resources/generate.js +0 -0
  400. /package/dist/{integrations → plugins/internal}/doc-history/pre-build.js +0 -0
  401. /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.d.ts +0 -0
  402. /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.js +0 -0
  403. /package/dist/{integrations → plugins/internal}/llms-txt/emit.d.ts +0 -0
  404. /package/dist/{integrations → plugins/internal}/llms-txt/emit.js +0 -0
  405. /package/dist/{integrations → plugins/internal}/llms-txt/generate.d.ts +0 -0
  406. /package/dist/{integrations → plugins/internal}/llms-txt/generate.js +0 -0
  407. /package/dist/{integrations → plugins/internal}/llms-txt/index.js +0 -0
  408. /package/dist/{integrations → plugins/internal}/llms-txt/types.js +0 -0
  409. /package/dist/{integrations → plugins/internal}/search-index/build-emitter.d.ts +0 -0
  410. /package/dist/{integrations → plugins/internal}/search-index/build-emitter.js +0 -0
  411. /package/dist/{integrations → plugins/internal}/search-index/collect.d.ts +0 -0
  412. /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.d.ts +0 -0
  413. /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.js +0 -0
  414. /package/dist/{integrations → plugins/internal}/search-index/index.d.ts +0 -0
  415. /package/dist/{integrations → plugins/internal}/search-index/index.js +0 -0
  416. /package/dist/{integrations → plugins/internal}/search-index/types.d.ts +0 -0
  417. /package/dist/{integrations → plugins/internal}/search-index/types.js +0 -0
@@ -4,7 +4,6 @@ import type { JSX, VNode } from "preact";
4
4
  import type { ChromeContext, FactoryComponent } from "../factory-context/index.js";
5
5
  import type { Settings } from "../settings.js";
6
6
  import { type ColorScheme } from "../color-scheme-utils.js";
7
- import { createBodyEndIslands } from "../doc-body-end-islands/index.js";
8
7
  /** Package-default color scheme used when `colorSchemes` is `null` or a key is
9
8
  * missing. Exported so `createChrome` keeps the identical fallback. Base roles
10
9
  * follow the epic's Default Dark defaults on the minimized 5-base ramp
@@ -46,15 +45,22 @@ export declare function deriveSearchWidgetSlot(ctx: ChromeContext): (props: {
46
45
  loadingIndexText: string;
47
46
  noResultsText: string;
48
47
  }) => JSX.Element;
49
- /** Derive the body-end islands: `ctx.hostBindings.BodyEndIslands` when supplied,
50
- * else the package-island subset reconstructed from `settings`. The design-
51
- * token-panel bootstrap slot defaults to the PACKAGE-DEFAULT
52
- * `DesignTokenPanelBootstrap` island (statically imported above #2658
53
- * gate-2 fix, Wave-5 confirm #2659) so a bare `createChrome(routeCtx)` call
54
- * (the locked-manifest self-contained doc stub, #2653) still mounts the
55
- * settings-gated panel; `ctx.hostBindings.DesignTokenPanelBootstrap`
56
- * overrides it when a host supplies its own. */
57
- export declare function deriveBodyEndIslands(ctx: ChromeContext): ReturnType<typeof createBodyEndIslands>;
48
+ /**
49
+ * Derive the body-end islands. The package owns the settings-gated
50
+ * DesignTokenPanelBootstrap + ThemePackSwitcher mounts even when a host
51
+ * supplies a BodyEndIslands override; the override is composed with those
52
+ * package islands rather than replacing them. Without an override,
53
+ * `createBodyEndIslands` already contains the same package islands, so the
54
+ * two paths are deliberately exclusive.
55
+ *
56
+ * The components default to the statically imported package islands
57
+ * (#2658 gate-2 fix; #2821), preserving route → chrome → derive → component
58
+ * scanner reachability for bare `createChrome(routeCtx)` callers. A host may
59
+ * still replace the DTP component through
60
+ * `hostBindings.DesignTokenPanelBootstrap`, but the package remains the sole
61
+ * owner of the mounts and settings gates.
62
+ */
63
+ export declare function deriveBodyEndIslands(ctx: ChromeContext): (props: import("../doc-body-end-islands/index.js").BodyEndIslandsProps) => JSX.Element;
58
64
  /** Derive the DocHistory island: `ctx.hostBindings.DocHistory` when supplied,
59
65
  * else the package no-op stub. */
60
66
  export declare function deriveDocHistorySlot(ctx: ChromeContext): typeof DocHistoryStub;
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx } from "preact/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
2
2
  import { createComposeMetaTitle } from "../compose-meta-title/index.js";
3
3
  import {
4
4
  generateCssCustomProperties,
@@ -6,7 +6,11 @@ import {
6
6
  SEMANTIC_RAMP_DEFAULTS
7
7
  } from "../color-scheme-utils.js";
8
8
  import { createBodyEndIslands } from "../doc-body-end-islands/index.js";
9
+ import { createDesignTokenPanelIsland } from "../doc-body-end-islands/design-token-panel-island.js";
9
10
  import { DesignTokenPanelBootstrap } from "../design-token-panel-bootstrap.js";
11
+ import { ThemePackSwitcher } from "../theme-pack-switcher/index.js";
12
+ import { createThemePackSwitcherIsland } from "../doc-body-end-islands/theme-pack-switcher-island.js";
13
+ import { DEFAULT_THEME_PACK_SLUG } from "../theme-pack-switcher/theme-pack-sync.js";
10
14
  import { SearchWidget } from "../search-widget/index.js";
11
15
  import { createMdxComponents } from "../mdx-components/index.js";
12
16
  import { createCategoryNavWrapper } from "../category-nav/index.js";
@@ -51,7 +55,8 @@ const DEFAULT_SCHEME = {
51
55
  fg: { base: 0 },
52
56
  selectionBg: { base: 2 },
53
57
  selectionFg: { base: 0 },
54
- semantic: { ...SEMANTIC_RAMP_DEFAULTS }
58
+ semantic: { ...SEMANTIC_RAMP_DEFAULTS },
59
+ syntax: {}
55
60
  }
56
61
  };
57
62
  function DocHistoryStub(_props) {
@@ -146,11 +151,55 @@ function deriveSearchWidgetSlot(ctx) {
146
151
  }
147
152
  return ctx.hostBindings.SearchWidget ?? SearchWidgetBound;
148
153
  }
154
+ function deriveThemePackSwitcherProps(ctx) {
155
+ const registry = ctx.themePackRegistry;
156
+ if (registry == null) return null;
157
+ return {
158
+ active: ctx.settings.themePack ?? DEFAULT_THEME_PACK_SLUG,
159
+ order: registry.map((entry) => ({
160
+ slug: entry.slug,
161
+ name: entry.meta.name,
162
+ mode: entry.meta.mode,
163
+ description: entry.meta.description
164
+ })),
165
+ // Base prefix WITH trailing slash — the head-with-defaults themePackBase
166
+ // convention; the dialog (#2825) concatenates "theme-packs/index.json".
167
+ base: ctx.withBase("/")
168
+ };
169
+ }
149
170
  function deriveBodyEndIslands(ctx) {
150
- return ctx.hostBindings.BodyEndIslands ?? createBodyEndIslands({
151
- settings: ctx.settings,
171
+ const designTokenPanelDeps = {
152
172
  DesignTokenPanelBootstrap: ctx.hostBindings.DesignTokenPanelBootstrap ?? DesignTokenPanelBootstrap
173
+ };
174
+ const themePackSwitcherDeps = {
175
+ themePackSwitcherProps: deriveThemePackSwitcherProps(ctx),
176
+ ThemePackSwitcher
177
+ };
178
+ const HostBodyEndIslands = ctx.hostBindings.BodyEndIslands;
179
+ if (!HostBodyEndIslands) {
180
+ return createBodyEndIslands({
181
+ settings: ctx.settings,
182
+ ...designTokenPanelDeps,
183
+ ...themePackSwitcherDeps
184
+ });
185
+ }
186
+ const DesignTokenPanelIsland = createDesignTokenPanelIsland({
187
+ designTokenPanel: ctx.settings.designTokenPanel,
188
+ ...designTokenPanelDeps
153
189
  });
190
+ const ThemePackSwitcherIsland = createThemePackSwitcherIsland({
191
+ themePackSwitcher: ctx.settings.themePackSwitcher === true,
192
+ ...themePackSwitcherDeps
193
+ });
194
+ const HostBodyEnd = HostBodyEndIslands;
195
+ function BodyEndIslands(props) {
196
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
197
+ /* @__PURE__ */ jsx(HostBodyEnd, { ...props }),
198
+ /* @__PURE__ */ jsx(DesignTokenPanelIsland, {}),
199
+ /* @__PURE__ */ jsx(ThemePackSwitcherIsland, {})
200
+ ] });
201
+ }
202
+ return BodyEndIslands;
154
203
  }
155
204
  function deriveDocHistorySlot(ctx) {
156
205
  return ctx.hostBindings.DocHistory ?? DocHistoryStub;
@@ -2,6 +2,9 @@
2
2
  /** @jsxImportSource preact */
3
3
  import type { RouteContext, ChromeHostBindings } from "../factory-context/index.js";
4
4
  import type { Settings } from "../settings.js";
5
+ import type { JSX, VNode } from "preact";
6
+ import type { HeaderWithDefaultsProps } from "../header-with-defaults/index.js";
7
+ import type { SidebarWithDefaultsProps } from "../sidebar-with-defaults/index.js";
5
8
  /**
6
9
  * Build the wired page-chrome factories from a reconstructed route context plus
7
10
  * the host-bound slots. Assembles a {@link ChromeContext} (route context +
@@ -12,27 +15,27 @@ import type { Settings } from "../settings.js";
12
15
  */
13
16
  export declare function createChrome<S extends Settings = Settings>(context: RouteContext<S>, hostBindings?: ChromeHostBindings): {
14
17
  composeMetaTitle: (title: string) => string;
15
- HeadWithDefaults: (props: import("../head-with-defaults/index.js").HeadWithDefaultsProps) => import("preact").JSX.Element;
16
- HeaderWithDefaults: (props: import("../header-with-defaults/index.js").HeaderWithDefaultsProps) => import("preact").JSX.Element;
18
+ HeadWithDefaults: (props: import("../head-with-defaults/index.js").HeadWithDefaultsProps) => JSX.Element;
19
+ HeaderWithDefaults: (props: HeaderWithDefaultsProps) => JSX.Element;
17
20
  FooterWithDefaults: (props: {
18
21
  lang?: string;
19
- }) => import("preact").VNode;
20
- SidebarWithDefaults: (props: import("../sidebar-with-defaults/index.js").SidebarWithDefaultsProps) => import("preact").JSX.Element;
21
- renderDocPage: (props: import("../doc-page-props/index.js").DocPageBaseProps, opts: import("../doc-page-renderer/index.js").RenderDocPageOptions) => import("preact").JSX.Element;
22
- VersionsPageView: (props: import("../versions-page/index.js").VersionsPageViewProps) => import("preact").JSX.Element;
22
+ }) => VNode;
23
+ SidebarWithDefaults: (props: SidebarWithDefaultsProps) => JSX.Element;
24
+ renderDocPage: (props: import("../doc-page-props/index.js").DocPageBaseProps, opts: import("../doc-page-renderer/index.js").RenderDocPageOptions) => JSX.Element;
25
+ VersionsPageView: (props: import("../versions-page/index.js").VersionsPageViewProps) => JSX.Element;
23
26
  collectTagMapForLocale: (locale: string) => Map<string, import("../tag-pages/index.js").TagInfo>;
24
27
  TagDetailPageView: (props: {
25
28
  locale: string;
26
29
  tag: string;
27
30
  tagInfo: import("../tag-pages/index.js").TagInfo;
28
- }) => import("preact").JSX.Element;
31
+ }) => JSX.Element;
29
32
  TagsIndexPageView: (props: {
30
33
  locale: string;
31
34
  children?: import("preact").ComponentChildren;
32
- }) => import("preact").JSX.Element;
35
+ }) => JSX.Element;
33
36
  SiteTreeNavWrapper: import("../factory-context/index.js").FactoryComponent;
34
- BodyEndIslands: (props: import("../doc-body-end-islands/index.js").BodyEndIslandsProps) => import("preact").JSX.Element;
35
- HomePageView: (props: import("../home-page/index.js").HomePageViewProps) => import("preact").JSX.Element;
37
+ BodyEndIslands: (props: import("../doc-body-end-islands/index.js").BodyEndIslandsProps) => JSX.Element;
38
+ HomePageView: (props: import("../home-page/index.js").HomePageViewProps) => JSX.Element;
36
39
  };
37
40
  /** The wired page-chrome surface returned by {@link createChrome}. */
38
41
  export type Chrome = ReturnType<typeof createChrome>;
@@ -1,7 +1,5 @@
1
+ import { Fragment, jsx } from "preact/jsx-runtime";
1
2
  import { createHeadWithDefaults } from "../head-with-defaults/index.js";
2
- import { createHeaderWithDefaults } from "../header-with-defaults/index.js";
3
- import { createFooterWithDefaults } from "../footer-with-defaults/index.js";
4
- import { createSidebarWithDefaults } from "../sidebar-with-defaults/index.js";
5
3
  import { createRenderDocPage } from "../doc-page-renderer/index.js";
6
4
  import { createVersionsPageView } from "../versions-page/index.js";
7
5
  import { createTagPages } from "../tag-pages/index.js";
@@ -11,14 +9,22 @@ import {
11
9
  deriveBodyEndIslands,
12
10
  deriveMdxComponents
13
11
  } from "./derive.js";
12
+ import { derivePrimaryChromeSlots } from "./primary-slots.js";
14
13
  function createChrome(context, hostBindings = {}) {
15
14
  const components = {};
16
15
  const ctx = { ...context, components, hostBindings };
17
16
  const composeMetaTitle = deriveComposeMetaTitle(ctx);
18
17
  const HeadWithDefaults = createHeadWithDefaults(ctx);
19
- const HeaderWithDefaults = createHeaderWithDefaults(ctx);
20
- const FooterWithDefaults = createFooterWithDefaults(ctx);
21
- const SidebarWithDefaults = createSidebarWithDefaults(ctx);
18
+ const primary = derivePrimaryChromeSlots(ctx);
19
+ const HeaderWithDefaults = (props) => /* @__PURE__ */ jsx(Fragment, { children: primary.Header({ ...props, lang: props.lang ?? context.defaultLocale }) });
20
+ const FooterWithDefaults = (props) => /* @__PURE__ */ jsx(Fragment, { children: primary.Footer({ lang: props.lang ?? context.defaultLocale }) });
21
+ const SidebarWithDefaults = (props) => /* @__PURE__ */ jsx(Fragment, { children: primary.Sidebar({
22
+ currentSlug: props.currentSlug ?? "",
23
+ lang: props.lang ?? context.defaultLocale,
24
+ navSection: props.navSection,
25
+ currentVersion: props.currentVersion,
26
+ currentPath: props.currentPath ?? ""
27
+ }) });
22
28
  const renderDocPage = createRenderDocPage(ctx);
23
29
  const VersionsPageView = createVersionsPageView(ctx);
24
30
  const { collectTagMapForLocale, TagDetailPageView, TagsIndexPageView } = createTagPages(ctx);
@@ -0,0 +1,21 @@
1
+ /** @jsxRuntime automatic */
2
+ /** @jsxImportSource preact */
3
+ import type { ComponentChildren } from "preact";
4
+ import type { ChromeContext } from "../factory-context/index.js";
5
+ import type { BreadcrumbSlotProps, DocPagerSlotProps, FooterSlotProps, HeaderSlotProps, SidebarSlotProps, TocSlotProps } from "../chrome-bindings.js";
6
+ import type { Settings } from "../settings.js";
7
+ type PrimarySlot<P> = (props: P) => ComponentChildren;
8
+ /**
9
+ * Resolve all six primary chrome components through one binding object.
10
+ * Accessors keep package defaults lazy: a home view that only reads Header and
11
+ * Footer does not construct the doc-only Sidebar or DocPager factories.
12
+ */
13
+ export declare function derivePrimaryChromeSlots<S extends Settings = Settings>(ctx: ChromeContext<S>): {
14
+ readonly Header: PrimarySlot<HeaderSlotProps>;
15
+ readonly Footer: PrimarySlot<FooterSlotProps>;
16
+ readonly Sidebar: PrimarySlot<SidebarSlotProps>;
17
+ readonly Toc: PrimarySlot<TocSlotProps>;
18
+ readonly Breadcrumb: PrimarySlot<BreadcrumbSlotProps>;
19
+ readonly DocPager: PrimarySlot<DocPagerSlotProps>;
20
+ };
21
+ export {};
@@ -0,0 +1,59 @@
1
+ import { createHeaderWithDefaults } from "../header-with-defaults/index.js";
2
+ import { createFooterWithDefaults } from "../footer-with-defaults/index.js";
3
+ import { createSidebarWithDefaults } from "../sidebar-with-defaults/index.js";
4
+ import { Toc } from "../toc/index.js";
5
+ import { Breadcrumb } from "../breadcrumb/index.js";
6
+ import { createDocPager } from "../doc-pager/index.js";
7
+ function resolvePrimarySlot(slot, replacement, createPackageDefault) {
8
+ if (replacement !== void 0 && typeof replacement !== "function") {
9
+ throw new TypeError(
10
+ `Invalid primary chrome replacement at chromeBindings.${slot}: expected a callable component. Export ${slot} from the object built with defineChromeBindings() and point settings.chromeBindingsModule at that module.`
11
+ );
12
+ }
13
+ return replacement ? replacement : createPackageDefault();
14
+ }
15
+ function derivePrimaryChromeSlots(ctx) {
16
+ return {
17
+ get Header() {
18
+ return resolvePrimarySlot(
19
+ "Header",
20
+ ctx.hostBindings.Header,
21
+ () => createHeaderWithDefaults(ctx)
22
+ );
23
+ },
24
+ get Footer() {
25
+ return resolvePrimarySlot(
26
+ "Footer",
27
+ ctx.hostBindings.Footer,
28
+ () => createFooterWithDefaults(ctx)
29
+ );
30
+ },
31
+ get Sidebar() {
32
+ return resolvePrimarySlot(
33
+ "Sidebar",
34
+ ctx.hostBindings.Sidebar,
35
+ () => createSidebarWithDefaults(ctx)
36
+ );
37
+ },
38
+ get Toc() {
39
+ return resolvePrimarySlot("Toc", ctx.hostBindings.Toc, () => Toc);
40
+ },
41
+ get Breadcrumb() {
42
+ return resolvePrimarySlot(
43
+ "Breadcrumb",
44
+ ctx.hostBindings.Breadcrumb,
45
+ () => Breadcrumb
46
+ );
47
+ },
48
+ get DocPager() {
49
+ return resolvePrimarySlot(
50
+ "DocPager",
51
+ ctx.hostBindings.DocPager,
52
+ () => createDocPager(ctx)
53
+ );
54
+ }
55
+ };
56
+ }
57
+ export {
58
+ derivePrimaryChromeSlots
59
+ };
@@ -1,4 +1,9 @@
1
+ import type { ComponentChildren } from "preact";
2
+ import type { BreadcrumbItem } from "./breadcrumb/index.js";
3
+ import type { DocPageNavNode } from "./doc-page-shell/index.js";
4
+ import type { HeadingItem } from "./toc/index.js";
1
5
  import type { ChromeHostBindings } from "./factory-context/index.js";
6
+ import type { HeaderRightComponentRegistry } from "./header/types.js";
2
7
  /**
3
8
  * Props the header passes to the `SearchWidget` slot — the 7 locale-aware
4
9
  * strings from `header-with-defaults`'s `<SearchWidget … />` render (via
@@ -68,13 +73,76 @@ export interface FrontmatterRendererSlotProps {
68
73
  data: Record<string, unknown>;
69
74
  locale?: string;
70
75
  }
76
+ /**
77
+ * Props supplied at every package `Header` replacement call site. `lang` is
78
+ * always present; the remaining fields are route-specific.
79
+ */
80
+ export interface HeaderSlotProps {
81
+ lang: string;
82
+ currentPath?: string;
83
+ currentVersion?: string;
84
+ currentSlug?: string;
85
+ navSection?: string;
86
+ }
87
+ /** Props supplied at every package `Footer` replacement call site. */
88
+ export interface FooterSlotProps {
89
+ lang: string;
90
+ }
91
+ /**
92
+ * Props supplied to the doc-route `Sidebar` replacement. Properties whose
93
+ * values may be absent remain present with `undefined`, matching the real JSX
94
+ * call site.
95
+ */
96
+ export interface SidebarSlotProps {
97
+ currentSlug: string;
98
+ lang: string;
99
+ navSection: string | undefined;
100
+ currentVersion: string | undefined;
101
+ currentPath: string;
102
+ }
103
+ /** Props supplied to the desktop `Toc` replacement. */
104
+ export interface TocSlotProps {
105
+ headings: readonly HeadingItem[];
106
+ title: string;
107
+ }
108
+ /**
109
+ * Props supplied to `Breadcrumb` replacements. All package call sites provide
110
+ * pre-built items; doc routes additionally provide the optional right slot.
111
+ */
112
+ export interface BreadcrumbSlotProps {
113
+ items: BreadcrumbItem[];
114
+ rightSlot?: ComponentChildren;
115
+ }
116
+ /** Props supplied to the doc-route `DocPager` replacement. */
117
+ export interface DocPagerSlotProps {
118
+ prev: DocPageNavNode | null;
119
+ next: DocPageNavNode | null;
120
+ locale: string;
121
+ }
71
122
  /**
72
123
  * The compile-time-checked input for {@link defineChromeBindings}. See the
73
124
  * module header for the drift-detection rationale.
74
125
  */
75
126
  export interface ChromeBindingsInput {
127
+ /** Primary header replacement — see {@link HeaderSlotProps}. */
128
+ Header?: (props: HeaderSlotProps) => unknown;
129
+ /** Primary footer replacement — see {@link FooterSlotProps}. */
130
+ Footer?: (props: FooterSlotProps) => unknown;
131
+ /** Primary doc-sidebar replacement — see {@link SidebarSlotProps}. */
132
+ Sidebar?: (props: SidebarSlotProps) => unknown;
133
+ /** Primary desktop TOC replacement — see {@link TocSlotProps}. */
134
+ Toc?: (props: TocSlotProps) => unknown;
135
+ /** Primary breadcrumb replacement — see {@link BreadcrumbSlotProps}. */
136
+ Breadcrumb?: (props: BreadcrumbSlotProps) => unknown;
137
+ /** Primary previous/next pager replacement — see {@link DocPagerSlotProps}. */
138
+ DocPager?: (props: DocPagerSlotProps) => unknown;
76
139
  /** Header search widget — see {@link SearchWidgetSlotProps}. */
77
140
  SearchWidget?: (props: SearchWidgetSlotProps) => unknown;
141
+ /**
142
+ * Named header-right renderers. Values are callable-only and receive the
143
+ * exact `HeaderRightComponentProps` used by the header renderer.
144
+ */
145
+ headerRightComponents?: HeaderRightComponentRegistry;
78
146
  /** Body-end bootstrap islands — see {@link BodyEndIslandsSlotProps}. */
79
147
  BodyEndIslands?: (props: BodyEndIslandsSlotProps) => unknown;
80
148
  /** DocHistory island — see {@link DocHistorySlotProps}. */
@@ -1 +1,5 @@
1
+ /** Highlighted blocks emitted by the current class-mode highlighter. */
2
+ export declare const HIGHLIGHTED_CODE_BLOCK_SELECTOR = "pre.hi-root";
3
+ /** Highlighted blocks plus the intentional raw-code fallback inside tabs. */
4
+ export declare const CODE_BLOCK_ENHANCER_SELECTOR = "pre.hi-root, .tab-panel pre";
1
5
  export declare const CODE_BLOCK_ENHANCER_SCRIPT: string;
@@ -2,6 +2,8 @@ import {
2
2
  AFTER_NAVIGATE_EVENT,
3
3
  BEFORE_NAVIGATE_EVENT
4
4
  } from "../transitions/page-events.js";
5
+ const HIGHLIGHTED_CODE_BLOCK_SELECTOR = "pre.hi-root";
6
+ const CODE_BLOCK_ENHANCER_SELECTOR = `${HIGHLIGHTED_CODE_BLOCK_SELECTOR}, .tab-panel pre`;
5
7
  const CODE_BLOCK_ENHANCER_SCRIPT = `(function () {
6
8
  // Single shared ResizeObserver for all code blocks on the page.
7
9
  var wrapButtons = new Map();
@@ -14,15 +16,14 @@ const CODE_BLOCK_ENHANCER_SCRIPT = `(function () {
14
16
 
15
17
  function enhanceCodeBlocks() {
16
18
  // Selector covers two shapes:
17
- // 1. pre.syntect-... from the syntect highlighter (the class
18
- // is anchored or merged with other classes).
19
+ // 1. pre.hi-root from the class-mode highlighter.
19
20
  // 2. bare pre inside .tab-panel (TabItem) wrappers where some
20
21
  // pipelines emit class-less pre elements.
21
22
  // No backticks in this comment: this whole script body lives inside
22
23
  // a template literal in the host .ts module, so an inline backtick
23
24
  // would close the literal and make 'panel' a free identifier.
24
25
  var pres = document.querySelectorAll(
25
- 'pre[class*="syntect-"], .tab-panel pre',
26
+ ${JSON.stringify(CODE_BLOCK_ENHANCER_SELECTOR)},
26
27
  );
27
28
 
28
29
  for (var pi = 0; pi < pres.length; pi++) {
@@ -161,5 +162,7 @@ const CODE_BLOCK_ENHANCER_SCRIPT = `(function () {
161
162
  document.addEventListener(${JSON.stringify(AFTER_NAVIGATE_EVENT)}, enhanceCodeBlocks);
162
163
  })();`;
163
164
  export {
164
- CODE_BLOCK_ENHANCER_SCRIPT
165
+ CODE_BLOCK_ENHANCER_SCRIPT,
166
+ CODE_BLOCK_ENHANCER_SELECTOR,
167
+ HIGHLIGHTED_CODE_BLOCK_SELECTOR
165
168
  };
@@ -8,7 +8,8 @@ import type { JSX } from "preact";
8
8
  * and emits the code-block enhancer init script via `dangerouslySetInnerHTML`.
9
9
  *
10
10
  * The script:
11
- * - Wraps each `<pre class="syntect-*">` in a `.code-block-wrapper` container.
11
+ * - Wraps each highlighted `<pre>` (`.hi-root`) and raw tab-panel fallback in
12
+ * a `.code-block-wrapper` container.
12
13
  * - Adds a copy-to-clipboard button and a word-wrap toggle button.
13
14
  * - Observes resize events to hide the wrap button when content fits.
14
15
  * - Handles before-navigate cleanup and after-navigate re-init for View
@@ -16,4 +17,3 @@ import type { JSX } from "preact";
16
17
  * `AFTER_NAVIGATE_EVENT` in `../transitions/page-events.ts`.
17
18
  */
18
19
  export declare function CodeBlockEnhancer(): JSX.Element;
19
- export default CodeBlockEnhancer;
@@ -6,8 +6,6 @@ function CodeBlockEnhancer() {
6
6
  /* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: CODE_BLOCK_ENHANCER_SCRIPT } })
7
7
  ] });
8
8
  }
9
- var code_block_enhancer_default = CodeBlockEnhancer;
10
9
  export {
11
- CodeBlockEnhancer,
12
- code_block_enhancer_default as default
10
+ CodeBlockEnhancer
13
11
  };
@@ -1,9 +1,9 @@
1
- export { CodeBlockEnhancer, default as CodeBlockEnhancerDefault } from "./code-block-enhancer.js";
1
+ export { CodeBlockEnhancer } from "./code-block-enhancer.js";
2
2
  export { CODE_BLOCK_ENHANCER_SCRIPT } from "./code-block-enhancer-script.js";
3
- export { MermaidInit, default as MermaidInitDefault, } from "./mermaid-init.js";
3
+ export { MermaidInit } from "./mermaid-init.js";
4
4
  export type { MermaidInitProps } from "./mermaid-init.js";
5
- export { MERMAID_INIT_SCRIPT, MERMAID_CDN_MODULE_URL, buildMermaidInitScript, } from "./mermaid-init-script.js";
6
- export { Tabs, default as TabsDefault } from "./tabs.js";
5
+ export { MERMAID_CDN_MODULE_URL, buildMermaidInitScript, } from "./mermaid-init-script.js";
6
+ export { Tabs } from "./tabs.js";
7
7
  export type { TabsProps } from "./tabs.js";
8
- export { TabsInit, default as TabsInitDefault } from "./tabs-init.js";
8
+ export { TabsInit } from "./tabs-init.js";
9
9
  export { TABS_INIT_SCRIPT } from "./tabs-init-script.js";
@@ -1,29 +1,20 @@
1
- import { CodeBlockEnhancer, default as default2 } from "./code-block-enhancer.js";
1
+ import { CodeBlockEnhancer } from "./code-block-enhancer.js";
2
2
  import { CODE_BLOCK_ENHANCER_SCRIPT } from "./code-block-enhancer-script.js";
3
+ import { MermaidInit } from "./mermaid-init.js";
3
4
  import {
4
- MermaidInit,
5
- default as default3
6
- } from "./mermaid-init.js";
7
- import {
8
- MERMAID_INIT_SCRIPT,
9
5
  MERMAID_CDN_MODULE_URL,
10
6
  buildMermaidInitScript
11
7
  } from "./mermaid-init-script.js";
12
- import { Tabs, default as default4 } from "./tabs.js";
13
- import { TabsInit, default as default5 } from "./tabs-init.js";
8
+ import { Tabs } from "./tabs.js";
9
+ import { TabsInit } from "./tabs-init.js";
14
10
  import { TABS_INIT_SCRIPT } from "./tabs-init-script.js";
15
11
  export {
16
12
  CODE_BLOCK_ENHANCER_SCRIPT,
17
13
  CodeBlockEnhancer,
18
- default2 as CodeBlockEnhancerDefault,
19
14
  MERMAID_CDN_MODULE_URL,
20
- MERMAID_INIT_SCRIPT,
21
15
  MermaidInit,
22
- default3 as MermaidInitDefault,
23
16
  TABS_INIT_SCRIPT,
24
17
  Tabs,
25
- default4 as TabsDefault,
26
18
  TabsInit,
27
- default5 as TabsInitDefault,
28
19
  buildMermaidInitScript
29
20
  };
@@ -20,30 +20,9 @@ export declare const MERMAID_CDN_MODULE_URL = "https://esm.sh/mermaid@11.15.0";
20
20
  /**
21
21
  * Build the inline init script with a caller-supplied module URL.
22
22
  *
23
- * Why a builder (vs. just exporting `MERMAID_INIT_SCRIPT`): the
24
- * constant interpolates `MERMAID_CDN_MODULE_URL` at module-load time,
25
- * so reassigning the exported binding has no runtime effect — ESM
26
- * exports are read-only and the script string is already frozen by
27
- * the time consumers see it. Hosts that need a self-hosted /
23
+ * Hosts that need a self-hosted /
28
24
  * version-pinned / CSP-allowlisted mermaid URL call this builder
29
25
  * with their URL and pass the result to `<MermaidInit script={…}/>`
30
26
  * (or to their own `<script dangerouslySetInnerHTML>` site).
31
- *
32
- * The default-URL flow stays available via `MERMAID_INIT_SCRIPT`
33
- * (built once below by calling this builder with
34
- * `MERMAID_CDN_MODULE_URL`) so existing callers keep working
35
- * unchanged.
36
27
  */
37
28
  export declare function buildMermaidInitScript(cdnUrl: string): string;
38
- /**
39
- * Default-URL init script. Built once at module load by passing
40
- * `MERMAID_CDN_MODULE_URL` to `buildMermaidInitScript`. Kept as the
41
- * primary export for backward compatibility — `<MermaidInit/>` (no
42
- * props) and any direct consumer that grabs this string both end up
43
- * importing mermaid from `https://esm.sh/mermaid@11`.
44
- *
45
- * For a custom URL (self-hosted mirror, version-pinned package,
46
- * CSP-allowlisted host) call `buildMermaidInitScript(yourUrl)` and
47
- * pass the result to `<MermaidInit script={…}/>`.
48
- */
49
- export declare const MERMAID_INIT_SCRIPT: string;
@@ -396,9 +396,7 @@ function buildMermaidInitScript(cdnUrl) {
396
396
  });
397
397
  })();`;
398
398
  }
399
- const MERMAID_INIT_SCRIPT = buildMermaidInitScript(MERMAID_CDN_MODULE_URL);
400
399
  export {
401
400
  MERMAID_CDN_MODULE_URL,
402
- MERMAID_INIT_SCRIPT,
403
401
  buildMermaidInitScript
404
402
  };
@@ -42,4 +42,3 @@ export interface MermaidInitProps {
42
42
  * changes the color scheme via the color-tweak panel.
43
43
  */
44
44
  export declare function MermaidInit(props?: MermaidInitProps): JSX.Element;
45
- export default MermaidInit;
@@ -1,14 +1,13 @@
1
1
  import { jsx } from "preact/jsx-runtime";
2
2
  import {
3
- MERMAID_INIT_SCRIPT,
3
+ MERMAID_CDN_MODULE_URL,
4
4
  buildMermaidInitScript
5
5
  } from "./mermaid-init-script.js";
6
+ const MERMAID_INIT_SCRIPT = buildMermaidInitScript(MERMAID_CDN_MODULE_URL);
6
7
  function MermaidInit(props = {}) {
7
8
  const script = props.script ?? (props.cdnUrl ? buildMermaidInitScript(props.cdnUrl) : MERMAID_INIT_SCRIPT);
8
9
  return /* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: script } });
9
10
  }
10
- var mermaid_init_default = MermaidInit;
11
11
  export {
12
- MermaidInit,
13
- mermaid_init_default as default
12
+ MermaidInit
14
13
  };
@@ -18,4 +18,3 @@ import type { JSX } from "preact";
18
18
  * Requires `<Tabs>` to have server-rendered the tab buttons in the DOM.
19
19
  */
20
20
  export declare function TabsInit(): JSX.Element;
21
- export default TabsInit;
@@ -3,8 +3,6 @@ import { TABS_INIT_SCRIPT } from "./tabs-init-script.js";
3
3
  function TabsInit() {
4
4
  return /* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: TABS_INIT_SCRIPT } });
5
5
  }
6
- var tabs_init_default = TabsInit;
7
6
  export {
8
- TabsInit,
9
- tabs_init_default as default
7
+ TabsInit
10
8
  };
@@ -30,4 +30,3 @@ export interface TabsProps {
30
30
  * ```
31
31
  */
32
32
  export declare function Tabs({ groupId, children }: TabsProps): JSX.Element;
33
- export default Tabs;
@@ -55,8 +55,6 @@ function Tabs({ groupId, children }) {
55
55
  }
56
56
  );
57
57
  }
58
- var tabs_default = Tabs;
59
58
  export {
60
- Tabs,
61
- tabs_default as default
59
+ Tabs
62
60
  };