@takazudo/zudo-doc 3.2.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 (439) hide show
  1. package/CHANGELOG.md +61 -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 -4
  14. package/dist/chrome/derive.js +64 -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 +227 -0
  20. package/dist/chrome-bindings.js +6 -0
  21. package/dist/code-syntax/code-block-enhancer-script.d.ts +4 -0
  22. package/dist/code-syntax/code-block-enhancer-script.js +7 -4
  23. package/dist/code-syntax/code-block-enhancer.d.ts +2 -2
  24. package/dist/code-syntax/code-block-enhancer.js +1 -3
  25. package/dist/code-syntax/index.d.ts +5 -5
  26. package/dist/code-syntax/index.js +4 -13
  27. package/dist/code-syntax/mermaid-init-script.d.ts +1 -22
  28. package/dist/code-syntax/mermaid-init-script.js +0 -2
  29. package/dist/code-syntax/mermaid-init.d.ts +0 -1
  30. package/dist/code-syntax/mermaid-init.js +3 -4
  31. package/dist/code-syntax/tabs-init.d.ts +0 -1
  32. package/dist/code-syntax/tabs-init.js +1 -3
  33. package/dist/code-syntax/tabs.d.ts +0 -1
  34. package/dist/code-syntax/tabs.js +1 -3
  35. package/dist/color-scheme-utils.d.ts +72 -4
  36. package/dist/color-scheme-utils.js +137 -0
  37. package/dist/color-schemes-defaults/index.d.ts +23 -0
  38. package/dist/color-schemes-defaults/index.js +134 -0
  39. package/dist/config.d.ts +459 -0
  40. package/dist/config.js +125 -0
  41. package/dist/content/component-map.d.ts +0 -16
  42. package/dist/content/component-map.js +2 -4
  43. package/dist/content/index.d.ts +1 -1
  44. package/dist/content/index.js +2 -3
  45. package/dist/content.css +1 -1
  46. package/dist/design-token-panel-bootstrap.d.ts +82 -27
  47. package/dist/design-token-panel-bootstrap.js +110 -21
  48. package/dist/design-token-panel-config/index.d.ts +49 -0
  49. package/dist/design-token-panel-config/index.js +211 -0
  50. package/dist/design-token-panel-config/manifest.d.ts +46 -0
  51. package/dist/design-token-panel-config/manifest.js +105 -0
  52. package/dist/directive-vocabulary-defaults/index.d.ts +16 -0
  53. package/dist/directive-vocabulary-defaults/index.js +12 -0
  54. package/dist/doc-body-end-islands/design-token-panel-island.d.ts +15 -0
  55. package/dist/doc-body-end-islands/design-token-panel-island.js +31 -0
  56. package/dist/doc-body-end-islands/index.d.ts +52 -7
  57. package/dist/doc-body-end-islands/index.js +19 -0
  58. package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +37 -0
  59. package/dist/doc-body-end-islands/theme-pack-switcher-island.js +18 -0
  60. package/dist/doc-content-header/index.js +1 -1
  61. package/dist/doc-history-area/index.d.ts +10 -4
  62. package/dist/doc-history-area/index.js +3 -2
  63. package/dist/doc-metainfo-area/index.d.ts +1 -0
  64. package/dist/doc-page-props/index.d.ts +7 -23
  65. package/dist/doc-page-renderer/index.d.ts +1 -0
  66. package/dist/doc-page-renderer/index.js +1 -0
  67. package/dist/doc-page-shell/index.js +19 -12
  68. package/dist/doc-pager/index.js +1 -1
  69. package/dist/doc-route-entries/index.d.ts +2 -2
  70. package/dist/doclayout/doc-layout-with-defaults.js +4 -4
  71. package/dist/doclayout/doc-layout.d.ts +8 -0
  72. package/dist/doclayout/doc-layout.js +10 -1
  73. package/dist/docs-schema/index.d.ts +67 -0
  74. package/dist/docs-schema/index.js +43 -0
  75. package/dist/eject/index.d.ts +16 -0
  76. package/dist/eject/index.js +122 -28
  77. package/dist/extract-headings/index.d.ts +5 -8
  78. package/dist/extract-headings/index.js +2 -9
  79. package/dist/factory-context/index.d.ts +56 -4
  80. package/dist/features.css +65 -43
  81. package/dist/find-in-page/find-bar.d.ts +9 -0
  82. package/dist/find-in-page/find-bar.js +114 -0
  83. package/dist/find-in-page/find-in-page.d.ts +17 -0
  84. package/dist/find-in-page/find-in-page.js +131 -0
  85. package/dist/find-in-page/index.d.ts +11 -0
  86. package/dist/find-in-page/index.js +49 -0
  87. package/dist/footer/footer.js +1 -0
  88. package/dist/frontmatter-preview-defaults/index.d.ts +16 -0
  89. package/dist/frontmatter-preview-defaults/index.js +25 -0
  90. package/dist/head-with-defaults/index.d.ts +2 -0
  91. package/dist/head-with-defaults/index.js +16 -0
  92. package/dist/header/header.d.ts +10 -5
  93. package/dist/header/header.js +45 -5
  94. package/dist/header/index.d.ts +1 -1
  95. package/dist/header/types.d.ts +30 -1
  96. package/dist/header-with-defaults/index.js +1 -0
  97. package/dist/home-page/index.d.ts +2 -0
  98. package/dist/home-page/index.js +11 -5
  99. package/dist/home-page/prepare-home-data.js +1 -1
  100. package/dist/i18n-defaults/index.d.ts +22 -0
  101. package/dist/i18n-defaults/index.js +167 -0
  102. package/dist/locale-merge/index.d.ts +9 -14
  103. package/dist/locale-merge/index.js +6 -4
  104. package/dist/mdx-components/index.js +4 -4
  105. package/dist/plugins/claude-resources.d.ts +1 -0
  106. package/dist/plugins/claude-resources.js +4 -2
  107. package/dist/plugins/doc-history.js +1 -1
  108. package/dist/{integrations → plugins/internal}/claude-resources/index.d.ts +1 -16
  109. package/dist/{integrations → plugins/internal}/claude-resources/index.js +0 -9
  110. package/dist/{integrations → plugins/internal}/doc-history/index.d.ts +0 -17
  111. package/dist/{integrations → plugins/internal}/doc-history/index.js +0 -4
  112. package/dist/{integrations → plugins/internal}/doc-history/pre-build.d.ts +2 -4
  113. package/dist/plugins/internal/llms-txt/index.d.ts +7 -0
  114. package/dist/{integrations → plugins/internal}/llms-txt/load.d.ts +1 -1
  115. package/dist/{integrations → plugins/internal}/llms-txt/load.js +2 -2
  116. package/dist/{integrations → plugins/internal}/llms-txt/strip.d.ts +2 -3
  117. package/dist/{integrations → plugins/internal}/llms-txt/strip.js +1 -1
  118. package/dist/{integrations → plugins/internal}/llms-txt/types.d.ts +13 -22
  119. package/dist/{integrations → plugins/internal}/search-index/collect.js +1 -1
  120. package/dist/plugins/internal/theme-packs/copy.d.ts +32 -0
  121. package/dist/plugins/internal/theme-packs/copy.js +45 -0
  122. package/dist/plugins/internal/theme-packs/dev-middleware.d.ts +22 -0
  123. package/dist/plugins/internal/theme-packs/dev-middleware.js +80 -0
  124. package/dist/plugins/internal/theme-packs/index.d.ts +6 -0
  125. package/dist/plugins/internal/theme-packs/index.js +9 -0
  126. package/dist/plugins/internal/theme-packs/resolve.d.ts +17 -0
  127. package/dist/plugins/internal/theme-packs/resolve.js +17 -0
  128. package/dist/plugins/internal/theme-packs/types.d.ts +22 -0
  129. package/dist/plugins/internal/theme-packs/types.js +0 -0
  130. package/dist/plugins/llms-txt.js +1 -1
  131. package/dist/plugins/routes.js +55 -21
  132. package/dist/plugins/search-index.js +1 -1
  133. package/dist/plugins/theme-packs.d.ts +3 -0
  134. package/dist/plugins/theme-packs.js +40 -0
  135. package/dist/preset.d.ts +28 -14
  136. package/dist/preset.js +24 -9
  137. package/dist/route-context/index.js +4 -6
  138. package/dist/route-enumerators/index.d.ts +6 -18
  139. package/dist/route-enumerators/index.js +8 -6
  140. package/dist/routes/404.js +3 -1
  141. package/dist/routes/_chrome.js +3 -2
  142. package/dist/routes/_context.d.ts +7 -3
  143. package/dist/routes/_context.js +2 -0
  144. package/dist/routes/_docs-helpers.js +9 -21
  145. package/dist/safelist.css +1 -1
  146. package/dist/settings.d.ts +64 -12
  147. package/dist/sidebar-tree/build-tree.d.ts +3 -4
  148. package/dist/sidebar-tree/build-tree.js +4 -3
  149. package/dist/sidebar-tree/index.d.ts +2 -2
  150. package/dist/sidebar-tree/types.d.ts +6 -17
  151. package/dist/site-tree-nav-island/index.d.ts +3 -1
  152. package/dist/site-tree-nav-island/index.js +17 -5
  153. package/dist/site-tree-nav-island/state.d.ts +4 -0
  154. package/dist/site-tree-nav-island/state.js +10 -0
  155. package/dist/tag-helpers/index.d.ts +6 -13
  156. package/dist/tag-helpers/index.js +5 -23
  157. package/dist/tag-pages/index.d.ts +8 -21
  158. package/dist/tag-pages/index.js +14 -10
  159. package/dist/tags-audit.d.ts +16 -44
  160. package/dist/tags-audit.js +9 -172
  161. package/dist/theme/color-scheme-provider.d.ts +2 -3
  162. package/dist/theme/color-scheme-provider.js +2 -10
  163. package/dist/theme/index.d.ts +1 -4
  164. package/dist/theme/index.js +2 -30
  165. package/dist/theme/theme-pack-provider.d.ts +42 -0
  166. package/dist/theme/theme-pack-provider.js +75 -0
  167. package/dist/theme-cli/apply.d.ts +16 -0
  168. package/dist/theme-cli/apply.js +61 -0
  169. package/dist/theme-cli/config-io.d.ts +15 -0
  170. package/dist/theme-cli/config-io.js +51 -0
  171. package/dist/theme-cli/config-rewriter.d.ts +21 -0
  172. package/dist/theme-cli/config-rewriter.js +141 -0
  173. package/dist/theme-cli/config-scanner.d.ts +63 -0
  174. package/dist/theme-cli/config-scanner.js +288 -0
  175. package/dist/theme-cli/index.d.ts +7 -0
  176. package/dist/theme-cli/index.js +38 -0
  177. package/dist/theme-cli/list.d.ts +27 -0
  178. package/dist/theme-cli/list.js +64 -0
  179. package/dist/theme-cli/provenance.d.ts +17 -0
  180. package/dist/theme-cli/provenance.js +35 -0
  181. package/dist/theme-cli/registry.d.ts +14 -0
  182. package/dist/theme-cli/registry.js +13 -0
  183. package/dist/theme-pack-dialog/dialog-state.d.ts +25 -0
  184. package/dist/theme-pack-dialog/dialog-state.js +40 -0
  185. package/dist/theme-pack-dialog/index.d.ts +5 -0
  186. package/dist/theme-pack-dialog/index.js +152 -0
  187. package/dist/theme-pack-dialog/theme-pack-card.d.ts +25 -0
  188. package/dist/theme-pack-dialog/theme-pack-card.js +72 -0
  189. package/dist/theme-pack-switcher/index.d.ts +49 -0
  190. package/dist/theme-pack-switcher/index.js +205 -0
  191. package/dist/theme-pack-switcher/switcher-state.d.ts +56 -0
  192. package/dist/theme-pack-switcher/switcher-state.js +43 -0
  193. package/dist/theme-pack-switcher/theme-pack-sync.d.ts +85 -0
  194. package/dist/theme-pack-switcher/theme-pack-sync.js +121 -0
  195. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-400-latin.woff2 +0 -0
  196. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-700-latin.woff2 +0 -0
  197. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-400-latin.woff2 +0 -0
  198. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-700-latin.woff2 +0 -0
  199. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-italic-latin.woff2 +0 -0
  200. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-latin.woff2 +0 -0
  201. package/dist/theme-packs/beacon/fonts/OFL.txt +94 -0
  202. package/dist/theme-packs/beacon/meta.json +37 -0
  203. package/dist/theme-packs/beacon/pack.css +442 -0
  204. package/dist/theme-packs/broadsheet/fonts/CourierPrime-400-latin.woff2 +0 -0
  205. package/dist/theme-packs/broadsheet/fonts/CourierPrime-700-latin.woff2 +0 -0
  206. package/dist/theme-packs/broadsheet/fonts/OFL.txt +95 -0
  207. package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-italic-latin.woff2 +0 -0
  208. package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-latin.woff2 +0 -0
  209. package/dist/theme-packs/broadsheet/fonts/SourceSerif4-italic-latin.woff2 +0 -0
  210. package/dist/theme-packs/broadsheet/fonts/SourceSerif4-latin.woff2 +0 -0
  211. package/dist/theme-packs/broadsheet/meta.json +38 -0
  212. package/dist/theme-packs/broadsheet/pack.css +448 -0
  213. package/dist/theme-packs/brutalist/fonts/ArchivoBlack-latin.woff2 +0 -0
  214. package/dist/theme-packs/brutalist/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  215. package/dist/theme-packs/brutalist/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  216. package/dist/theme-packs/brutalist/fonts/IBMPlexMono-700-latin.woff2 +0 -0
  217. package/dist/theme-packs/brutalist/fonts/OFL.txt +95 -0
  218. package/dist/theme-packs/brutalist/fonts/SpaceGrotesk-latin.woff2 +0 -0
  219. package/dist/theme-packs/brutalist/meta.json +38 -0
  220. package/dist/theme-packs/brutalist/pack.css +546 -0
  221. package/dist/theme-packs/default/meta.json +37 -0
  222. package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  223. package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  224. package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  225. package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  226. package/dist/theme-packs/drift/fonts/IBMPlexSans-italic-latin.woff2 +0 -0
  227. package/dist/theme-packs/drift/fonts/IBMPlexSans-latin-ext.woff2 +0 -0
  228. package/dist/theme-packs/drift/fonts/IBMPlexSans-latin.woff2 +0 -0
  229. package/dist/theme-packs/drift/fonts/OFL.txt +93 -0
  230. package/dist/theme-packs/drift/meta.json +37 -0
  231. package/dist/theme-packs/drift/pack.css +478 -0
  232. package/dist/theme-packs/fjord/fonts/Inter-latin-ext.woff2 +0 -0
  233. package/dist/theme-packs/fjord/fonts/Inter-latin.woff2 +0 -0
  234. package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
  235. package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin.woff2 +0 -0
  236. package/dist/theme-packs/fjord/fonts/OFL.txt +94 -0
  237. package/dist/theme-packs/fjord/meta.json +37 -0
  238. package/dist/theme-packs/fjord/pack.css +375 -0
  239. package/dist/theme-packs/foundry/fonts/Inter-latin-ext.woff2 +0 -0
  240. package/dist/theme-packs/foundry/fonts/Inter-latin.woff2 +0 -0
  241. package/dist/theme-packs/foundry/fonts/OFL.txt +93 -0
  242. package/dist/theme-packs/foundry/meta.json +37 -0
  243. package/dist/theme-packs/foundry/pack.css +202 -0
  244. package/dist/theme-packs/futura-editorial/fonts/Jost-latin.woff2 +0 -0
  245. package/dist/theme-packs/futura-editorial/fonts/NotoSans-italic-latin.woff2 +0 -0
  246. package/dist/theme-packs/futura-editorial/fonts/NotoSans-latin.woff2 +0 -0
  247. package/dist/theme-packs/futura-editorial/fonts/OFL.txt +95 -0
  248. package/dist/theme-packs/futura-editorial/fonts/SpaceMono-400-latin.woff2 +0 -0
  249. package/dist/theme-packs/futura-editorial/fonts/SpaceMono-700-latin.woff2 +0 -0
  250. package/dist/theme-packs/futura-editorial/meta.json +38 -0
  251. package/dist/theme-packs/futura-editorial/pack.css +313 -0
  252. package/dist/theme-packs/hearth/fonts/Fraunces-italic-latin.woff2 +0 -0
  253. package/dist/theme-packs/hearth/fonts/Fraunces-latin.woff2 +0 -0
  254. package/dist/theme-packs/hearth/fonts/Nunito-latin.woff2 +0 -0
  255. package/dist/theme-packs/hearth/fonts/OFL.txt +95 -0
  256. package/dist/theme-packs/hearth/fonts/SplineSansMono-latin.woff2 +0 -0
  257. package/dist/theme-packs/hearth/meta.json +38 -0
  258. package/dist/theme-packs/hearth/pack.css +385 -0
  259. package/dist/theme-packs/hollow/fonts/OFL.txt +94 -0
  260. package/dist/theme-packs/hollow/fonts/SpaceGrotesk-latin.woff2 +0 -0
  261. package/dist/theme-packs/hollow/fonts/SpaceMono-400-italic-latin.woff2 +0 -0
  262. package/dist/theme-packs/hollow/fonts/SpaceMono-400-latin.woff2 +0 -0
  263. package/dist/theme-packs/hollow/fonts/SpaceMono-700-latin.woff2 +0 -0
  264. package/dist/theme-packs/hollow/meta.json +37 -0
  265. package/dist/theme-packs/hollow/pack.css +428 -0
  266. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext-italic.woff2 +0 -0
  267. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext.woff2 +0 -0
  268. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-italic.woff2 +0 -0
  269. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin.woff2 +0 -0
  270. package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  271. package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  272. package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  273. package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  274. package/dist/theme-packs/ledger/fonts/OFL.txt +94 -0
  275. package/dist/theme-packs/ledger/meta.json +37 -0
  276. package/dist/theme-packs/ledger/pack.css +463 -0
  277. package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin-ext.woff2 +0 -0
  278. package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin.woff2 +0 -0
  279. package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin-ext.woff2 +0 -0
  280. package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin.woff2 +0 -0
  281. package/dist/theme-packs/manuscript/fonts/EBGaramond-latin-italic.woff2 +0 -0
  282. package/dist/theme-packs/manuscript/fonts/EBGaramond-latin.woff2 +0 -0
  283. package/dist/theme-packs/manuscript/fonts/OFL.txt +94 -0
  284. package/dist/theme-packs/manuscript/meta.json +37 -0
  285. package/dist/theme-packs/manuscript/pack.css +376 -0
  286. package/dist/theme-packs/matcha/fonts/MPLUS1Code-latin.woff2 +0 -0
  287. package/dist/theme-packs/matcha/fonts/OFL.txt +95 -0
  288. package/dist/theme-packs/matcha/fonts/ShipporiMincho-500-latin.woff2 +0 -0
  289. package/dist/theme-packs/matcha/fonts/ShipporiMincho-700-latin.woff2 +0 -0
  290. package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
  291. package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
  292. package/dist/theme-packs/matcha/meta.json +38 -0
  293. package/dist/theme-packs/matcha/pack.css +409 -0
  294. package/dist/theme-packs/nocturne/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
  295. package/dist/theme-packs/nocturne/fonts/CormorantGaramond-latin.woff2 +0 -0
  296. package/dist/theme-packs/nocturne/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  297. package/dist/theme-packs/nocturne/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  298. package/dist/theme-packs/nocturne/fonts/IBMPlexMono-italic-latin.woff2 +0 -0
  299. package/dist/theme-packs/nocturne/fonts/Manrope-latin.woff2 +0 -0
  300. package/dist/theme-packs/nocturne/fonts/OFL.txt +95 -0
  301. package/dist/theme-packs/nocturne/meta.json +38 -0
  302. package/dist/theme-packs/nocturne/pack.css +502 -0
  303. package/dist/theme-packs/observatory/fonts/JosefinSans-latin.woff2 +0 -0
  304. package/dist/theme-packs/observatory/fonts/Jost-italic-latin.woff2 +0 -0
  305. package/dist/theme-packs/observatory/fonts/Jost-latin.woff2 +0 -0
  306. package/dist/theme-packs/observatory/fonts/OFL.txt +95 -0
  307. package/dist/theme-packs/observatory/fonts/SpaceMono-400-latin.woff2 +0 -0
  308. package/dist/theme-packs/observatory/fonts/SpaceMono-700-latin.woff2 +0 -0
  309. package/dist/theme-packs/observatory/fonts/SpaceMono-italic-latin.woff2 +0 -0
  310. package/dist/theme-packs/observatory/meta.json +38 -0
  311. package/dist/theme-packs/observatory/pack.css +728 -0
  312. package/dist/theme-packs/onyx/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
  313. package/dist/theme-packs/onyx/fonts/CormorantGaramond-latin.woff2 +0 -0
  314. package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  315. package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  316. package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  317. package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  318. package/dist/theme-packs/onyx/fonts/Jost-latin.woff2 +0 -0
  319. package/dist/theme-packs/onyx/fonts/OFL.txt +95 -0
  320. package/dist/theme-packs/onyx/meta.json +38 -0
  321. package/dist/theme-packs/onyx/pack.css +497 -0
  322. package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
  323. package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin.woff2 +0 -0
  324. package/dist/theme-packs/phosphor/fonts/OFL.txt +94 -0
  325. package/dist/theme-packs/phosphor/fonts/VT323-latin-ext.woff2 +0 -0
  326. package/dist/theme-packs/phosphor/fonts/VT323-latin.woff2 +0 -0
  327. package/dist/theme-packs/phosphor/meta.json +38 -0
  328. package/dist/theme-packs/phosphor/pack.css +493 -0
  329. package/dist/theme-packs/solar/fonts/OFL.txt +94 -0
  330. package/dist/theme-packs/solar/fonts/SourceCodePro-italic-latin.woff2 +0 -0
  331. package/dist/theme-packs/solar/fonts/SourceCodePro-latin.woff2 +0 -0
  332. package/dist/theme-packs/solar/fonts/SourceSans3-italic-latin.woff2 +0 -0
  333. package/dist/theme-packs/solar/fonts/SourceSans3-latin.woff2 +0 -0
  334. package/dist/theme-packs/solar/meta.json +37 -0
  335. package/dist/theme-packs/solar/pack.css +380 -0
  336. package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  337. package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  338. package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  339. package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  340. package/dist/theme-packs/sumi/fonts/OFL.txt +95 -0
  341. package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-600-latin.woff2 +0 -0
  342. package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-700-latin.woff2 +0 -0
  343. package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-800-latin.woff2 +0 -0
  344. package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
  345. package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
  346. package/dist/theme-packs/sumi/meta.json +38 -0
  347. package/dist/theme-packs/sumi/pack.css +502 -0
  348. package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  349. package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  350. package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-600-latin.woff2 +0 -0
  351. package/dist/theme-packs/swissgrid/fonts/Inter-latin-ext.woff2 +0 -0
  352. package/dist/theme-packs/swissgrid/fonts/Inter-latin.woff2 +0 -0
  353. package/dist/theme-packs/swissgrid/fonts/InterTight-latin.woff2 +0 -0
  354. package/dist/theme-packs/swissgrid/fonts/OFL.txt +95 -0
  355. package/dist/theme-packs/swissgrid/meta.json +38 -0
  356. package/dist/theme-packs/swissgrid/pack.css +518 -0
  357. package/dist/theme-packs/washi/fonts/MPlus1Code-400-latin.woff2 +0 -0
  358. package/dist/theme-packs/washi/fonts/MPlus1Code-500-latin.woff2 +0 -0
  359. package/dist/theme-packs/washi/fonts/OFL.txt +95 -0
  360. package/dist/theme-packs/washi/fonts/ShipporiMincho-500-latin.woff2 +0 -0
  361. package/dist/theme-packs/washi/fonts/ShipporiMincho-600-latin.woff2 +0 -0
  362. package/dist/theme-packs/washi/fonts/ShipporiMincho-700-latin.woff2 +0 -0
  363. package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
  364. package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
  365. package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-700-latin.woff2 +0 -0
  366. package/dist/theme-packs/washi/meta.json +38 -0
  367. package/dist/theme-packs/washi/pack.css +479 -0
  368. package/dist/theme-packs-registry/index.d.ts +5 -0
  369. package/dist/theme-packs-registry/index.js +30 -0
  370. package/dist/theme-packs-registry/load-registry.d.ts +23 -0
  371. package/dist/theme-packs-registry/load-registry.js +64 -0
  372. package/dist/theme-packs-registry/meta-schema.d.ts +70 -0
  373. package/dist/theme-packs-registry/meta-schema.js +38 -0
  374. package/dist/theme-packs-registry/resolve-enabled-packs.d.ts +25 -0
  375. package/dist/theme-packs-registry/resolve-enabled-packs.js +43 -0
  376. package/dist/theme-packs-registry/token-manifest.d.ts +19 -0
  377. package/dist/theme-packs-registry/token-manifest.js +57 -0
  378. package/dist/theme-packs-registry/validator.d.ts +35 -0
  379. package/dist/theme-packs-registry/validator.js +284 -0
  380. package/dist/theme-toggle/color-scheme-sync.d.ts +2 -4
  381. package/dist/theme.css +319 -0
  382. package/dist/versions-page/index.d.ts +2 -2
  383. package/dist/versions-page/index.js +8 -8
  384. package/dist/z-index-defaults/index.d.ts +45 -0
  385. package/dist/z-index-defaults/index.js +34 -0
  386. package/eject/breadcrumb/breadcrumb.tsx +4 -4
  387. package/eject/breadcrumb/find-path.ts +2 -2
  388. package/eject/breadcrumb/index.ts +1 -1
  389. package/eject/breadcrumb/types.ts +0 -6
  390. package/eject/code-group/index.tsx +2 -2
  391. package/eject/doc-history/index.tsx +1 -1
  392. package/eject/doc-pager/index.tsx +1 -1
  393. package/eject/footer/footer.tsx +1 -0
  394. package/eject/header/header.tsx +86 -21
  395. package/eject/header/index.ts +3 -0
  396. package/eject/header/types.ts +39 -1
  397. package/eject/site-tree-nav-island/index.tsx +15 -3
  398. package/eject/site-tree-nav-island/state.ts +9 -0
  399. package/eject/theme-toggle/color-scheme-sync.ts +2 -4
  400. package/package.json +82 -29
  401. package/routes-src/404.tsx +4 -1
  402. package/routes-src/_chrome.tsx +31 -8
  403. package/routes-src/_context.ts +4 -0
  404. package/routes-src/_docs-helpers.ts +9 -29
  405. package/routes-src/_virtual.d.ts +38 -2
  406. package/tsconfig.base.json +29 -0
  407. package/virtual-modules.d.ts +83 -0
  408. package/zfb-config-shim.d.ts +210 -0
  409. package/dist/integrations/llms-txt/index.d.ts +0 -33
  410. package/dist/theme/color-tweak-export-modal.d.ts +0 -16
  411. package/dist/theme/color-tweak-export-modal.js +0 -138
  412. package/dist/theme/design-token-serde.d.ts +0 -183
  413. package/dist/theme/design-token-serde.js +0 -346
  414. package/dist/theme/design-token-types.d.ts +0 -13
  415. package/dist/theme/design-token-types.js +0 -6
  416. package/dist/theme/iframe-bridge.d.ts +0 -42
  417. package/dist/theme/iframe-bridge.js +0 -72
  418. /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.d.ts +0 -0
  419. /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.js +0 -0
  420. /package/dist/{integrations → plugins/internal}/claude-resources/generate.d.ts +0 -0
  421. /package/dist/{integrations → plugins/internal}/claude-resources/generate.js +0 -0
  422. /package/dist/{integrations → plugins/internal}/doc-history/pre-build.js +0 -0
  423. /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.d.ts +0 -0
  424. /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.js +0 -0
  425. /package/dist/{integrations → plugins/internal}/llms-txt/emit.d.ts +0 -0
  426. /package/dist/{integrations → plugins/internal}/llms-txt/emit.js +0 -0
  427. /package/dist/{integrations → plugins/internal}/llms-txt/generate.d.ts +0 -0
  428. /package/dist/{integrations → plugins/internal}/llms-txt/generate.js +0 -0
  429. /package/dist/{integrations → plugins/internal}/llms-txt/index.js +0 -0
  430. /package/dist/{integrations → plugins/internal}/llms-txt/types.js +0 -0
  431. /package/dist/{integrations → plugins/internal}/search-index/build-emitter.d.ts +0 -0
  432. /package/dist/{integrations → plugins/internal}/search-index/build-emitter.js +0 -0
  433. /package/dist/{integrations → plugins/internal}/search-index/collect.d.ts +0 -0
  434. /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.d.ts +0 -0
  435. /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.js +0 -0
  436. /package/dist/{integrations → plugins/internal}/search-index/index.d.ts +0 -0
  437. /package/dist/{integrations → plugins/internal}/search-index/index.js +0 -0
  438. /package/dist/{integrations → plugins/internal}/search-index/types.d.ts +0 -0
  439. /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,9 +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`. */
51
- 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;
52
64
  /** Derive the DocHistory island: `ctx.hostBindings.DocHistory` when supplied,
53
65
  * else the package no-op stub. */
54
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,6 +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";
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";
9
14
  import { SearchWidget } from "../search-widget/index.js";
10
15
  import { createMdxComponents } from "../mdx-components/index.js";
11
16
  import { createCategoryNavWrapper } from "../category-nav/index.js";
@@ -50,7 +55,8 @@ const DEFAULT_SCHEME = {
50
55
  fg: { base: 0 },
51
56
  selectionBg: { base: 2 },
52
57
  selectionFg: { base: 0 },
53
- semantic: { ...SEMANTIC_RAMP_DEFAULTS }
58
+ semantic: { ...SEMANTIC_RAMP_DEFAULTS },
59
+ syntax: {}
54
60
  }
55
61
  };
56
62
  function DocHistoryStub(_props) {
@@ -64,7 +70,14 @@ function deriveComposeMetaTitle(ctx) {
64
70
  }
65
71
  function resolveHostScheme(ctx, key) {
66
72
  if (!ctx.colorSchemes) return DEFAULT_SCHEME;
67
- return ctx.colorSchemes[key] ?? DEFAULT_SCHEME;
73
+ const scheme = ctx.colorSchemes[key];
74
+ if (!scheme) {
75
+ console.warn(
76
+ `[zudo-doc] color scheme "${key}" not found in the configured colorSchemes \u2014 falling back to the neutral default scheme. Available schemes: ${Object.keys(ctx.colorSchemes).join(", ") || "(none)"}`
77
+ );
78
+ return DEFAULT_SCHEME;
79
+ }
80
+ return scheme;
68
81
  }
69
82
  function deriveColorSchemeGenerators(ctx) {
70
83
  return {
@@ -138,8 +151,55 @@ function deriveSearchWidgetSlot(ctx) {
138
151
  }
139
152
  return ctx.hostBindings.SearchWidget ?? SearchWidgetBound;
140
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
+ }
141
170
  function deriveBodyEndIslands(ctx) {
142
- return ctx.hostBindings.BodyEndIslands ?? createBodyEndIslands({ settings: ctx.settings });
171
+ const designTokenPanelDeps = {
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
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;
143
203
  }
144
204
  function deriveDocHistorySlot(ctx) {
145
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
+ };
@@ -0,0 +1,227 @@
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";
5
+ import type { ChromeHostBindings } from "./factory-context/index.js";
6
+ import type { HeaderRightComponentRegistry } from "./header/types.js";
7
+ /**
8
+ * Props the header passes to the `SearchWidget` slot — the 7 locale-aware
9
+ * strings from `header-with-defaults`'s `<SearchWidget … />` render (via
10
+ * `deriveSearchWidgetSlot`'s `SearchWidgetBound`, `chrome/derive.tsx`). NOTE
11
+ * the package's own `SearchWidget` also takes `base`, but the chrome binds that
12
+ * internally — a host-supplied widget is called with these 7 props ONLY, so
13
+ * requiring `base` here would (correctly) be drift.
14
+ */
15
+ export interface SearchWidgetSlotProps {
16
+ placeholderText: string;
17
+ shortcutHint: string;
18
+ resultCountTemplate: string;
19
+ searchLabel: string;
20
+ searchUnavailableText: string;
21
+ loadingIndexText: string;
22
+ noResultsText: string;
23
+ }
24
+ /**
25
+ * Props the chrome passes to the `BodyEndIslands` slot — matches
26
+ * `BodyEndIslandsProps` (`doc-body-end-islands`); called as
27
+ * `<BodyEndIslands basePath={…} />` in `home-page` / `doc-body-end`.
28
+ */
29
+ export interface BodyEndIslandsSlotProps {
30
+ basePath: string;
31
+ aiChatBodyLabel?: string;
32
+ }
33
+ /**
34
+ * Props the chrome passes to the `DocHistory` island slot — matches
35
+ * `DocHistoryProps` (`doc-history/index.tsx`) / `DocHistoryComponent`
36
+ * (`doc-history-area`), rendered as
37
+ * `<DocHistory slug=… locale=… basePath=… />`.
38
+ */
39
+ export interface DocHistorySlotProps {
40
+ slug: string;
41
+ locale?: string;
42
+ basePath?: string;
43
+ }
44
+ /**
45
+ * Props the chrome passes to the `DesignTokenPanelBootstrap` slot — NONE. It is
46
+ * rendered as `<DesignTokenPanelBootstrap />` (zero props) inside
47
+ * `createBodyEndIslands`. An empty object type (no index signature) so a
48
+ * zero-prop or all-optional-prop component is accepted while a component that
49
+ * REQUIRES any prop is drift.
50
+ */
51
+ export type DesignTokenPanelBootstrapSlotProps = Record<never, never>;
52
+ /**
53
+ * One footer tag entry the `loadTagsForLocale` result is read for —
54
+ * `footer-with-defaults` maps over the array reading `{ tag, count }`. The
55
+ * return contract is a `readonly` array of these (extra per-entry fields, e.g.
56
+ * the `docs` on `collectTags`' `TagInfo`, are allowed — a supertype element).
57
+ */
58
+ export interface FooterTagEntry {
59
+ tag: string;
60
+ count: number;
61
+ }
62
+ /**
63
+ * Props the chrome passes to each `frontmatterRenderers[key]` renderer —
64
+ * mirrors `FrontmatterCellRendererProps` at the real call site
65
+ * (`metainfo/frontmatter-preview.tsx`: `rendererFn({ value, entryKey, data,
66
+ * locale })`). A provided renderer's parameter must be a SUPERTYPE of this (it
67
+ * may read a subset), so a renderer REQUIRING a prop the chrome never passes is
68
+ * a compile error — the #2674 drift check this slot would otherwise erase.
69
+ */
70
+ export interface FrontmatterRendererSlotProps {
71
+ value: NonNullable<unknown>;
72
+ entryKey: string;
73
+ data: Record<string, unknown>;
74
+ locale?: string;
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
+ }
122
+ /**
123
+ * The compile-time-checked input for {@link defineChromeBindings}. See the
124
+ * module header for the drift-detection rationale.
125
+ */
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;
139
+ /** Header search widget — see {@link SearchWidgetSlotProps}. */
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;
146
+ /** Body-end bootstrap islands — see {@link BodyEndIslandsSlotProps}. */
147
+ BodyEndIslands?: (props: BodyEndIslandsSlotProps) => unknown;
148
+ /** DocHistory island — see {@link DocHistorySlotProps}. */
149
+ DocHistory?: (props: DocHistorySlotProps) => unknown;
150
+ /** Design-token-panel bootstrap island — see {@link DesignTokenPanelBootstrapSlotProps}. */
151
+ DesignTokenPanelBootstrap?: (props: DesignTokenPanelBootstrapSlotProps) => unknown;
152
+ /**
153
+ * Per-page git-history meta manifest (data slot). Read as
154
+ * `Record<string, DocHistoryMetaEntry>` inside `doc-metainfo-area` /
155
+ * `doc-history-area`; the loose `Record<string, unknown>` is the boundary shape.
156
+ */
157
+ docHistoryMeta?: Record<string, unknown>;
158
+ /**
159
+ * Sidebar section config (opaque data blob — the chrome casts it to `never`
160
+ * before handing it to `buildSidebarForSection`). Typed `object` NOT
161
+ * `Record<string, unknown>` on purpose: a concrete interface-typed sidebars
162
+ * object (no index signature) must be accepted WITHOUT a cast.
163
+ */
164
+ sidebarsConfig?: object;
165
+ /** Footer tag vocabulary (data slot); read structurally by `footer-with-defaults`. */
166
+ tagVocabulary?: readonly unknown[];
167
+ /**
168
+ * Frontmatter preview renderers keyed by field (renderer record). Each value
169
+ * must be callable with {@link FrontmatterRendererSlotProps} (the fixed
170
+ * package call-side contract), so a non-function or a renderer requiring an
171
+ * unpassed prop is a compile error. Narrow-props renderers still work
172
+ * (parameter contravariance). Unlike `mdxExtras`, this slot has a fixed call
173
+ * site, so it carries the real contract rather than a loose `Record`.
174
+ */
175
+ frontmatterRenderers?: Record<string, (props: FrontmatterRendererSlotProps) => unknown>;
176
+ /**
177
+ * MDX content-component overrides (renderer record). Same loose value type as
178
+ * `frontmatterRenderers`; the showcase's `MdxStub = (_props: unknown) => null`
179
+ * is accepted deliberately (`unknown` props are a safe supertype).
180
+ */
181
+ mdxExtras?: Record<string, unknown>;
182
+ /**
183
+ * Frontmatter preview entry builder. `doc-content-header` calls it with the
184
+ * page `data` (`Record<string, unknown>`) and spreads the result into
185
+ * `<FrontmatterPreview entries={…} />`, which destructures each entry as
186
+ * `[key, value]` — so the return must be an array of `[string, unknown]`
187
+ * tuples, not merely an array.
188
+ */
189
+ buildFrontmatterPreviewEntries?: (data: Record<string, unknown>) => readonly (readonly [string, unknown])[];
190
+ /**
191
+ * Footer tag-list loader. `footer-with-defaults` calls it with the locale and
192
+ * maps the result reading `{ tag, count }` — see {@link FooterTagEntry}.
193
+ * A wrong return type (e.g. a non-array) is a compile error.
194
+ */
195
+ loadTagsForLocale?: (lang: string) => readonly FooterTagEntry[];
196
+ /**
197
+ * Extra content rendered inside the doc content header. An arg-object
198
+ * RENDERER — the `ChromeHostBindings` type is already call-side-precise, so
199
+ * reuse it verbatim (no widening friction).
200
+ */
201
+ docContentHeaderExtras?: ChromeHostBindings["docContentHeaderExtras"];
202
+ /**
203
+ * Extra content rendered in the home hero. An arg-object RENDERER — reuse the
204
+ * already call-side-precise `ChromeHostBindings` type verbatim.
205
+ */
206
+ homeExtras?: ChromeHostBindings["homeExtras"];
207
+ }
208
+ /**
209
+ * Reject unknown slot names. Generic inference (below) turns OFF the
210
+ * excess-property check that a plain `input: ChromeBindingsInput` parameter
211
+ * would get for an object literal, so re-impose it explicitly: any key of `T`
212
+ * that is NOT a `ChromeBindingsInput` slot is mapped to `never`, making a real
213
+ * value for it fail to assign.
214
+ */
215
+ type NoExtraKeys<T> = ChromeBindingsInput & Record<Exclude<keyof T, keyof ChromeBindingsInput>, never>;
216
+ /**
217
+ * Widen a compile-time-checked host bindings object to `ChromeHostBindings`.
218
+ *
219
+ * The generic `T` captures the caller's exact object so {@link NoExtraKeys}
220
+ * can reject unknown slot names; `T extends ChromeBindingsInput` enforces every
221
+ * slot's per-call-site contract (a component requiring a prop the chrome never
222
+ * passes, or a function slot with an incompatible return type, is a COMPILE
223
+ * ERROR). Runtime behaviour is pure PASS-THROUGH — the returned object IS the
224
+ * input.
225
+ */
226
+ export declare function defineChromeBindings<T extends ChromeBindingsInput>(input: T & NoExtraKeys<T>): ChromeHostBindings;
227
+ export {};
@@ -0,0 +1,6 @@
1
+ function defineChromeBindings(input) {
2
+ return input;
3
+ }
4
+ export {
5
+ defineChromeBindings
6
+ };
@@ -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
  };