@takazudo/zudo-doc 3.3.0 → 4.1.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 (423) hide show
  1. package/CHANGELOG.md +51 -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/component-tokens.d.ts +1 -1
  38. package/dist/config/component-tokens.js +104 -5
  39. package/dist/config.d.ts +28 -12
  40. package/dist/config.js +11 -2
  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 +45 -40
  47. package/dist/design-token-panel-bootstrap.js +98 -21
  48. package/dist/design-token-panel-config/index.js +1 -4
  49. package/dist/doc-body-end-islands/design-token-panel-island.d.ts +15 -0
  50. package/dist/doc-body-end-islands/design-token-panel-island.js +31 -0
  51. package/dist/doc-body-end-islands/index.d.ts +39 -17
  52. package/dist/doc-body-end-islands/index.js +13 -21
  53. package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +37 -0
  54. package/dist/doc-body-end-islands/theme-pack-switcher-island.js +18 -0
  55. package/dist/doc-content-header/index.js +1 -1
  56. package/dist/doc-history-area/index.d.ts +10 -4
  57. package/dist/doc-history-area/index.js +3 -2
  58. package/dist/doc-metainfo-area/index.d.ts +1 -0
  59. package/dist/doc-page-props/index.d.ts +7 -23
  60. package/dist/doc-page-renderer/index.d.ts +1 -0
  61. package/dist/doc-page-renderer/index.js +1 -0
  62. package/dist/doc-page-shell/index.js +19 -12
  63. package/dist/doc-pager/index.js +1 -1
  64. package/dist/doc-route-entries/index.d.ts +2 -2
  65. package/dist/doclayout/doc-layout-with-defaults.js +4 -4
  66. package/dist/doclayout/doc-layout.d.ts +8 -0
  67. package/dist/doclayout/doc-layout.js +10 -1
  68. package/dist/docs-schema/index.js +1 -5
  69. package/dist/eject/index.d.ts +16 -0
  70. package/dist/eject/index.js +122 -28
  71. package/dist/extract-headings/index.d.ts +5 -8
  72. package/dist/extract-headings/index.js +2 -9
  73. package/dist/factory-context/index.d.ts +42 -4
  74. package/dist/features.css +80 -45
  75. package/dist/footer/footer.js +1 -0
  76. package/dist/head-with-defaults/index.d.ts +2 -0
  77. package/dist/head-with-defaults/index.js +16 -0
  78. package/dist/header/header.d.ts +10 -5
  79. package/dist/header/header.js +45 -5
  80. package/dist/header/index.d.ts +1 -1
  81. package/dist/header/types.d.ts +30 -1
  82. package/dist/header-with-defaults/index.js +1 -0
  83. package/dist/home-page/index.d.ts +2 -0
  84. package/dist/home-page/index.js +11 -5
  85. package/dist/home-page/prepare-home-data.js +1 -1
  86. package/dist/locale-merge/index.d.ts +9 -14
  87. package/dist/locale-merge/index.js +6 -4
  88. package/dist/mdx-components/index.js +4 -4
  89. package/dist/plugins/claude-resources.d.ts +1 -0
  90. package/dist/plugins/claude-resources.js +4 -2
  91. package/dist/plugins/doc-history.js +1 -1
  92. package/dist/{integrations → plugins/internal}/claude-resources/index.d.ts +1 -16
  93. package/dist/{integrations → plugins/internal}/claude-resources/index.js +0 -9
  94. package/dist/{integrations → plugins/internal}/doc-history/index.d.ts +0 -17
  95. package/dist/{integrations → plugins/internal}/doc-history/index.js +0 -4
  96. package/dist/{integrations → plugins/internal}/doc-history/pre-build.d.ts +2 -4
  97. package/dist/plugins/internal/llms-txt/index.d.ts +7 -0
  98. package/dist/{integrations → plugins/internal}/llms-txt/load.d.ts +1 -1
  99. package/dist/{integrations → plugins/internal}/llms-txt/load.js +2 -2
  100. package/dist/{integrations → plugins/internal}/llms-txt/strip.d.ts +2 -3
  101. package/dist/{integrations → plugins/internal}/llms-txt/strip.js +1 -1
  102. package/dist/{integrations → plugins/internal}/llms-txt/types.d.ts +13 -22
  103. package/dist/{integrations → plugins/internal}/search-index/collect.js +1 -1
  104. package/dist/plugins/internal/theme-packs/copy.d.ts +32 -0
  105. package/dist/plugins/internal/theme-packs/copy.js +45 -0
  106. package/dist/plugins/internal/theme-packs/dev-middleware.d.ts +22 -0
  107. package/dist/plugins/internal/theme-packs/dev-middleware.js +80 -0
  108. package/dist/plugins/internal/theme-packs/index.d.ts +6 -0
  109. package/dist/plugins/internal/theme-packs/index.js +9 -0
  110. package/dist/plugins/internal/theme-packs/resolve.d.ts +17 -0
  111. package/dist/plugins/internal/theme-packs/resolve.js +17 -0
  112. package/dist/plugins/internal/theme-packs/types.d.ts +22 -0
  113. package/dist/plugins/internal/theme-packs/types.js +0 -0
  114. package/dist/plugins/llms-txt.js +1 -1
  115. package/dist/plugins/routes.js +11 -1
  116. package/dist/plugins/search-index.js +1 -1
  117. package/dist/plugins/theme-packs.d.ts +3 -0
  118. package/dist/plugins/theme-packs.js +40 -0
  119. package/dist/preset.d.ts +19 -14
  120. package/dist/preset.js +24 -9
  121. package/dist/route-context/index.js +4 -6
  122. package/dist/route-enumerators/index.d.ts +6 -18
  123. package/dist/route-enumerators/index.js +8 -6
  124. package/dist/routes/404.js +3 -1
  125. package/dist/routes/_chrome.js +2 -2
  126. package/dist/routes/_context.d.ts +7 -3
  127. package/dist/routes/_context.js +2 -0
  128. package/dist/routes/_docs-helpers.js +9 -21
  129. package/dist/safelist.css +1 -1
  130. package/dist/settings.d.ts +27 -12
  131. package/dist/sidebar-toggle-island/index.js +1 -0
  132. package/dist/sidebar-tree/build-tree.d.ts +3 -4
  133. package/dist/sidebar-tree/build-tree.js +4 -3
  134. package/dist/sidebar-tree/index.d.ts +2 -2
  135. package/dist/sidebar-tree/types.d.ts +6 -17
  136. package/dist/site-tree-nav-island/index.d.ts +3 -1
  137. package/dist/site-tree-nav-island/index.js +17 -5
  138. package/dist/site-tree-nav-island/state.d.ts +4 -0
  139. package/dist/site-tree-nav-island/state.js +10 -0
  140. package/dist/tag-helpers/index.d.ts +6 -13
  141. package/dist/tag-helpers/index.js +5 -23
  142. package/dist/tag-pages/index.d.ts +8 -21
  143. package/dist/tag-pages/index.js +14 -10
  144. package/dist/tags-audit.d.ts +16 -44
  145. package/dist/tags-audit.js +9 -172
  146. package/dist/theme/color-scheme-provider.d.ts +2 -3
  147. package/dist/theme/color-scheme-provider.js +2 -10
  148. package/dist/theme/index.d.ts +1 -4
  149. package/dist/theme/index.js +2 -30
  150. package/dist/theme/theme-pack-provider.d.ts +42 -0
  151. package/dist/theme/theme-pack-provider.js +75 -0
  152. package/dist/theme-cli/apply.d.ts +16 -0
  153. package/dist/theme-cli/apply.js +61 -0
  154. package/dist/theme-cli/config-io.d.ts +15 -0
  155. package/dist/theme-cli/config-io.js +51 -0
  156. package/dist/theme-cli/config-rewriter.d.ts +21 -0
  157. package/dist/theme-cli/config-rewriter.js +141 -0
  158. package/dist/theme-cli/config-scanner.d.ts +63 -0
  159. package/dist/theme-cli/config-scanner.js +288 -0
  160. package/dist/theme-cli/index.d.ts +7 -0
  161. package/dist/theme-cli/index.js +38 -0
  162. package/dist/theme-cli/list.d.ts +27 -0
  163. package/dist/theme-cli/list.js +64 -0
  164. package/dist/theme-cli/provenance.d.ts +17 -0
  165. package/dist/theme-cli/provenance.js +35 -0
  166. package/dist/theme-cli/registry.d.ts +14 -0
  167. package/dist/theme-cli/registry.js +13 -0
  168. package/dist/theme-pack-dialog/dialog-state.d.ts +25 -0
  169. package/dist/theme-pack-dialog/dialog-state.js +40 -0
  170. package/dist/theme-pack-dialog/index.d.ts +5 -0
  171. package/dist/theme-pack-dialog/index.js +152 -0
  172. package/dist/theme-pack-dialog/theme-pack-card.d.ts +25 -0
  173. package/dist/theme-pack-dialog/theme-pack-card.js +72 -0
  174. package/dist/theme-pack-switcher/index.d.ts +49 -0
  175. package/dist/theme-pack-switcher/index.js +205 -0
  176. package/dist/theme-pack-switcher/switcher-state.d.ts +56 -0
  177. package/dist/theme-pack-switcher/switcher-state.js +43 -0
  178. package/dist/theme-pack-switcher/theme-pack-sync.d.ts +85 -0
  179. package/dist/theme-pack-switcher/theme-pack-sync.js +121 -0
  180. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-400-latin.woff2 +0 -0
  181. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-700-latin.woff2 +0 -0
  182. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-400-latin.woff2 +0 -0
  183. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-700-latin.woff2 +0 -0
  184. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-italic-latin.woff2 +0 -0
  185. package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-latin.woff2 +0 -0
  186. package/dist/theme-packs/beacon/fonts/OFL.txt +94 -0
  187. package/dist/theme-packs/beacon/meta.json +37 -0
  188. package/dist/theme-packs/beacon/pack.css +442 -0
  189. package/dist/theme-packs/broadsheet/fonts/CourierPrime-400-latin.woff2 +0 -0
  190. package/dist/theme-packs/broadsheet/fonts/CourierPrime-700-latin.woff2 +0 -0
  191. package/dist/theme-packs/broadsheet/fonts/OFL.txt +95 -0
  192. package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-italic-latin.woff2 +0 -0
  193. package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-latin.woff2 +0 -0
  194. package/dist/theme-packs/broadsheet/fonts/SourceSerif4-italic-latin.woff2 +0 -0
  195. package/dist/theme-packs/broadsheet/fonts/SourceSerif4-latin.woff2 +0 -0
  196. package/dist/theme-packs/broadsheet/meta.json +38 -0
  197. package/dist/theme-packs/broadsheet/pack.css +448 -0
  198. package/dist/theme-packs/brutalist/fonts/ArchivoBlack-latin.woff2 +0 -0
  199. package/dist/theme-packs/brutalist/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  200. package/dist/theme-packs/brutalist/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  201. package/dist/theme-packs/brutalist/fonts/IBMPlexMono-700-latin.woff2 +0 -0
  202. package/dist/theme-packs/brutalist/fonts/OFL.txt +95 -0
  203. package/dist/theme-packs/brutalist/fonts/SpaceGrotesk-latin.woff2 +0 -0
  204. package/dist/theme-packs/brutalist/meta.json +38 -0
  205. package/dist/theme-packs/brutalist/pack.css +546 -0
  206. package/dist/theme-packs/default/meta.json +37 -0
  207. package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  208. package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  209. package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  210. package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  211. package/dist/theme-packs/drift/fonts/IBMPlexSans-italic-latin.woff2 +0 -0
  212. package/dist/theme-packs/drift/fonts/IBMPlexSans-latin-ext.woff2 +0 -0
  213. package/dist/theme-packs/drift/fonts/IBMPlexSans-latin.woff2 +0 -0
  214. package/dist/theme-packs/drift/fonts/OFL.txt +93 -0
  215. package/dist/theme-packs/drift/meta.json +37 -0
  216. package/dist/theme-packs/drift/pack.css +478 -0
  217. package/dist/theme-packs/fjord/fonts/Inter-latin-ext.woff2 +0 -0
  218. package/dist/theme-packs/fjord/fonts/Inter-latin.woff2 +0 -0
  219. package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
  220. package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin.woff2 +0 -0
  221. package/dist/theme-packs/fjord/fonts/OFL.txt +94 -0
  222. package/dist/theme-packs/fjord/meta.json +37 -0
  223. package/dist/theme-packs/fjord/pack.css +375 -0
  224. package/dist/theme-packs/foundry/fonts/Inter-latin-ext.woff2 +0 -0
  225. package/dist/theme-packs/foundry/fonts/Inter-latin.woff2 +0 -0
  226. package/dist/theme-packs/foundry/fonts/OFL.txt +93 -0
  227. package/dist/theme-packs/foundry/meta.json +37 -0
  228. package/dist/theme-packs/foundry/pack.css +202 -0
  229. package/dist/theme-packs/futura-editorial/fonts/Jost-latin.woff2 +0 -0
  230. package/dist/theme-packs/futura-editorial/fonts/NotoSans-italic-latin.woff2 +0 -0
  231. package/dist/theme-packs/futura-editorial/fonts/NotoSans-latin.woff2 +0 -0
  232. package/dist/theme-packs/futura-editorial/fonts/OFL.txt +95 -0
  233. package/dist/theme-packs/futura-editorial/fonts/SpaceMono-400-latin.woff2 +0 -0
  234. package/dist/theme-packs/futura-editorial/fonts/SpaceMono-700-latin.woff2 +0 -0
  235. package/dist/theme-packs/futura-editorial/meta.json +38 -0
  236. package/dist/theme-packs/futura-editorial/pack.css +313 -0
  237. package/dist/theme-packs/hearth/fonts/Fraunces-italic-latin.woff2 +0 -0
  238. package/dist/theme-packs/hearth/fonts/Fraunces-latin.woff2 +0 -0
  239. package/dist/theme-packs/hearth/fonts/Nunito-latin.woff2 +0 -0
  240. package/dist/theme-packs/hearth/fonts/OFL.txt +95 -0
  241. package/dist/theme-packs/hearth/fonts/SplineSansMono-latin.woff2 +0 -0
  242. package/dist/theme-packs/hearth/meta.json +38 -0
  243. package/dist/theme-packs/hearth/pack.css +385 -0
  244. package/dist/theme-packs/hollow/fonts/OFL.txt +94 -0
  245. package/dist/theme-packs/hollow/fonts/SpaceGrotesk-latin.woff2 +0 -0
  246. package/dist/theme-packs/hollow/fonts/SpaceMono-400-italic-latin.woff2 +0 -0
  247. package/dist/theme-packs/hollow/fonts/SpaceMono-400-latin.woff2 +0 -0
  248. package/dist/theme-packs/hollow/fonts/SpaceMono-700-latin.woff2 +0 -0
  249. package/dist/theme-packs/hollow/meta.json +37 -0
  250. package/dist/theme-packs/hollow/pack.css +428 -0
  251. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext-italic.woff2 +0 -0
  252. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext.woff2 +0 -0
  253. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-italic.woff2 +0 -0
  254. package/dist/theme-packs/ledger/fonts/CrimsonPro-latin.woff2 +0 -0
  255. package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  256. package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  257. package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  258. package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  259. package/dist/theme-packs/ledger/fonts/OFL.txt +94 -0
  260. package/dist/theme-packs/ledger/meta.json +37 -0
  261. package/dist/theme-packs/ledger/pack.css +463 -0
  262. package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin-ext.woff2 +0 -0
  263. package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin.woff2 +0 -0
  264. package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin-ext.woff2 +0 -0
  265. package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin.woff2 +0 -0
  266. package/dist/theme-packs/manuscript/fonts/EBGaramond-latin-italic.woff2 +0 -0
  267. package/dist/theme-packs/manuscript/fonts/EBGaramond-latin.woff2 +0 -0
  268. package/dist/theme-packs/manuscript/fonts/OFL.txt +94 -0
  269. package/dist/theme-packs/manuscript/meta.json +37 -0
  270. package/dist/theme-packs/manuscript/pack.css +376 -0
  271. package/dist/theme-packs/matcha/fonts/MPLUS1Code-latin.woff2 +0 -0
  272. package/dist/theme-packs/matcha/fonts/OFL.txt +95 -0
  273. package/dist/theme-packs/matcha/fonts/ShipporiMincho-500-latin.woff2 +0 -0
  274. package/dist/theme-packs/matcha/fonts/ShipporiMincho-700-latin.woff2 +0 -0
  275. package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
  276. package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
  277. package/dist/theme-packs/matcha/meta.json +38 -0
  278. package/dist/theme-packs/matcha/pack.css +409 -0
  279. package/dist/theme-packs/nocturne/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
  280. package/dist/theme-packs/nocturne/fonts/CormorantGaramond-latin.woff2 +0 -0
  281. package/dist/theme-packs/nocturne/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  282. package/dist/theme-packs/nocturne/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  283. package/dist/theme-packs/nocturne/fonts/IBMPlexMono-italic-latin.woff2 +0 -0
  284. package/dist/theme-packs/nocturne/fonts/Manrope-latin.woff2 +0 -0
  285. package/dist/theme-packs/nocturne/fonts/OFL.txt +95 -0
  286. package/dist/theme-packs/nocturne/meta.json +38 -0
  287. package/dist/theme-packs/nocturne/pack.css +502 -0
  288. package/dist/theme-packs/observatory/fonts/JosefinSans-latin.woff2 +0 -0
  289. package/dist/theme-packs/observatory/fonts/Jost-italic-latin.woff2 +0 -0
  290. package/dist/theme-packs/observatory/fonts/Jost-latin.woff2 +0 -0
  291. package/dist/theme-packs/observatory/fonts/OFL.txt +95 -0
  292. package/dist/theme-packs/observatory/fonts/SpaceMono-400-latin.woff2 +0 -0
  293. package/dist/theme-packs/observatory/fonts/SpaceMono-700-latin.woff2 +0 -0
  294. package/dist/theme-packs/observatory/fonts/SpaceMono-italic-latin.woff2 +0 -0
  295. package/dist/theme-packs/observatory/meta.json +38 -0
  296. package/dist/theme-packs/observatory/pack.css +728 -0
  297. package/dist/theme-packs/onyx/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
  298. package/dist/theme-packs/onyx/fonts/CormorantGaramond-latin.woff2 +0 -0
  299. package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  300. package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  301. package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  302. package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  303. package/dist/theme-packs/onyx/fonts/Jost-latin.woff2 +0 -0
  304. package/dist/theme-packs/onyx/fonts/OFL.txt +95 -0
  305. package/dist/theme-packs/onyx/meta.json +38 -0
  306. package/dist/theme-packs/onyx/pack.css +497 -0
  307. package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
  308. package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin.woff2 +0 -0
  309. package/dist/theme-packs/phosphor/fonts/OFL.txt +94 -0
  310. package/dist/theme-packs/phosphor/fonts/VT323-latin-ext.woff2 +0 -0
  311. package/dist/theme-packs/phosphor/fonts/VT323-latin.woff2 +0 -0
  312. package/dist/theme-packs/phosphor/meta.json +38 -0
  313. package/dist/theme-packs/phosphor/pack.css +493 -0
  314. package/dist/theme-packs/solar/fonts/OFL.txt +94 -0
  315. package/dist/theme-packs/solar/fonts/SourceCodePro-italic-latin.woff2 +0 -0
  316. package/dist/theme-packs/solar/fonts/SourceCodePro-latin.woff2 +0 -0
  317. package/dist/theme-packs/solar/fonts/SourceSans3-italic-latin.woff2 +0 -0
  318. package/dist/theme-packs/solar/fonts/SourceSans3-latin.woff2 +0 -0
  319. package/dist/theme-packs/solar/meta.json +37 -0
  320. package/dist/theme-packs/solar/pack.css +380 -0
  321. package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  322. package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  323. package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
  324. package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin.woff2 +0 -0
  325. package/dist/theme-packs/sumi/fonts/OFL.txt +95 -0
  326. package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-600-latin.woff2 +0 -0
  327. package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-700-latin.woff2 +0 -0
  328. package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-800-latin.woff2 +0 -0
  329. package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
  330. package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
  331. package/dist/theme-packs/sumi/meta.json +38 -0
  332. package/dist/theme-packs/sumi/pack.css +502 -0
  333. package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
  334. package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin.woff2 +0 -0
  335. package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-600-latin.woff2 +0 -0
  336. package/dist/theme-packs/swissgrid/fonts/Inter-latin-ext.woff2 +0 -0
  337. package/dist/theme-packs/swissgrid/fonts/Inter-latin.woff2 +0 -0
  338. package/dist/theme-packs/swissgrid/fonts/InterTight-latin.woff2 +0 -0
  339. package/dist/theme-packs/swissgrid/fonts/OFL.txt +95 -0
  340. package/dist/theme-packs/swissgrid/meta.json +38 -0
  341. package/dist/theme-packs/swissgrid/pack.css +518 -0
  342. package/dist/theme-packs/washi/fonts/MPlus1Code-400-latin.woff2 +0 -0
  343. package/dist/theme-packs/washi/fonts/MPlus1Code-500-latin.woff2 +0 -0
  344. package/dist/theme-packs/washi/fonts/OFL.txt +95 -0
  345. package/dist/theme-packs/washi/fonts/ShipporiMincho-500-latin.woff2 +0 -0
  346. package/dist/theme-packs/washi/fonts/ShipporiMincho-600-latin.woff2 +0 -0
  347. package/dist/theme-packs/washi/fonts/ShipporiMincho-700-latin.woff2 +0 -0
  348. package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
  349. package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
  350. package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-700-latin.woff2 +0 -0
  351. package/dist/theme-packs/washi/meta.json +38 -0
  352. package/dist/theme-packs/washi/pack.css +479 -0
  353. package/dist/theme-packs-registry/index.d.ts +5 -0
  354. package/dist/theme-packs-registry/index.js +30 -0
  355. package/dist/theme-packs-registry/load-registry.d.ts +23 -0
  356. package/dist/theme-packs-registry/load-registry.js +64 -0
  357. package/dist/theme-packs-registry/meta-schema.d.ts +70 -0
  358. package/dist/theme-packs-registry/meta-schema.js +38 -0
  359. package/dist/theme-packs-registry/resolve-enabled-packs.d.ts +25 -0
  360. package/dist/theme-packs-registry/resolve-enabled-packs.js +43 -0
  361. package/dist/theme-packs-registry/token-manifest.d.ts +19 -0
  362. package/dist/theme-packs-registry/token-manifest.js +57 -0
  363. package/dist/theme-packs-registry/validator.d.ts +35 -0
  364. package/dist/theme-packs-registry/validator.js +284 -0
  365. package/dist/theme-toggle/color-scheme-sync.d.ts +2 -4
  366. package/dist/toc/mobile-toc.js +1 -1
  367. package/dist/versions-page/index.d.ts +2 -2
  368. package/dist/versions-page/index.js +8 -8
  369. package/eject/breadcrumb/breadcrumb.tsx +4 -4
  370. package/eject/breadcrumb/find-path.ts +2 -2
  371. package/eject/breadcrumb/index.ts +1 -1
  372. package/eject/breadcrumb/types.ts +0 -6
  373. package/eject/code-group/index.tsx +2 -2
  374. package/eject/doc-history/index.tsx +1 -1
  375. package/eject/doc-pager/index.tsx +1 -1
  376. package/eject/footer/footer.tsx +1 -0
  377. package/eject/header/header.tsx +86 -21
  378. package/eject/header/index.ts +3 -0
  379. package/eject/header/types.ts +39 -1
  380. package/eject/sidebar-toggle-island/index.tsx +7 -1
  381. package/eject/site-tree-nav-island/index.tsx +15 -3
  382. package/eject/site-tree-nav-island/state.ts +9 -0
  383. package/eject/theme-toggle/color-scheme-sync.ts +2 -4
  384. package/eject/toc/mobile-toc.tsx +9 -1
  385. package/package.json +35 -29
  386. package/routes-src/404.tsx +4 -1
  387. package/routes-src/_chrome.tsx +6 -5
  388. package/routes-src/_context.ts +4 -0
  389. package/routes-src/_docs-helpers.ts +9 -29
  390. package/routes-src/_virtual.d.ts +4 -0
  391. package/virtual-modules.d.ts +4 -0
  392. package/zfb-config-shim.d.ts +40 -18
  393. package/dist/integrations/llms-txt/index.d.ts +0 -33
  394. package/dist/theme/color-tweak-export-modal.d.ts +0 -16
  395. package/dist/theme/color-tweak-export-modal.js +0 -138
  396. package/dist/theme/design-token-serde.d.ts +0 -183
  397. package/dist/theme/design-token-serde.js +0 -346
  398. package/dist/theme/design-token-types.d.ts +0 -13
  399. package/dist/theme/design-token-types.js +0 -6
  400. package/dist/theme/iframe-bridge.d.ts +0 -42
  401. package/dist/theme/iframe-bridge.js +0 -72
  402. /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.d.ts +0 -0
  403. /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.js +0 -0
  404. /package/dist/{integrations → plugins/internal}/claude-resources/generate.d.ts +0 -0
  405. /package/dist/{integrations → plugins/internal}/claude-resources/generate.js +0 -0
  406. /package/dist/{integrations → plugins/internal}/doc-history/pre-build.js +0 -0
  407. /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.d.ts +0 -0
  408. /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.js +0 -0
  409. /package/dist/{integrations → plugins/internal}/llms-txt/emit.d.ts +0 -0
  410. /package/dist/{integrations → plugins/internal}/llms-txt/emit.js +0 -0
  411. /package/dist/{integrations → plugins/internal}/llms-txt/generate.d.ts +0 -0
  412. /package/dist/{integrations → plugins/internal}/llms-txt/generate.js +0 -0
  413. /package/dist/{integrations → plugins/internal}/llms-txt/index.js +0 -0
  414. /package/dist/{integrations → plugins/internal}/llms-txt/types.js +0 -0
  415. /package/dist/{integrations → plugins/internal}/search-index/build-emitter.d.ts +0 -0
  416. /package/dist/{integrations → plugins/internal}/search-index/build-emitter.js +0 -0
  417. /package/dist/{integrations → plugins/internal}/search-index/collect.d.ts +0 -0
  418. /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.d.ts +0 -0
  419. /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.js +0 -0
  420. /package/dist/{integrations → plugins/internal}/search-index/index.d.ts +0 -0
  421. /package/dist/{integrations → plugins/internal}/search-index/index.js +0 -0
  422. /package/dist/{integrations → plugins/internal}/search-index/types.d.ts +0 -0
  423. /package/dist/{integrations → plugins/internal}/search-index/types.js +0 -0
@@ -55,6 +55,16 @@ export interface Ramps {
55
55
  export type SemanticKey = "surface" | "muted" | "accent" | "accentHover" | "codeBg" | "codeFg" | "success" | "danger" | "warning" | "info" | "mermaidNodeBg" | "mermaidText" | "mermaidLine" | "mermaidLabelBg" | "mermaidNoteBg" | "chatUserBg" | "chatUserText" | "chatAssistantBg" | "chatAssistantText" | "imageOverlayBg" | "imageOverlayFg" | "matchedKeywordBg" | "matchedKeywordFg";
56
56
  /** Canonical order of the 23 semantic roles — used for `--zd-*` emit. */
57
57
  export declare const SEMANTIC_KEYS: readonly SemanticKey[];
58
+ /**
59
+ * Compact Tier-2 syntax vocabulary. zfb's fixed 18-role renderer taxonomy is
60
+ * intentionally collapsed onto these nine public design decisions; see
61
+ * `ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN` below.
62
+ */
63
+ export declare const SYNTAX_SEMANTIC_KEYS: readonly ["syntaxComment", "syntaxString", "syntaxNumber", "syntaxKeyword", "syntaxCallable", "syntaxType", "syntaxName", "syntaxInserted", "syntaxDeleted"];
64
+ export type SyntaxSemanticKey = (typeof SYNTAX_SEMANTIC_KEYS)[number];
65
+ /** Existing semantic role inherited when a syntax role has no explicit map. */
66
+ export declare const SYNTAX_SEMANTIC_ALIASES: Readonly<Record<SyntaxSemanticKey, SemanticKey>>;
67
+ export declare const SYNTAX_CSS_NAMES: Readonly<Record<SyntaxSemanticKey, string>>;
58
68
  /** The per-mode wiring: each UI role points at a ramp stop (or literal OKLCH)
59
69
  * via a `RampRef`. Two `ColorScheme`s (light + dark) share `ramps` but carry
60
70
  * their own `ModeMap`. */
@@ -64,6 +74,9 @@ export interface ModeMap {
64
74
  selectionBg: RampRef;
65
75
  selectionFg: RampRef;
66
76
  semantic: Record<SemanticKey, RampRef>;
77
+ /** Syntax-specific overrides. The map is required, while omitted roles
78
+ * inherit the aliases in `SYNTAX_SEMANTIC_ALIASES`. */
79
+ syntax: Partial<Record<SyntaxSemanticKey, RampRef>>;
67
80
  }
68
81
  /** A complete color scheme — shared Tier-1 ramps + per-mode Tier-2 wiring. */
69
82
  export interface ColorScheme {
@@ -75,6 +88,45 @@ export interface ColorScheme {
75
88
  * where a mode needs a different stop (or a per-mode AA-tuned literal). */
76
89
  export declare const SEMANTIC_RAMP_DEFAULTS: Record<SemanticKey, RampRef>;
77
90
  export declare const SEMANTIC_CSS_NAMES: Record<SemanticKey, string>;
91
+ /**
92
+ * Canonical renderer-role contraction shared by native zfb fenced code and
93
+ * `@takazudo/zfb-md-wasm` HTML Preview output. Values name zudo-doc semantic
94
+ * tokens, never palette stops, so renderer/component CSS stays downstream of
95
+ * the theme tier.
96
+ */
97
+ export declare const ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN: {
98
+ readonly foreground: "codeFg";
99
+ readonly background: "codeBg";
100
+ readonly escape: "syntaxString";
101
+ readonly operator: "codeFg";
102
+ readonly comment: "syntaxComment";
103
+ readonly string: "syntaxString";
104
+ readonly number: "syntaxNumber";
105
+ readonly constant: "syntaxNumber";
106
+ readonly keyword: "syntaxKeyword";
107
+ readonly function: "syntaxCallable";
108
+ readonly type: "syntaxType";
109
+ readonly namespace: "syntaxType";
110
+ readonly property: "syntaxName";
111
+ readonly variable: "syntaxName";
112
+ readonly tag: "syntaxName";
113
+ readonly attribute: "syntaxName";
114
+ readonly punctuation: "codeFg";
115
+ readonly inserted: "syntaxInserted";
116
+ readonly deleted: "syntaxDeleted";
117
+ readonly heading: "syntaxKeyword";
118
+ };
119
+ export type ZfbHighlightRole = keyof typeof ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN;
120
+ /** Percentage of the inserted/deleted foreground mixed into `codeBg`. */
121
+ export declare const SYNTAX_DIFF_BACKGROUND_MIX_PERCENT = 15;
122
+ /**
123
+ * Component-token values for zfb's inserted/deleted background variables.
124
+ * They deliberately do not create public `--zd-syntax-*-bg` roles.
125
+ */
126
+ export declare const SYNTAX_DIFF_BACKGROUND_CSS: {
127
+ readonly inserted: `color-mix(in srgb, var(${string}) 15%, var(${string}))`;
128
+ readonly deleted: `color-mix(in srgb, var(${string}) 15%, var(${string}))`;
129
+ };
78
130
  /**
79
131
  * Resolve a `RampRef` to a concrete color string against the given `ramps`.
80
132
  * - `{ base: n }` → `ramps.base[n]`
@@ -90,6 +142,21 @@ export declare function resolveRampRef(ref: RampRef, ramps: Ramps): string;
90
142
  /** Resolve every semantic role to a concrete color string via the scheme's
91
143
  * per-mode `map.semantic` wiring. Returns all 23 keys. */
92
144
  export declare function resolveSemanticColors(scheme: ColorScheme): Record<SemanticKey, string>;
145
+ export interface ResolvedSyntaxPalette {
146
+ /** Effective refs retain ramp identity for design-token-panel rows. */
147
+ refs: Record<SyntaxSemanticKey, RampRef>;
148
+ /** Concrete colors used by generated CSS and contrast validation. */
149
+ colors: Record<SyntaxSemanticKey, string>;
150
+ }
151
+ /**
152
+ * Canonical complete syntax resolver. Explicit partial overrides win; missing
153
+ * or invalid overrides inherit the scheme's semantic alias. A defensive
154
+ * `codeFg` / `fg` / first-ramp chain keeps runtime-authored data non-throwing
155
+ * even when it bypasses TypeScript or serde validation.
156
+ */
157
+ export declare function resolveSyntaxPalette(scheme: ColorScheme): ResolvedSyntaxPalette;
158
+ /** Convenience view of the canonical syntax palette's concrete colors. */
159
+ export declare function resolveSyntaxColors(scheme: ColorScheme): Record<SyntaxSemanticKey, string>;
93
160
  export interface TierItem {
94
161
  /** Stable id used as the Record key in persisted state (e.g. `surface`). */
95
162
  id: string;
@@ -120,10 +187,10 @@ export interface TierItem {
120
187
  */
121
188
  export declare function rampRefToPanelDefault(ref: RampRef): string;
122
189
  /**
123
- * Build the 27-row mode-scoped semantic tier's `items` for the design-token
190
+ * Build the 36-row mode-scoped semantic tier's `items` for the design-token
124
191
  * panel, from a single (already mode-resolved) `ColorScheme`: 4 base roles
125
192
  * (`bg`, `fg`, `selection-bg`, `selection-fg`) followed by the 23
126
- * `SEMANTIC_KEYS` rows, in that order. Every row's `default` is
193
+ * `SEMANTIC_KEYS` rows and 9 syntax rows, in that order. Every row's `default` is
127
194
  * `rampRefToPanelDefault` of the scheme's `map` entry for that role — never a
128
195
  * resolved literal color — so the panel's grouped ramp dropdown can decode it
129
196
  * back to a ramp reference (the no-snapping guarantee: a scheme with no
@@ -134,7 +201,7 @@ export declare function buildSemanticTierItems(scheme: ColorScheme): TierItem[];
134
201
  /** Which tiers a `schemeToCssPairs` call emits:
135
202
  * - `"all"` (default) — base roles + `--palette-*` + `--zd-*` semantic
136
203
  * - `"palette"` — only the bare Tier-1 `--palette-*` pairs
137
- * - `"roles"` — base roles + the 23 `--zd-*` semantic pairs
204
+ * - `"roles"` — base roles + the 23 UI and 9 syntax semantic pairs
138
205
  *
139
206
  * The split lets `generateLightDarkCssProperties` emit the shared `--palette-*`
140
207
  * once (bare) while wrapping the per-mode `--zd-*` roles in `light-dark(…)`.
@@ -150,6 +217,7 @@ export type CssEmitScope = "all" | "palette" | "roles";
150
217
  * - Tier-1 ramps: `--palette-base-0..4`, `--palette-accent-0..2`,
151
218
  * `--palette-state-{danger,success,warning,info}`
152
219
  * - the 23 Tier-2 `--zd-{role}` semantic tokens
220
+ * - the 9 Tier-2 `--zd-syntax-*` semantic tokens
153
221
  *
154
222
  * It intentionally does NOT emit the retired `--zd-0..15` slots or `--zd-cursor`.
155
223
  */
@@ -24,6 +24,39 @@ const SEMANTIC_KEYS = [
24
24
  "matchedKeywordBg",
25
25
  "matchedKeywordFg"
26
26
  ];
27
+ const SYNTAX_SEMANTIC_KEYS = [
28
+ "syntaxComment",
29
+ "syntaxString",
30
+ "syntaxNumber",
31
+ "syntaxKeyword",
32
+ "syntaxCallable",
33
+ "syntaxType",
34
+ "syntaxName",
35
+ "syntaxInserted",
36
+ "syntaxDeleted"
37
+ ];
38
+ const SYNTAX_SEMANTIC_ALIASES = {
39
+ syntaxComment: "muted",
40
+ syntaxString: "success",
41
+ syntaxNumber: "warning",
42
+ syntaxKeyword: "accent",
43
+ syntaxCallable: "info",
44
+ syntaxType: "warning",
45
+ syntaxName: "codeFg",
46
+ syntaxInserted: "success",
47
+ syntaxDeleted: "danger"
48
+ };
49
+ const SYNTAX_CSS_NAMES = {
50
+ syntaxComment: "--zd-syntax-comment",
51
+ syntaxString: "--zd-syntax-string",
52
+ syntaxNumber: "--zd-syntax-number",
53
+ syntaxKeyword: "--zd-syntax-keyword",
54
+ syntaxCallable: "--zd-syntax-callable",
55
+ syntaxType: "--zd-syntax-type",
56
+ syntaxName: "--zd-syntax-name",
57
+ syntaxInserted: "--zd-syntax-inserted",
58
+ syntaxDeleted: "--zd-syntax-deleted"
59
+ };
27
60
  const SEMANTIC_RAMP_DEFAULTS = {
28
61
  // Re-pointed for the 5-base / 3-accent minimized ramp (#2602); mirrors the
29
62
  // Default Dark reference wiring (surface/chatAssistantBg/imageOverlayBg merged
@@ -79,6 +112,33 @@ const SEMANTIC_CSS_NAMES = {
79
112
  matchedKeywordBg: "--zd-matched-keyword-bg",
80
113
  matchedKeywordFg: "--zd-matched-keyword-fg"
81
114
  };
115
+ const ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN = {
116
+ foreground: "codeFg",
117
+ background: "codeBg",
118
+ escape: "syntaxString",
119
+ operator: "codeFg",
120
+ comment: "syntaxComment",
121
+ string: "syntaxString",
122
+ number: "syntaxNumber",
123
+ constant: "syntaxNumber",
124
+ keyword: "syntaxKeyword",
125
+ function: "syntaxCallable",
126
+ type: "syntaxType",
127
+ namespace: "syntaxType",
128
+ property: "syntaxName",
129
+ variable: "syntaxName",
130
+ tag: "syntaxName",
131
+ attribute: "syntaxName",
132
+ punctuation: "codeFg",
133
+ inserted: "syntaxInserted",
134
+ deleted: "syntaxDeleted",
135
+ heading: "syntaxKeyword"
136
+ };
137
+ const SYNTAX_DIFF_BACKGROUND_MIX_PERCENT = 15;
138
+ const SYNTAX_DIFF_BACKGROUND_CSS = {
139
+ inserted: `color-mix(in srgb, var(${SYNTAX_CSS_NAMES.syntaxInserted}) ${SYNTAX_DIFF_BACKGROUND_MIX_PERCENT}%, var(${SEMANTIC_CSS_NAMES.codeBg}))`,
140
+ deleted: `color-mix(in srgb, var(${SYNTAX_CSS_NAMES.syntaxDeleted}) ${SYNTAX_DIFF_BACKGROUND_MIX_PERCENT}%, var(${SEMANTIC_CSS_NAMES.codeBg}))`
141
+ };
82
142
  function resolveRampRef(ref, ramps) {
83
143
  if (typeof ref === "string") return ref;
84
144
  if ("base" in ref) {
@@ -105,6 +165,61 @@ function resolveSemanticColors(scheme) {
105
165
  }
106
166
  return out;
107
167
  }
168
+ function tryResolveRampRef(ref, ramps) {
169
+ if (typeof ref === "string") return ref.trim().length > 0 ? ref : void 0;
170
+ if (!ref || typeof ref !== "object") return void 0;
171
+ const candidate = ref;
172
+ if ("base" in candidate) {
173
+ const index = candidate.base;
174
+ if (typeof index !== "number" || !Number.isInteger(index) || index < 0) return void 0;
175
+ const value = ramps.base[index];
176
+ return typeof value === "string" && value.trim().length > 0 ? value : void 0;
177
+ }
178
+ if ("accent" in candidate) {
179
+ const index = candidate.accent;
180
+ if (typeof index !== "number" || !Number.isInteger(index) || index < 0) return void 0;
181
+ const value = ramps.accent[index];
182
+ return typeof value === "string" && value.trim().length > 0 ? value : void 0;
183
+ }
184
+ if ("state" in candidate) {
185
+ const state = candidate.state;
186
+ if (typeof state !== "string" || !STATE_ROLES.includes(state)) return void 0;
187
+ const value = ramps.state[state];
188
+ return typeof value === "string" && value.trim().length > 0 ? value : void 0;
189
+ }
190
+ return void 0;
191
+ }
192
+ function copyRampRef(ref) {
193
+ return typeof ref === "string" ? ref : { ...ref };
194
+ }
195
+ function resolveSyntaxPalette(scheme) {
196
+ const { ramps, map } = scheme;
197
+ const refs = {};
198
+ const colors = {};
199
+ const emergencyCandidates = [
200
+ map.semantic.codeFg,
201
+ map.fg,
202
+ ramps.base.find((value) => typeof value === "string" && value.trim().length > 0),
203
+ "currentColor"
204
+ ];
205
+ const emergencyRef = emergencyCandidates.find(
206
+ (candidate) => tryResolveRampRef(candidate, ramps) !== void 0
207
+ );
208
+ const emergencyColor = tryResolveRampRef(emergencyRef, ramps) ?? "currentColor";
209
+ for (const key of SYNTAX_SEMANTIC_KEYS) {
210
+ const explicitRef = map.syntax[key];
211
+ const explicitColor = tryResolveRampRef(explicitRef, ramps);
212
+ const inheritedRef = map.semantic[SYNTAX_SEMANTIC_ALIASES[key]];
213
+ const inheritedColor = tryResolveRampRef(inheritedRef, ramps);
214
+ const effectiveRef = explicitColor !== void 0 ? explicitRef : inheritedColor !== void 0 ? inheritedRef : emergencyRef;
215
+ refs[key] = copyRampRef(effectiveRef);
216
+ colors[key] = explicitColor ?? inheritedColor ?? emergencyColor;
217
+ }
218
+ return { refs, colors };
219
+ }
220
+ function resolveSyntaxColors(scheme) {
221
+ return resolveSyntaxPalette(scheme).colors;
222
+ }
108
223
  function rampRefToPanelDefault(ref) {
109
224
  if (typeof ref === "string") return ref;
110
225
  if ("base" in ref) return `base:base-${ref.base}`;
@@ -113,6 +228,7 @@ function rampRefToPanelDefault(ref) {
113
228
  }
114
229
  function buildSemanticTierItems(scheme) {
115
230
  const { map } = scheme;
231
+ const syntax = resolveSyntaxPalette(scheme);
116
232
  const items = [
117
233
  {
118
234
  id: "bg",
@@ -152,6 +268,15 @@ function buildSemanticTierItems(scheme) {
152
268
  type: { kind: "color", format: "oklch" }
153
269
  });
154
270
  }
271
+ for (const key of SYNTAX_SEMANTIC_KEYS) {
272
+ items.push({
273
+ id: key,
274
+ cssVar: SYNTAX_CSS_NAMES[key],
275
+ label: key,
276
+ default: rampRefToPanelDefault(syntax.refs[key]),
277
+ type: { kind: "color", format: "oklch" }
278
+ });
279
+ }
155
280
  return items;
156
281
  }
157
282
  function schemeToCssPairs(scheme, scope = "all") {
@@ -177,6 +302,10 @@ function schemeToCssPairs(scheme, scope = "all") {
177
302
  for (const key of SEMANTIC_KEYS) {
178
303
  pairs.push([SEMANTIC_CSS_NAMES[key], sem[key]]);
179
304
  }
305
+ const syntax = resolveSyntaxColors(scheme);
306
+ for (const key of SYNTAX_SEMANTIC_KEYS) {
307
+ pairs.push([SYNTAX_CSS_NAMES[key], syntax[key]]);
308
+ }
180
309
  }
181
310
  return pairs;
182
311
  }
@@ -212,11 +341,19 @@ export {
212
341
  SEMANTIC_KEYS,
213
342
  SEMANTIC_RAMP_DEFAULTS,
214
343
  STATE_ROLES,
344
+ SYNTAX_CSS_NAMES,
345
+ SYNTAX_DIFF_BACKGROUND_CSS,
346
+ SYNTAX_DIFF_BACKGROUND_MIX_PERCENT,
347
+ SYNTAX_SEMANTIC_ALIASES,
348
+ SYNTAX_SEMANTIC_KEYS,
349
+ ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN,
215
350
  buildSemanticTierItems,
216
351
  generateCssCustomProperties,
217
352
  generateLightDarkCssProperties,
218
353
  rampRefToPanelDefault,
219
354
  resolveRampRef,
220
355
  resolveSemanticColors,
356
+ resolveSyntaxColors,
357
+ resolveSyntaxPalette,
221
358
  schemeToCssPairs
222
359
  };
@@ -64,6 +64,13 @@ const darkMap = {
64
64
  // the amber bg — matched-keyword at threshold+0.1; carried from #2593.
65
65
  matchedKeywordBg: "oklch(.700 .158 62)",
66
66
  matchedKeywordFg: "oklch(.300 .003 65)"
67
+ },
68
+ // Diff foregrounds are checked against their actual 15% foreground tint on
69
+ // codeBg. The ordinary success/danger aliases are not light enough on that
70
+ // derived dark background, so only these two syntax roles need overrides.
71
+ syntax: {
72
+ syntaxInserted: "oklch(.750 .145 145)",
73
+ syntaxDeleted: "oklch(.820 .100 25)"
67
74
  }
68
75
  };
69
76
  const lightMap = {
@@ -110,6 +117,12 @@ const lightMap = {
110
117
  // Default Dark (an amber-on-white highlight reads identically in both modes).
111
118
  matchedKeywordBg: "oklch(.700 .158 62)",
112
119
  matchedKeywordFg: "oklch(.300 .003 65)"
120
+ },
121
+ // Slightly darker than the shared success/danger aliases so the foregrounds
122
+ // retain >= 4.6:1 on their own 15% tints over the light code background.
123
+ syntax: {
124
+ syntaxInserted: "oklch(.460 .140 145)",
125
+ syntaxDeleted: "oklch(.490 .170 25)"
113
126
  }
114
127
  };
115
128
  const defaultColorSchemes = {
@@ -16,7 +16,7 @@ export type ComponentTokenSurface = "content" | "chrome";
16
16
  * Provides autocomplete when a consumer iterates or references individual tokens.
17
17
  * Must be kept in sync with the `cssVar` values in `COMPONENT_TOKENS` below.
18
18
  */
19
- export type ComponentTokenName = "--zdc-doc-title-font" | "--zdc-doc-title-weight" | "--zdc-doc-title-tracking" | "--zdc-doc-h2-font" | "--zdc-doc-h2-weight" | "--zdc-doc-h2-tracking" | "--zdc-doc-h3-weight" | "--zdc-doc-h4-weight" | "--zdc-doc-prose-font" | "--zdc-doc-link-decoration" | "--zdc-admonition-radius" | "--zdc-admonition-border-width" | "--zdc-card-radius" | "--zdc-content-max-width" | "--zdc-toc-width" | "--zdc-nav-active-indicator-color" | "--zdc-nav-active-weight";
19
+ export type ComponentTokenName = "--zdc-doc-title-font" | "--zdc-doc-title-weight" | "--zdc-doc-title-tracking" | "--zdc-doc-h2-font" | "--zdc-doc-h2-weight" | "--zdc-doc-h2-tracking" | "--zdc-doc-h3-weight" | "--zdc-doc-h4-weight" | "--zdc-doc-prose-font" | "--zdc-doc-link-decoration" | "--zdc-admonition-radius" | "--zdc-admonition-border-width" | "--zdc-card-radius" | "--zdc-content-max-width" | "--zdc-toc-width" | "--zdc-nav-active-indicator-color" | "--zdc-nav-active-weight" | "--zdc-chrome-font" | "--zdc-header-font" | "--zdc-sidebar-font" | "--zdc-toc-font";
20
20
  export interface ComponentToken {
21
21
  /**
22
22
  * The CSS custom-property name the consumer redefines in `:root`, e.g.
@@ -98,11 +98,17 @@ const COMPONENT_TOKENS = [
98
98
  },
99
99
  // ── Content prose font (.zd-content, #2460) ────────────────────────────────
100
100
  // Sets font-family on the content root so every element inside inherits it by
101
- // default. The headings whose `--zdc-doc-*-font` default to `inherit` will
102
- // inherit this value — safe because the current computed heading family already
103
- // resolves to `var(--font-sans)` (Tailwind preflight sets it on `html`).
104
- // Byte-identical: `.zd-content` currently carries no explicit font-family, so
105
- // setting it to `var(--font-sans)` produces the same computed value.
101
+ // default. The headings whose `--zdc-doc-*-font` default to `inherit` inherit
102
+ // this value.
103
+ // NOT byte-identical, by design (#2887 corrects the original claim here): this
104
+ // project imports only `tailwindcss/preflight` + `utilities` and never defines
105
+ // `--default-font-family`, so preflight's `html, :host` rule compiles its
106
+ // `--theme(--default-font-family, ui-sans-serif, system-ui, …)` down to the
107
+ // LITERAL fallback stack — it does NOT resolve to `var(--font-sans)`. Pointing
108
+ // `.zd-content` at `var(--font-sans)` therefore moved prose off that literal
109
+ // onto the token (`system-ui, sans-serif` by default) — the same system UI face
110
+ // on every major platform, which is why the delta went unnoticed. `body` takes
111
+ // the identical step for the app shell — see `--zdc-chrome-font` below.
106
112
  {
107
113
  cssVar: "--zdc-doc-prose-font",
108
114
  selector: ".zd-content",
@@ -255,6 +261,99 @@ const COMPONENT_TOKENS = [
255
261
  surface: "chrome",
256
262
  category: "typography",
257
263
  description: "Font weight of the active sidebar nav link (non-root leaf, the current page). Defaults to `var(--font-weight-medium)` (byte-identical to the current `font-medium` utility). Redefine in :root to use semibold or bold for stronger active emphasis."
264
+ },
265
+ // ── Chrome font seam (body, #2887 / epic #2886) ───────────────────────────
266
+ // THE foundation the chrome-font epic stacks on. Every app-shell surface —
267
+ // header, desktop sidebar, mobile drawer, right-rail TOC, mobile TOC,
268
+ // breadcrumb, footer — sets NO font-family of its own, so all of them inherit
269
+ // Tailwind preflight's `html, :host` rule. Because this project imports only
270
+ // `tailwindcss/preflight` + `utilities` and never defines
271
+ // `--default-font-family`, that rule's `--theme(--default-font-family,
272
+ // ui-sans-serif, system-ui, …)` compiles to the HARDCODED LITERAL fallback
273
+ // stack. A theme pack's `--font-sans` override therefore had no path to any of
274
+ // those surfaces at all — only `.zd-content` prose consumed the token.
275
+ //
276
+ // This rule is that path: `body` is UNLAYERED here, so it beats preflight
277
+ // (which the consumer imports into `layer(zd-preflight)`), and every chrome
278
+ // surface inherits `var(--font-sans)` — including any surface a future
279
+ // component adds, since inheritance is the mechanism.
280
+ //
281
+ // NOT byte-identical — the ONE deliberate exception in this registry. Chrome
282
+ // falls from preflight's `ui-sans-serif, system-ui, …` literal to whatever
283
+ // `--font-sans` resolves to (`system-ui, sans-serif` by default): the same
284
+ // system UI face on every major platform, and the identical step `.zd-content`
285
+ // already took in #2460 (see `--zdc-doc-prose-font` above). Accepted per #2887.
286
+ //
287
+ // Deliberately NO `--font-mono` counterpart: every code surface (`code`, `pre`,
288
+ // `.hi-root`, the diff viewer, …) sets `font-family: var(--font-mono)` on
289
+ // itself explicitly, so the mono token already reaches all of them.
290
+ {
291
+ cssVar: "--zdc-chrome-font",
292
+ selector: "body",
293
+ property: "font-family",
294
+ default: "var(--font-sans)",
295
+ component: "chrome",
296
+ surface: "chrome",
297
+ category: "typography",
298
+ description: "Base font family for the whole document, and the seam that lets `--font-sans` reach the app shell (header/sidebar/TOC/breadcrumb/footer) at all \u2014 without it those surfaces inherit Tailwind preflight's hardcoded literal stack instead of the token. Defaults to `var(--font-sans)`. Redefine `--font-sans` (the usual theme-pack route) to restyle everything, or `--zdc-chrome-font` to move the shell independently of prose."
299
+ },
300
+ // ── Per-surface chrome font knobs (#2887 / epic #2886) ────────────────────
301
+ // Each lets a pack give ONE shell surface its own face (e.g. a display font in
302
+ // the header while nav and TOC stay on the body font) without ejecting
303
+ // anything. Each selector deliberately covers BOTH the desktop and the mobile
304
+ // emitter of its surface, so one override lands on both viewports. The mobile
305
+ // hooks (`data-zd-mobile-sidebar`, `data-zd-mobile-toc`) were added in #2887
306
+ // for exactly this — the mobile drawer and the mobile TOC previously had no
307
+ // stable anchor at all, and the mobile TOC does NOT reuse `nav[data-zd-toc]`
308
+ // (it emits its own `<div>` markup).
309
+ //
310
+ // ── Why the default is the chrome seam, NOT `inherit` ─────────────────────
311
+ // These three chain to `var(--zdc-chrome-font, var(--font-sans))` — the same
312
+ // value the `body` seam above resolves to — rather than to `inherit` like the
313
+ // content-surface `-font` tokens do. `inherit` is the WRONG default here
314
+ // because a surface's two emitters live in DIFFERENT parts of the DOM, so
315
+ // `inherit` resolves them against different ancestors and silently splits them:
316
+ // - The mobile drawer renders INSIDE `header[data-header]` (Header projects
317
+ // `SidebarToggle` into its `sidebarToggle` slot). Under `inherit`, a pack
318
+ // setting ONLY `--zdc-header-font` would leak that face into the drawer
319
+ // while `#desktop-sidebar` — which inherits from `body` — kept the body
320
+ // font. One "sidebar", two fonts.
321
+ // - The mobile TOC renders inside `.zd-content`, so under `inherit` it would
322
+ // follow `--zdc-doc-prose-font` while the desktop rail followed the chrome
323
+ // font. The TOC is navigation, not prose; it belongs on the chrome font.
324
+ // Anchoring to the seam makes each knob depend only on its own value and the
325
+ // chrome font — never on where the component happens to be mounted. Still a
326
+ // no-op by default: the resolved value is identical to what `inherit` produced
327
+ // when nothing is overridden (both land on `var(--font-sans)`).
328
+ {
329
+ cssVar: "--zdc-header-font",
330
+ selector: "header[data-header]",
331
+ property: "font-family",
332
+ default: "var(--zdc-chrome-font, var(--font-sans))",
333
+ component: "header",
334
+ surface: "chrome",
335
+ category: "typography",
336
+ description: "Font family of the site header. Defaults to the `--zdc-chrome-font` seam (a no-op until redefined); set in :root to give the header its own face, e.g. a display font for the wordmark and nav. Scoped to the header itself \u2014 it does not leak into the mobile sidebar drawer that the header hosts."
337
+ },
338
+ {
339
+ cssVar: "--zdc-sidebar-font",
340
+ selector: "#desktop-sidebar, aside[data-zd-mobile-sidebar]",
341
+ property: "font-family",
342
+ default: "var(--zdc-chrome-font, var(--font-sans))",
343
+ component: "sidebar",
344
+ surface: "chrome",
345
+ category: "typography",
346
+ description: "Font family of the navigation sidebar \u2014 covers BOTH the desktop `#desktop-sidebar` rail and the mobile drawer, so one override styles both viewports and neither drifts onto a different face. Defaults to the `--zdc-chrome-font` seam (a no-op until redefined)."
347
+ },
348
+ {
349
+ cssVar: "--zdc-toc-font",
350
+ selector: "nav[data-zd-toc], div[data-zd-mobile-toc]",
351
+ property: "font-family",
352
+ default: "var(--zdc-chrome-font, var(--font-sans))",
353
+ component: "toc",
354
+ surface: "chrome",
355
+ category: "typography",
356
+ description: "Font family of the table of contents \u2014 covers BOTH the desktop right rail and the mobile collapsible TOC, so one override styles both viewports. Defaults to the `--zdc-chrome-font` seam (a no-op until redefined), which also keeps the mobile TOC on the chrome font rather than the prose font of the `.zd-content` it renders inside."
258
357
  }
259
358
  ];
260
359
  export {
package/dist/config.d.ts CHANGED
@@ -192,8 +192,8 @@ export interface ZudoDocConfig {
192
192
  */
193
193
  tagGovernance?: TagGovernanceMode;
194
194
  /**
195
- * Whether the tag vocabulary is consulted at runtime (alias resolution,
196
- * deprecation filtering, grouped footer). Orthogonal to `tagGovernance`.
195
+ * Whether the canonical tag vocabulary is consulted at runtime (validation
196
+ * and grouped footer rendering). Orthogonal to `tagGovernance`.
197
197
  * The vocabulary ENTRIES are supplied separately via `tagVocabularyEntries`.
198
198
  * @default false
199
199
  */
@@ -229,8 +229,8 @@ export interface ZudoDocConfig {
229
229
  */
230
230
  aiAssistant?: boolean;
231
231
  /**
232
- * Short-circuit `/api/ai-chat` with a fixed "disabled" reply (no API key /
233
- * KV / rate limiter touched).
232
+ * Short-circuit `/api/ai-chat` with a fixed "disabled" reply (no API key,
233
+ * KV/DO binding, or rate limiter touched).
234
234
  * @default false
235
235
  */
236
236
  aiChatDemoMode?: boolean;
@@ -241,8 +241,9 @@ export interface ZudoDocConfig {
241
241
  */
242
242
  aiChatAllowedOrigins?: string[];
243
243
  /**
244
- * Global daily request ceiling across all IPs for `/api/ai-chat`, or `false`
245
- * to disable the ceiling.
244
+ * Exact UTC-day paid-call admission cap across all IPs for `/api/ai-chat`,
245
+ * or `false` to disable it. Admissions are not refunded after provider
246
+ * failure and are not provider-confirmed spend accounting.
246
247
  * @default false
247
248
  */
248
249
  aiChatGlobalDailyLimit?: number | false;
@@ -261,12 +262,6 @@ export interface ZudoDocConfig {
261
262
  * @default 4
262
263
  */
263
264
  tocMaxDepth?: number;
264
- /**
265
- * Heading-ID (anchor) strategy. `"hierarchical"` prefixes each anchor with
266
- * its ancestor chain; `"flat"` is zfb's legacy github-slugger scheme.
267
- * @default "hierarchical"
268
- */
269
- headingIdStrategy?: "flat" | "hierarchical";
270
265
  /**
271
266
  * Enable the draggable sidebar resizer.
272
267
  * @default false
@@ -374,6 +369,27 @@ export interface ZudoDocConfig {
374
369
  * @default undefined (package-default builder is used)
375
370
  */
376
371
  designTokenPanelConfigModule?: string;
372
+ /**
373
+ * Active theme pack slug. "default" is the stock zudo-doc look (no pack
374
+ * stylesheet loaded). Must be a member of the resolved `themePacks` list;
375
+ * an unknown slug fails the build loudly at plugin setup.
376
+ * @default "default"
377
+ */
378
+ themePack?: string;
379
+ /**
380
+ * Mount the bottom-right theme-pack switcher flyout (and its browse-all
381
+ * dialog) on every page.
382
+ * @default false
383
+ */
384
+ themePackSwitcher?: boolean;
385
+ /**
386
+ * Enabled pack slugs, in switcher order. `undefined` = all bundled packs:
387
+ * "default" first, then the bundled registry in canonical
388
+ * (alphabetical-by-slug) order. An explicit list is authoritative — may omit
389
+ * "default", reorder freely; duplicates/unknown slugs fail loudly.
390
+ * @default undefined
391
+ */
392
+ themePacks?: string[];
377
393
  /**
378
394
  * Replace the default docs-frontmatter zod schema builder entirely. When
379
395
  * omitted, `zudoDoc()` builds the default schema
package/dist/config.js CHANGED
@@ -45,11 +45,12 @@ const DEFAULT_SETTINGS = {
45
45
  aiAssistant: false,
46
46
  aiChatDemoMode: false,
47
47
  aiChatAllowedOrigins: [],
48
+ // Exact UTC-day paid-call admission cap; false disables it. An admission is
49
+ // consumed before provider fetch and is not provider-confirmed accounting.
48
50
  aiChatGlobalDailyLimit: false,
49
51
  designTokenPanel: false,
50
52
  tocMinDepth: 2,
51
53
  tocMaxDepth: 4,
52
- headingIdStrategy: "hierarchical",
53
54
  sidebarResizer: false,
54
55
  sidebarToggle: false,
55
56
  imageEnlarge: false,
@@ -65,9 +66,17 @@ const DEFAULT_SETTINGS = {
65
66
  footer: false,
66
67
  headerNav: [],
67
68
  headerRightItems: [{ type: "component", component: "theme-toggle" }],
68
- packageOwnedRoutes: true
69
+ packageOwnedRoutes: true,
70
+ themePack: "default",
71
+ themePackSwitcher: false,
72
+ themePacks: void 0
69
73
  };
70
74
  function zudoDoc(user = {}) {
75
+ if ("headingIdStrategy" in user) {
76
+ throw new TypeError(
77
+ "headingIdStrategy is no longer supported; heading IDs are always hierarchical"
78
+ );
79
+ }
71
80
  const {
72
81
  port,
73
82
  adapter,
@@ -16,22 +16,6 @@ import { ContentCode } from "./content-code.js";
16
16
  * into a larger components object that also includes admonition overrides,
17
17
  * custom shortcodes, etc.) at the Astro page layer.
18
18
  */
19
- export declare const htmlOverrides: {
20
- h2: typeof HeadingH2;
21
- h3: typeof HeadingH3;
22
- h4: typeof HeadingH4;
23
- p: typeof ContentParagraph;
24
- a: typeof ContentLink;
25
- strong: typeof ContentStrong;
26
- blockquote: typeof ContentBlockquote;
27
- ul: typeof ContentUl;
28
- ol: typeof ContentOl;
29
- table: typeof ContentTable;
30
- code: typeof ContentCode;
31
- };
32
- /**
33
- * Alias for `htmlOverrides`. Prefer this name in new consumer code.
34
- */
35
19
  export declare const defaultComponents: {
36
20
  h2: typeof HeadingH2;
37
21
  h3: typeof HeadingH3;
@@ -9,7 +9,7 @@ import { ContentUl } from "./content-ul.js";
9
9
  import { ContentOl } from "./content-ol.js";
10
10
  import { ContentTable } from "./content-table.js";
11
11
  import { ContentCode } from "./content-code.js";
12
- const htmlOverrides = {
12
+ const defaultComponents = {
13
13
  h2: HeadingH2,
14
14
  h3: HeadingH3,
15
15
  h4: HeadingH4,
@@ -22,8 +22,6 @@ const htmlOverrides = {
22
22
  table: ContentTable,
23
23
  code: ContentCode
24
24
  };
25
- const defaultComponents = htmlOverrides;
26
25
  export {
27
- defaultComponents,
28
- htmlOverrides
26
+ defaultComponents
29
27
  };
@@ -26,4 +26,4 @@ export { ContentUl } from "./content-ul.js";
26
26
  export { ContentOl } from "./content-ol.js";
27
27
  export { ContentTable } from "./content-table.js";
28
28
  export { ContentCode } from "./content-code.js";
29
- export { htmlOverrides, defaultComponents } from "./component-map.js";
29
+ export { defaultComponents } from "./component-map.js";
@@ -9,7 +9,7 @@ import { ContentUl } from "./content-ul.js";
9
9
  import { ContentOl } from "./content-ol.js";
10
10
  import { ContentTable } from "./content-table.js";
11
11
  import { ContentCode } from "./content-code.js";
12
- import { htmlOverrides, defaultComponents } from "./component-map.js";
12
+ import { defaultComponents } from "./component-map.js";
13
13
  export {
14
14
  ContentBlockquote,
15
15
  ContentCode,
@@ -22,6 +22,5 @@ export {
22
22
  HeadingH2,
23
23
  HeadingH3,
24
24
  HeadingH4,
25
- defaultComponents,
26
- htmlOverrides
25
+ defaultComponents
27
26
  };
package/dist/content.css CHANGED
@@ -10,7 +10,7 @@
10
10
  * drift). See zudolab/zudo-doc#2188.
11
11
  *
12
12
  * Component-first split: the major elements (h2–h4, p, a, strong, blockquote,
13
- * ul, ol, table) get their VISUALS from the package's `htmlOverrides` Preact
13
+ * ul, ol, table) get their VISUALS from the package's `defaultComponents` Preact
14
14
  * components (Tailwind classes + inline styles), whose utilities ship in
15
15
  * `dist/safelist.css`. This file owns only what those components do NOT emit:
16
16
  * the flow-space vertical rhythm, heading `--flow-space` + tightening, the