@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.
- package/CHANGELOG.md +61 -0
- package/README.md +2 -2
- package/bin/tag-cli-config.ts +126 -0
- package/bin/tags-audit-runner.ts +60 -76
- package/bin/tags-audit.mjs +17 -36
- package/bin/tags-suggest-runner.ts +429 -0
- package/bin/tags-suggest.mjs +30 -0
- package/bin/zudo-doc.mjs +78 -25
- package/dist/breadcrumb/breadcrumb.d.ts +4 -4
- package/dist/breadcrumb/find-path.d.ts +2 -2
- package/dist/breadcrumb/index.d.ts +1 -1
- package/dist/breadcrumb/types.d.ts +0 -5
- package/dist/chrome/derive.d.ts +16 -4
- package/dist/chrome/derive.js +64 -4
- package/dist/chrome/index.d.ts +13 -10
- package/dist/chrome/index.js +12 -6
- package/dist/chrome/primary-slots.d.ts +21 -0
- package/dist/chrome/primary-slots.js +59 -0
- package/dist/chrome-bindings.d.ts +227 -0
- package/dist/chrome-bindings.js +6 -0
- package/dist/code-syntax/code-block-enhancer-script.d.ts +4 -0
- package/dist/code-syntax/code-block-enhancer-script.js +7 -4
- package/dist/code-syntax/code-block-enhancer.d.ts +2 -2
- package/dist/code-syntax/code-block-enhancer.js +1 -3
- package/dist/code-syntax/index.d.ts +5 -5
- package/dist/code-syntax/index.js +4 -13
- package/dist/code-syntax/mermaid-init-script.d.ts +1 -22
- package/dist/code-syntax/mermaid-init-script.js +0 -2
- package/dist/code-syntax/mermaid-init.d.ts +0 -1
- package/dist/code-syntax/mermaid-init.js +3 -4
- package/dist/code-syntax/tabs-init.d.ts +0 -1
- package/dist/code-syntax/tabs-init.js +1 -3
- package/dist/code-syntax/tabs.d.ts +0 -1
- package/dist/code-syntax/tabs.js +1 -3
- package/dist/color-scheme-utils.d.ts +72 -4
- package/dist/color-scheme-utils.js +137 -0
- package/dist/color-schemes-defaults/index.d.ts +23 -0
- package/dist/color-schemes-defaults/index.js +134 -0
- package/dist/config.d.ts +459 -0
- package/dist/config.js +125 -0
- package/dist/content/component-map.d.ts +0 -16
- package/dist/content/component-map.js +2 -4
- package/dist/content/index.d.ts +1 -1
- package/dist/content/index.js +2 -3
- package/dist/content.css +1 -1
- package/dist/design-token-panel-bootstrap.d.ts +82 -27
- package/dist/design-token-panel-bootstrap.js +110 -21
- package/dist/design-token-panel-config/index.d.ts +49 -0
- package/dist/design-token-panel-config/index.js +211 -0
- package/dist/design-token-panel-config/manifest.d.ts +46 -0
- package/dist/design-token-panel-config/manifest.js +105 -0
- package/dist/directive-vocabulary-defaults/index.d.ts +16 -0
- package/dist/directive-vocabulary-defaults/index.js +12 -0
- package/dist/doc-body-end-islands/design-token-panel-island.d.ts +15 -0
- package/dist/doc-body-end-islands/design-token-panel-island.js +31 -0
- package/dist/doc-body-end-islands/index.d.ts +52 -7
- package/dist/doc-body-end-islands/index.js +19 -0
- package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +37 -0
- package/dist/doc-body-end-islands/theme-pack-switcher-island.js +18 -0
- package/dist/doc-content-header/index.js +1 -1
- package/dist/doc-history-area/index.d.ts +10 -4
- package/dist/doc-history-area/index.js +3 -2
- package/dist/doc-metainfo-area/index.d.ts +1 -0
- package/dist/doc-page-props/index.d.ts +7 -23
- package/dist/doc-page-renderer/index.d.ts +1 -0
- package/dist/doc-page-renderer/index.js +1 -0
- package/dist/doc-page-shell/index.js +19 -12
- package/dist/doc-pager/index.js +1 -1
- package/dist/doc-route-entries/index.d.ts +2 -2
- package/dist/doclayout/doc-layout-with-defaults.js +4 -4
- package/dist/doclayout/doc-layout.d.ts +8 -0
- package/dist/doclayout/doc-layout.js +10 -1
- package/dist/docs-schema/index.d.ts +67 -0
- package/dist/docs-schema/index.js +43 -0
- package/dist/eject/index.d.ts +16 -0
- package/dist/eject/index.js +122 -28
- package/dist/extract-headings/index.d.ts +5 -8
- package/dist/extract-headings/index.js +2 -9
- package/dist/factory-context/index.d.ts +56 -4
- package/dist/features.css +65 -43
- package/dist/find-in-page/find-bar.d.ts +9 -0
- package/dist/find-in-page/find-bar.js +114 -0
- package/dist/find-in-page/find-in-page.d.ts +17 -0
- package/dist/find-in-page/find-in-page.js +131 -0
- package/dist/find-in-page/index.d.ts +11 -0
- package/dist/find-in-page/index.js +49 -0
- package/dist/footer/footer.js +1 -0
- package/dist/frontmatter-preview-defaults/index.d.ts +16 -0
- package/dist/frontmatter-preview-defaults/index.js +25 -0
- package/dist/head-with-defaults/index.d.ts +2 -0
- package/dist/head-with-defaults/index.js +16 -0
- package/dist/header/header.d.ts +10 -5
- package/dist/header/header.js +45 -5
- package/dist/header/index.d.ts +1 -1
- package/dist/header/types.d.ts +30 -1
- package/dist/header-with-defaults/index.js +1 -0
- package/dist/home-page/index.d.ts +2 -0
- package/dist/home-page/index.js +11 -5
- package/dist/home-page/prepare-home-data.js +1 -1
- package/dist/i18n-defaults/index.d.ts +22 -0
- package/dist/i18n-defaults/index.js +167 -0
- package/dist/locale-merge/index.d.ts +9 -14
- package/dist/locale-merge/index.js +6 -4
- package/dist/mdx-components/index.js +4 -4
- package/dist/plugins/claude-resources.d.ts +1 -0
- package/dist/plugins/claude-resources.js +4 -2
- package/dist/plugins/doc-history.js +1 -1
- package/dist/{integrations → plugins/internal}/claude-resources/index.d.ts +1 -16
- package/dist/{integrations → plugins/internal}/claude-resources/index.js +0 -9
- package/dist/{integrations → plugins/internal}/doc-history/index.d.ts +0 -17
- package/dist/{integrations → plugins/internal}/doc-history/index.js +0 -4
- package/dist/{integrations → plugins/internal}/doc-history/pre-build.d.ts +2 -4
- package/dist/plugins/internal/llms-txt/index.d.ts +7 -0
- package/dist/{integrations → plugins/internal}/llms-txt/load.d.ts +1 -1
- package/dist/{integrations → plugins/internal}/llms-txt/load.js +2 -2
- package/dist/{integrations → plugins/internal}/llms-txt/strip.d.ts +2 -3
- package/dist/{integrations → plugins/internal}/llms-txt/strip.js +1 -1
- package/dist/{integrations → plugins/internal}/llms-txt/types.d.ts +13 -22
- package/dist/{integrations → plugins/internal}/search-index/collect.js +1 -1
- package/dist/plugins/internal/theme-packs/copy.d.ts +32 -0
- package/dist/plugins/internal/theme-packs/copy.js +45 -0
- package/dist/plugins/internal/theme-packs/dev-middleware.d.ts +22 -0
- package/dist/plugins/internal/theme-packs/dev-middleware.js +80 -0
- package/dist/plugins/internal/theme-packs/index.d.ts +6 -0
- package/dist/plugins/internal/theme-packs/index.js +9 -0
- package/dist/plugins/internal/theme-packs/resolve.d.ts +17 -0
- package/dist/plugins/internal/theme-packs/resolve.js +17 -0
- package/dist/plugins/internal/theme-packs/types.d.ts +22 -0
- package/dist/plugins/internal/theme-packs/types.js +0 -0
- package/dist/plugins/llms-txt.js +1 -1
- package/dist/plugins/routes.js +55 -21
- package/dist/plugins/search-index.js +1 -1
- package/dist/plugins/theme-packs.d.ts +3 -0
- package/dist/plugins/theme-packs.js +40 -0
- package/dist/preset.d.ts +28 -14
- package/dist/preset.js +24 -9
- package/dist/route-context/index.js +4 -6
- package/dist/route-enumerators/index.d.ts +6 -18
- package/dist/route-enumerators/index.js +8 -6
- package/dist/routes/404.js +3 -1
- package/dist/routes/_chrome.js +3 -2
- package/dist/routes/_context.d.ts +7 -3
- package/dist/routes/_context.js +2 -0
- package/dist/routes/_docs-helpers.js +9 -21
- package/dist/safelist.css +1 -1
- package/dist/settings.d.ts +64 -12
- package/dist/sidebar-tree/build-tree.d.ts +3 -4
- package/dist/sidebar-tree/build-tree.js +4 -3
- package/dist/sidebar-tree/index.d.ts +2 -2
- package/dist/sidebar-tree/types.d.ts +6 -17
- package/dist/site-tree-nav-island/index.d.ts +3 -1
- package/dist/site-tree-nav-island/index.js +17 -5
- package/dist/site-tree-nav-island/state.d.ts +4 -0
- package/dist/site-tree-nav-island/state.js +10 -0
- package/dist/tag-helpers/index.d.ts +6 -13
- package/dist/tag-helpers/index.js +5 -23
- package/dist/tag-pages/index.d.ts +8 -21
- package/dist/tag-pages/index.js +14 -10
- package/dist/tags-audit.d.ts +16 -44
- package/dist/tags-audit.js +9 -172
- package/dist/theme/color-scheme-provider.d.ts +2 -3
- package/dist/theme/color-scheme-provider.js +2 -10
- package/dist/theme/index.d.ts +1 -4
- package/dist/theme/index.js +2 -30
- package/dist/theme/theme-pack-provider.d.ts +42 -0
- package/dist/theme/theme-pack-provider.js +75 -0
- package/dist/theme-cli/apply.d.ts +16 -0
- package/dist/theme-cli/apply.js +61 -0
- package/dist/theme-cli/config-io.d.ts +15 -0
- package/dist/theme-cli/config-io.js +51 -0
- package/dist/theme-cli/config-rewriter.d.ts +21 -0
- package/dist/theme-cli/config-rewriter.js +141 -0
- package/dist/theme-cli/config-scanner.d.ts +63 -0
- package/dist/theme-cli/config-scanner.js +288 -0
- package/dist/theme-cli/index.d.ts +7 -0
- package/dist/theme-cli/index.js +38 -0
- package/dist/theme-cli/list.d.ts +27 -0
- package/dist/theme-cli/list.js +64 -0
- package/dist/theme-cli/provenance.d.ts +17 -0
- package/dist/theme-cli/provenance.js +35 -0
- package/dist/theme-cli/registry.d.ts +14 -0
- package/dist/theme-cli/registry.js +13 -0
- package/dist/theme-pack-dialog/dialog-state.d.ts +25 -0
- package/dist/theme-pack-dialog/dialog-state.js +40 -0
- package/dist/theme-pack-dialog/index.d.ts +5 -0
- package/dist/theme-pack-dialog/index.js +152 -0
- package/dist/theme-pack-dialog/theme-pack-card.d.ts +25 -0
- package/dist/theme-pack-dialog/theme-pack-card.js +72 -0
- package/dist/theme-pack-switcher/index.d.ts +49 -0
- package/dist/theme-pack-switcher/index.js +205 -0
- package/dist/theme-pack-switcher/switcher-state.d.ts +56 -0
- package/dist/theme-pack-switcher/switcher-state.js +43 -0
- package/dist/theme-pack-switcher/theme-pack-sync.d.ts +85 -0
- package/dist/theme-pack-switcher/theme-pack-sync.js +121 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-400-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-700-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-400-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-700-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-italic-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/OFL.txt +94 -0
- package/dist/theme-packs/beacon/meta.json +37 -0
- package/dist/theme-packs/beacon/pack.css +442 -0
- package/dist/theme-packs/broadsheet/fonts/CourierPrime-400-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/CourierPrime-700-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/OFL.txt +95 -0
- package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-italic-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/SourceSerif4-italic-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/SourceSerif4-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/meta.json +38 -0
- package/dist/theme-packs/broadsheet/pack.css +448 -0
- package/dist/theme-packs/brutalist/fonts/ArchivoBlack-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/fonts/IBMPlexMono-700-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/fonts/OFL.txt +95 -0
- package/dist/theme-packs/brutalist/fonts/SpaceGrotesk-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/meta.json +38 -0
- package/dist/theme-packs/brutalist/pack.css +546 -0
- package/dist/theme-packs/default/meta.json +37 -0
- package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexSans-italic-latin.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexSans-latin-ext.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexSans-latin.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/OFL.txt +93 -0
- package/dist/theme-packs/drift/meta.json +37 -0
- package/dist/theme-packs/drift/pack.css +478 -0
- package/dist/theme-packs/fjord/fonts/Inter-latin-ext.woff2 +0 -0
- package/dist/theme-packs/fjord/fonts/Inter-latin.woff2 +0 -0
- package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
- package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin.woff2 +0 -0
- package/dist/theme-packs/fjord/fonts/OFL.txt +94 -0
- package/dist/theme-packs/fjord/meta.json +37 -0
- package/dist/theme-packs/fjord/pack.css +375 -0
- package/dist/theme-packs/foundry/fonts/Inter-latin-ext.woff2 +0 -0
- package/dist/theme-packs/foundry/fonts/Inter-latin.woff2 +0 -0
- package/dist/theme-packs/foundry/fonts/OFL.txt +93 -0
- package/dist/theme-packs/foundry/meta.json +37 -0
- package/dist/theme-packs/foundry/pack.css +202 -0
- package/dist/theme-packs/futura-editorial/fonts/Jost-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/fonts/NotoSans-italic-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/fonts/NotoSans-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/fonts/OFL.txt +95 -0
- package/dist/theme-packs/futura-editorial/fonts/SpaceMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/fonts/SpaceMono-700-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/meta.json +38 -0
- package/dist/theme-packs/futura-editorial/pack.css +313 -0
- package/dist/theme-packs/hearth/fonts/Fraunces-italic-latin.woff2 +0 -0
- package/dist/theme-packs/hearth/fonts/Fraunces-latin.woff2 +0 -0
- package/dist/theme-packs/hearth/fonts/Nunito-latin.woff2 +0 -0
- package/dist/theme-packs/hearth/fonts/OFL.txt +95 -0
- package/dist/theme-packs/hearth/fonts/SplineSansMono-latin.woff2 +0 -0
- package/dist/theme-packs/hearth/meta.json +38 -0
- package/dist/theme-packs/hearth/pack.css +385 -0
- package/dist/theme-packs/hollow/fonts/OFL.txt +94 -0
- package/dist/theme-packs/hollow/fonts/SpaceGrotesk-latin.woff2 +0 -0
- package/dist/theme-packs/hollow/fonts/SpaceMono-400-italic-latin.woff2 +0 -0
- package/dist/theme-packs/hollow/fonts/SpaceMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/hollow/fonts/SpaceMono-700-latin.woff2 +0 -0
- package/dist/theme-packs/hollow/meta.json +37 -0
- package/dist/theme-packs/hollow/pack.css +428 -0
- package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext-italic.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-italic.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/CrimsonPro-latin.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/OFL.txt +94 -0
- package/dist/theme-packs/ledger/meta.json +37 -0
- package/dist/theme-packs/ledger/pack.css +463 -0
- package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin-ext.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/EBGaramond-latin-italic.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/EBGaramond-latin.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/OFL.txt +94 -0
- package/dist/theme-packs/manuscript/meta.json +37 -0
- package/dist/theme-packs/manuscript/pack.css +376 -0
- package/dist/theme-packs/matcha/fonts/MPLUS1Code-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/fonts/OFL.txt +95 -0
- package/dist/theme-packs/matcha/fonts/ShipporiMincho-500-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/fonts/ShipporiMincho-700-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/meta.json +38 -0
- package/dist/theme-packs/matcha/pack.css +409 -0
- package/dist/theme-packs/nocturne/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/CormorantGaramond-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/IBMPlexMono-italic-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/Manrope-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/OFL.txt +95 -0
- package/dist/theme-packs/nocturne/meta.json +38 -0
- package/dist/theme-packs/nocturne/pack.css +502 -0
- package/dist/theme-packs/observatory/fonts/JosefinSans-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/Jost-italic-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/Jost-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/OFL.txt +95 -0
- package/dist/theme-packs/observatory/fonts/SpaceMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/SpaceMono-700-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/SpaceMono-italic-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/meta.json +38 -0
- package/dist/theme-packs/observatory/pack.css +728 -0
- package/dist/theme-packs/onyx/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/CormorantGaramond-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/Jost-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/OFL.txt +95 -0
- package/dist/theme-packs/onyx/meta.json +38 -0
- package/dist/theme-packs/onyx/pack.css +497 -0
- package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
- package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin.woff2 +0 -0
- package/dist/theme-packs/phosphor/fonts/OFL.txt +94 -0
- package/dist/theme-packs/phosphor/fonts/VT323-latin-ext.woff2 +0 -0
- package/dist/theme-packs/phosphor/fonts/VT323-latin.woff2 +0 -0
- package/dist/theme-packs/phosphor/meta.json +38 -0
- package/dist/theme-packs/phosphor/pack.css +493 -0
- package/dist/theme-packs/solar/fonts/OFL.txt +94 -0
- package/dist/theme-packs/solar/fonts/SourceCodePro-italic-latin.woff2 +0 -0
- package/dist/theme-packs/solar/fonts/SourceCodePro-latin.woff2 +0 -0
- package/dist/theme-packs/solar/fonts/SourceSans3-italic-latin.woff2 +0 -0
- package/dist/theme-packs/solar/fonts/SourceSans3-latin.woff2 +0 -0
- package/dist/theme-packs/solar/meta.json +37 -0
- package/dist/theme-packs/solar/pack.css +380 -0
- package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/OFL.txt +95 -0
- package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-600-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-700-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-800-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/meta.json +38 -0
- package/dist/theme-packs/sumi/pack.css +502 -0
- package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-600-latin.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/Inter-latin-ext.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/Inter-latin.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/InterTight-latin.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/OFL.txt +95 -0
- package/dist/theme-packs/swissgrid/meta.json +38 -0
- package/dist/theme-packs/swissgrid/pack.css +518 -0
- package/dist/theme-packs/washi/fonts/MPlus1Code-400-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/MPlus1Code-500-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/OFL.txt +95 -0
- package/dist/theme-packs/washi/fonts/ShipporiMincho-500-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ShipporiMincho-600-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ShipporiMincho-700-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-700-latin.woff2 +0 -0
- package/dist/theme-packs/washi/meta.json +38 -0
- package/dist/theme-packs/washi/pack.css +479 -0
- package/dist/theme-packs-registry/index.d.ts +5 -0
- package/dist/theme-packs-registry/index.js +30 -0
- package/dist/theme-packs-registry/load-registry.d.ts +23 -0
- package/dist/theme-packs-registry/load-registry.js +64 -0
- package/dist/theme-packs-registry/meta-schema.d.ts +70 -0
- package/dist/theme-packs-registry/meta-schema.js +38 -0
- package/dist/theme-packs-registry/resolve-enabled-packs.d.ts +25 -0
- package/dist/theme-packs-registry/resolve-enabled-packs.js +43 -0
- package/dist/theme-packs-registry/token-manifest.d.ts +19 -0
- package/dist/theme-packs-registry/token-manifest.js +57 -0
- package/dist/theme-packs-registry/validator.d.ts +35 -0
- package/dist/theme-packs-registry/validator.js +284 -0
- package/dist/theme-toggle/color-scheme-sync.d.ts +2 -4
- package/dist/theme.css +319 -0
- package/dist/versions-page/index.d.ts +2 -2
- package/dist/versions-page/index.js +8 -8
- package/dist/z-index-defaults/index.d.ts +45 -0
- package/dist/z-index-defaults/index.js +34 -0
- package/eject/breadcrumb/breadcrumb.tsx +4 -4
- package/eject/breadcrumb/find-path.ts +2 -2
- package/eject/breadcrumb/index.ts +1 -1
- package/eject/breadcrumb/types.ts +0 -6
- package/eject/code-group/index.tsx +2 -2
- package/eject/doc-history/index.tsx +1 -1
- package/eject/doc-pager/index.tsx +1 -1
- package/eject/footer/footer.tsx +1 -0
- package/eject/header/header.tsx +86 -21
- package/eject/header/index.ts +3 -0
- package/eject/header/types.ts +39 -1
- package/eject/site-tree-nav-island/index.tsx +15 -3
- package/eject/site-tree-nav-island/state.ts +9 -0
- package/eject/theme-toggle/color-scheme-sync.ts +2 -4
- package/package.json +82 -29
- package/routes-src/404.tsx +4 -1
- package/routes-src/_chrome.tsx +31 -8
- package/routes-src/_context.ts +4 -0
- package/routes-src/_docs-helpers.ts +9 -29
- package/routes-src/_virtual.d.ts +38 -2
- package/tsconfig.base.json +29 -0
- package/virtual-modules.d.ts +83 -0
- package/zfb-config-shim.d.ts +210 -0
- package/dist/integrations/llms-txt/index.d.ts +0 -33
- package/dist/theme/color-tweak-export-modal.d.ts +0 -16
- package/dist/theme/color-tweak-export-modal.js +0 -138
- package/dist/theme/design-token-serde.d.ts +0 -183
- package/dist/theme/design-token-serde.js +0 -346
- package/dist/theme/design-token-types.d.ts +0 -13
- package/dist/theme/design-token-types.js +0 -6
- package/dist/theme/iframe-bridge.d.ts +0 -42
- package/dist/theme/iframe-bridge.js +0 -72
- /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.js +0 -0
- /package/dist/{integrations → plugins/internal}/claude-resources/generate.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/claude-resources/generate.js +0 -0
- /package/dist/{integrations → plugins/internal}/doc-history/pre-build.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/emit.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/emit.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/generate.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/generate.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/index.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/types.js +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/build-emitter.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/build-emitter.js +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/collect.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.js +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/index.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/index.js +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/types.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/types.js +0 -0
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@takazudo/zudo-doc/config` — the single-entry config API (epic
|
|
3
|
+
* zudolab/zudo-doc#2651, Wave 4 #2657).
|
|
4
|
+
*
|
|
5
|
+
* A generated project's ENTIRE configuration is:
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* // zfb.config.ts — the one config file
|
|
9
|
+
* import { defineConfig } from "zfb/config";
|
|
10
|
+
* import { zudoDoc } from "@takazudo/zudo-doc/config";
|
|
11
|
+
*
|
|
12
|
+
* export default defineConfig(zudoDoc({
|
|
13
|
+
* siteName: "My Docs",
|
|
14
|
+
* // …only the fields you chose; everything has a documented @default.
|
|
15
|
+
* }));
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* `zudoDoc()` SHALLOW-merges the user's fields over {@link DEFAULT_SETTINGS} —
|
|
19
|
+
* top-level fields only (`{ ...DEFAULT_SETTINGS, ...user }`). A supplied nested
|
|
20
|
+
* object (e.g. `colorMode`, `metaTags`) REPLACES the default wholesale; it is
|
|
21
|
+
* NOT deep-merged key-by-key. This is safe because every nested config type is
|
|
22
|
+
* all-required-fields, so a caller supplying one supplies all of its fields.
|
|
23
|
+
* `zudoDoc()` also supplies the Wave-3 package defaults
|
|
24
|
+
* (`buildDocsSchema`/`directiveVocabulary`/`translations`/`colorSchemes`/tag
|
|
25
|
+
* vocabulary) unless overridden, and returns a **complete `ZfbConfig`** — the
|
|
26
|
+
* host spreads nothing.
|
|
27
|
+
*
|
|
28
|
+
* ──────────────────────────────────────────────────────────────────────────
|
|
29
|
+
* COMPOSITION MECHANISM (locked, #2653): JS object composition — NOT zfb-native
|
|
30
|
+
* `presets:`. `zudoDoc()` builds the full `ZfbConfig` in JS and returns it
|
|
31
|
+
* complete; the returned object carries **no `presets` field**. `zudoDocPreset()`
|
|
32
|
+
* stays the internal fragment builder this calls (still exported at
|
|
33
|
+
* `@takazudo/zudo-doc/preset` as an advanced escape hatch); its
|
|
34
|
+
* collections/plugins/markdown logic is NOT reimplemented here.
|
|
35
|
+
*
|
|
36
|
+
* ──────────────────────────────────────────────────────────────────────────
|
|
37
|
+
* NODE-BUILTIN-FREE EVAL GRAPH (non-negotiable — guarded by a unit test)
|
|
38
|
+
* ──────────────────────────────────────────────────────────────────────────
|
|
39
|
+
* zfb evaluates the config module through esbuild with `--platform=neutral`
|
|
40
|
+
* (mirrors zfb's `loader.rs:277`); a transitive `node:*` import fails the load.
|
|
41
|
+
* `zudoDoc()` is the new central node in that eval graph — it transitively pulls
|
|
42
|
+
* in `preset.ts` plus every #2654 default module — so this module and all of
|
|
43
|
+
* them MUST stay free of `node:*` builtins. `zod` is the only allowed runtime
|
|
44
|
+
* dependency on this path (a required peer). The `ZfbConfig`/`BundleConfig`
|
|
45
|
+
* imports from `@takazudo/zfb/config` are **type-only** (erased before esbuild
|
|
46
|
+
* resolution), so they add nothing to the eval graph. The guard lives in
|
|
47
|
+
* `src/__tests__/foundation-eval-graph.test.ts` (`config.ts` is in
|
|
48
|
+
* `NODE_FREE_MODULES`).
|
|
49
|
+
*
|
|
50
|
+
* ──────────────────────────────────────────────────────────────────────────
|
|
51
|
+
* SERIALIZABILITY SPLIT
|
|
52
|
+
* ──────────────────────────────────────────────────────────────────────────
|
|
53
|
+
* The non-serializable / data overrides (`buildDocsSchema` fn, `colorSchemes`,
|
|
54
|
+
* `translations`, `directives`, `tagVocabularyEntries`) and the shell fields
|
|
55
|
+
* (`port`/`adapter`/`bundle`) are peeled off `user` up front so they never leak
|
|
56
|
+
* into the merged `settings` object — only clean, JSON-serializable settings
|
|
57
|
+
* ride into the routes plugin's virtual-module payload (exactly as
|
|
58
|
+
* `zudoDocPreset()` does today). The function-valued/data overrides travel the
|
|
59
|
+
* import-graph side (passed as `zudoDocPreset()` arguments, not serialized).
|
|
60
|
+
*/
|
|
61
|
+
import type { ZfbConfig, BundleConfig } from "@takazudo/zfb/config";
|
|
62
|
+
import type { ZodType } from "zod";
|
|
63
|
+
import type { DirectiveVocabulary, PresetTranslations, PresetTagVocabularyEntry } from "./preset.js";
|
|
64
|
+
import type { ColorScheme } from "./color-scheme-utils.js";
|
|
65
|
+
import type { Settings, ColorModeConfig, LocaleConfig, MetaTagsConfig, SiteHeadConfig, TagPlacement, TagGovernanceMode, VersionConfig, FooterConfig, HeaderNavItem, HeaderRightItem, FrontmatterPreviewConfig, BodyFootUtilAreaConfig, HtmlPreviewConfig } from "./settings.js";
|
|
66
|
+
/** The `settings.claudeResources` block (or `false` when disabled). */
|
|
67
|
+
type ClaudeResourcesConfig = {
|
|
68
|
+
claudeDir: string;
|
|
69
|
+
projectRoot?: string;
|
|
70
|
+
scanRoot?: string;
|
|
71
|
+
} | false;
|
|
72
|
+
export declare const DEFAULT_SETTINGS: Settings;
|
|
73
|
+
export interface ZudoDocConfig {
|
|
74
|
+
/**
|
|
75
|
+
* Active color scheme name (must exist in `colorSchemes`).
|
|
76
|
+
* @default "Default Dark"
|
|
77
|
+
*/
|
|
78
|
+
colorScheme?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Light/dark mode wiring, or `false` for a single fixed scheme.
|
|
81
|
+
* @default { defaultMode: "dark", lightScheme: "Default Light", darkScheme: "Default Dark", respectPrefersColorScheme: true }
|
|
82
|
+
*/
|
|
83
|
+
colorMode?: ColorModeConfig | false;
|
|
84
|
+
/**
|
|
85
|
+
* Site name shown in the header and metadata. The one field you almost
|
|
86
|
+
* always set.
|
|
87
|
+
* @default "Docs"
|
|
88
|
+
*/
|
|
89
|
+
siteName?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Site description used in metadata (`<meta name="description">`, llms.txt).
|
|
92
|
+
* @default ""
|
|
93
|
+
*/
|
|
94
|
+
siteDescription?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Public URL sub-path prefix mounted in front of every absolute asset URL
|
|
97
|
+
* (e.g. `"/pj/my-site/"`). `"/"` = root-mounted.
|
|
98
|
+
* @default "/"
|
|
99
|
+
*/
|
|
100
|
+
base?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Append a trailing `/` to extensionless internal hrefs.
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
trailingSlash?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Minify production HTML output from `zfb build`.
|
|
108
|
+
* @default true
|
|
109
|
+
*/
|
|
110
|
+
minifyHtml?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Directory (project-root-relative) holding the default-locale docs.
|
|
113
|
+
* @default "src/content/docs"
|
|
114
|
+
*/
|
|
115
|
+
docsDir?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Default locale code (unprefixed routes).
|
|
118
|
+
* @default "en"
|
|
119
|
+
*/
|
|
120
|
+
defaultLocale?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Additional locales: code → `{ label, dir }`. Each becomes a
|
|
123
|
+
* `/<code>/docs/…` route tree + `docs-<code>` collection.
|
|
124
|
+
* @default {}
|
|
125
|
+
*/
|
|
126
|
+
locales?: Record<string, LocaleConfig>;
|
|
127
|
+
/**
|
|
128
|
+
* Enable mermaid diagram rendering in markdown.
|
|
129
|
+
* @default true
|
|
130
|
+
*/
|
|
131
|
+
mermaid?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Add `noindex,nofollow` to every page (for internal docs).
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
noindex?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* "Edit this page" link base, or `false` to omit.
|
|
139
|
+
* @default false
|
|
140
|
+
*/
|
|
141
|
+
editUrl?: string | false;
|
|
142
|
+
/**
|
|
143
|
+
* GitHub repository URL shown in the header, or `false` to omit.
|
|
144
|
+
* @default false
|
|
145
|
+
*/
|
|
146
|
+
githubUrl?: string | false;
|
|
147
|
+
/**
|
|
148
|
+
* "owner/repo" — enables `#123` / SHA autolinks in markdown. Omit to disable.
|
|
149
|
+
* @default undefined
|
|
150
|
+
*/
|
|
151
|
+
githubAutolinksRepo?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Canonical site origin (e.g. `"https://example.com"`) for sitemap /
|
|
154
|
+
* canonical / og:url. Empty = not set.
|
|
155
|
+
* @default ""
|
|
156
|
+
*/
|
|
157
|
+
siteUrl?: string;
|
|
158
|
+
/**
|
|
159
|
+
* `<meta>` / OpenGraph / Twitter-card emission toggles.
|
|
160
|
+
* @default { description: true, keywords: false, ogImage: false, ogSiteName: true, twitterCard: false }
|
|
161
|
+
*/
|
|
162
|
+
metaTags?: MetaTagsConfig;
|
|
163
|
+
/**
|
|
164
|
+
* Site-wide custom `<head>` extras (preconnect / preload / stylesheets /
|
|
165
|
+
* meta / alternateLinks). Omit to emit nothing extra.
|
|
166
|
+
* @default undefined
|
|
167
|
+
*/
|
|
168
|
+
head?: SiteHeadConfig;
|
|
169
|
+
/**
|
|
170
|
+
* Emit a sitemap route.
|
|
171
|
+
* @default false
|
|
172
|
+
*/
|
|
173
|
+
sitemap?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Show the Created/Updated/Author meta block on doc pages.
|
|
176
|
+
* @default false
|
|
177
|
+
*/
|
|
178
|
+
docMetainfo?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Enable the `/docs/tags` + `/docs/tags/[tag]` tag index routes.
|
|
181
|
+
* @default false
|
|
182
|
+
*/
|
|
183
|
+
docTags?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Where per-page tags render relative to the content.
|
|
186
|
+
* @default "after-title"
|
|
187
|
+
*/
|
|
188
|
+
tagPlacement?: TagPlacement;
|
|
189
|
+
/**
|
|
190
|
+
* Tag-governance enforcement level when the vocabulary is consulted.
|
|
191
|
+
* @default "off"
|
|
192
|
+
*/
|
|
193
|
+
tagGovernance?: TagGovernanceMode;
|
|
194
|
+
/**
|
|
195
|
+
* Whether the canonical tag vocabulary is consulted at runtime (validation
|
|
196
|
+
* and grouped footer rendering). Orthogonal to `tagGovernance`.
|
|
197
|
+
* The vocabulary ENTRIES are supplied separately via `tagVocabularyEntries`.
|
|
198
|
+
* @default false
|
|
199
|
+
*/
|
|
200
|
+
tagVocabulary?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Emit an `llms.txt` route summarising the docs.
|
|
203
|
+
* @default false
|
|
204
|
+
*/
|
|
205
|
+
llmsTxt?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Changelog generation config(s), or `false` to disable.
|
|
208
|
+
* @default false
|
|
209
|
+
*/
|
|
210
|
+
changelogs?: Settings["changelogs"];
|
|
211
|
+
/**
|
|
212
|
+
* Enable KaTeX math rendering in markdown.
|
|
213
|
+
* @default false
|
|
214
|
+
*/
|
|
215
|
+
math?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Enable zfb's CJK-friendly line-break / emphasis handling.
|
|
218
|
+
* @default false
|
|
219
|
+
*/
|
|
220
|
+
cjkFriendly?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* What to do when a `.md`/`.mdx` link cannot be resolved.
|
|
223
|
+
* @default "warn"
|
|
224
|
+
*/
|
|
225
|
+
onBrokenMarkdownLinks?: "warn" | "error" | "ignore";
|
|
226
|
+
/**
|
|
227
|
+
* Enable the AI-chat assistant route (`/api/ai-chat`, SSR).
|
|
228
|
+
* @default false
|
|
229
|
+
*/
|
|
230
|
+
aiAssistant?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Short-circuit `/api/ai-chat` with a fixed "disabled" reply (no API key,
|
|
233
|
+
* KV/DO binding, or rate limiter touched).
|
|
234
|
+
* @default false
|
|
235
|
+
*/
|
|
236
|
+
aiChatDemoMode?: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Allowed CORS origins for `/api/ai-chat` when not in demo mode. Empty =
|
|
239
|
+
* block all cross-origin browser requests.
|
|
240
|
+
* @default []
|
|
241
|
+
*/
|
|
242
|
+
aiChatAllowedOrigins?: string[];
|
|
243
|
+
/**
|
|
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.
|
|
247
|
+
* @default false
|
|
248
|
+
*/
|
|
249
|
+
aiChatGlobalDailyLimit?: number | false;
|
|
250
|
+
/**
|
|
251
|
+
* Enable the interactive Design Token Panel (zdtp).
|
|
252
|
+
* @default false
|
|
253
|
+
*/
|
|
254
|
+
designTokenPanel?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Minimum heading depth included in the TOC (2–4).
|
|
257
|
+
* @default 2
|
|
258
|
+
*/
|
|
259
|
+
tocMinDepth?: number;
|
|
260
|
+
/**
|
|
261
|
+
* Maximum heading depth included in the TOC (2–4).
|
|
262
|
+
* @default 4
|
|
263
|
+
*/
|
|
264
|
+
tocMaxDepth?: number;
|
|
265
|
+
/**
|
|
266
|
+
* Enable the draggable sidebar resizer.
|
|
267
|
+
* @default false
|
|
268
|
+
*/
|
|
269
|
+
sidebarResizer?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* Enable the desktop sidebar collapse toggle.
|
|
272
|
+
* @default false
|
|
273
|
+
*/
|
|
274
|
+
sidebarToggle?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Enable click-to-enlarge for content images.
|
|
277
|
+
* @default false
|
|
278
|
+
*/
|
|
279
|
+
imageEnlarge?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Mount the `FindInPageInit` island (Cmd/Ctrl+F find bar). Self-gates on
|
|
282
|
+
* `window.__TAURI_INTERNALS__`, so it is a safe no-op outside a Tauri
|
|
283
|
+
* shell even when `true`.
|
|
284
|
+
* @default false
|
|
285
|
+
*/
|
|
286
|
+
findInPage?: boolean;
|
|
287
|
+
/**
|
|
288
|
+
* Enable the dynamic (view-transition) page-loading overlay.
|
|
289
|
+
* @default false
|
|
290
|
+
*/
|
|
291
|
+
dynamicPageTransition?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Frontmatter-preview config (ignore-key overrides), or `false` to disable
|
|
294
|
+
* the preview panel.
|
|
295
|
+
* @default false
|
|
296
|
+
*/
|
|
297
|
+
frontmatterPreview?: FrontmatterPreviewConfig | false;
|
|
298
|
+
/**
|
|
299
|
+
* Enable per-page git history (Created/Updated + dropdown).
|
|
300
|
+
* @default false
|
|
301
|
+
*/
|
|
302
|
+
docHistory?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* Body-foot utility area (doc-history / view-source), or `false` to disable.
|
|
305
|
+
* @default false
|
|
306
|
+
*/
|
|
307
|
+
bodyFootUtilArea?: BodyFootUtilAreaConfig | false;
|
|
308
|
+
/**
|
|
309
|
+
* Global HTML-preview sandbox config, or `undefined` to disable.
|
|
310
|
+
* @default undefined
|
|
311
|
+
*/
|
|
312
|
+
htmlPreview?: HtmlPreviewConfig | undefined;
|
|
313
|
+
/**
|
|
314
|
+
* Docs versions, or `false` for a single (unversioned) doc set.
|
|
315
|
+
* @default false
|
|
316
|
+
*/
|
|
317
|
+
versions?: VersionConfig[] | false;
|
|
318
|
+
/**
|
|
319
|
+
* Claude-resources ingestion config, or `false` to disable.
|
|
320
|
+
* @default false
|
|
321
|
+
*/
|
|
322
|
+
claudeResources?: ClaudeResourcesConfig;
|
|
323
|
+
/**
|
|
324
|
+
* Route prefixes served only in the default locale (never locale-prefixed).
|
|
325
|
+
* @default []
|
|
326
|
+
*/
|
|
327
|
+
defaultLocaleOnlyPrefixes?: string[];
|
|
328
|
+
/**
|
|
329
|
+
* Footer config (link columns / copyright / taglist), or `false` for no
|
|
330
|
+
* footer.
|
|
331
|
+
* @default false
|
|
332
|
+
*/
|
|
333
|
+
footer?: FooterConfig | false;
|
|
334
|
+
/**
|
|
335
|
+
* Primary header navigation items.
|
|
336
|
+
* @default []
|
|
337
|
+
*/
|
|
338
|
+
headerNav?: HeaderNavItem[];
|
|
339
|
+
/**
|
|
340
|
+
* Header right-hand-side items (toggles, switchers, links).
|
|
341
|
+
* @default [{ type: "component", component: "theme-toggle" }]
|
|
342
|
+
*/
|
|
343
|
+
headerRightItems?: HeaderRightItem[];
|
|
344
|
+
/**
|
|
345
|
+
* Build-time package-owned route injection. When `true`, doc routes are
|
|
346
|
+
* injected from the package (no project-shipped `pages/*.tsx` stubs needed).
|
|
347
|
+
* Set `false` only if your project ships its own doc-route stubs.
|
|
348
|
+
* @default true
|
|
349
|
+
*/
|
|
350
|
+
packageOwnedRoutes?: boolean;
|
|
351
|
+
/**
|
|
352
|
+
* Project-root-relative path to a host module exporting
|
|
353
|
+
* `chromeBindings: ChromeHostBindings` (only consumed when
|
|
354
|
+
* `packageOwnedRoutes` is on). Omit to keep the injected chrome shim at its
|
|
355
|
+
* package-default stubs.
|
|
356
|
+
* @default undefined
|
|
357
|
+
*/
|
|
358
|
+
chromeBindingsModule?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Project-root-relative path to a host module exporting a named
|
|
361
|
+
* `buildDesignTokenPanelConfig(mode: "light" | "dark")` zdtp `PanelConfig`
|
|
362
|
+
* builder (only consumed when `packageOwnedRoutes` is on, and only relevant
|
|
363
|
+
* when `designTokenPanel` is `true`). When omitted, the panel uses the
|
|
364
|
+
* package-default builder (`@takazudo/zudo-doc/design-token-panel-config`)
|
|
365
|
+
* — derived from the shipped token manifest and the bundled color schemes —
|
|
366
|
+
* so `designTokenPanel: true` works with no host config file. Point this at
|
|
367
|
+
* your own module only when you need a fully custom panel (your own token
|
|
368
|
+
* manifest, your own color schemes).
|
|
369
|
+
* @default undefined (package-default builder is used)
|
|
370
|
+
*/
|
|
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[];
|
|
393
|
+
/**
|
|
394
|
+
* Replace the default docs-frontmatter zod schema builder entirely. When
|
|
395
|
+
* omitted, `zudoDoc()` builds the default schema
|
|
396
|
+
* (`@takazudo/zudo-doc/docs-schema`), governance-aware from `tagGovernance`
|
|
397
|
+
* + `tagVocabularyEntries`.
|
|
398
|
+
* @default undefined (package default `buildDocsSchema` is used)
|
|
399
|
+
*/
|
|
400
|
+
buildDocsSchema?: () => ZodType;
|
|
401
|
+
/**
|
|
402
|
+
* Override the color-scheme palette map. When omitted, the two shipped
|
|
403
|
+
* schemes (`@takazudo/zudo-doc/color-schemes-defaults` — Default Light /
|
|
404
|
+
* Default Dark) are used.
|
|
405
|
+
* @default undefined (`defaultColorSchemes` is used)
|
|
406
|
+
*/
|
|
407
|
+
colorSchemes?: Record<string, ColorScheme>;
|
|
408
|
+
/**
|
|
409
|
+
* Override the UI-string translation table. When omitted, the shipped
|
|
410
|
+
* en/ja/de defaults (`@takazudo/zudo-doc/i18n-defaults`) are used.
|
|
411
|
+
* @default undefined (`defaultTranslations` is used)
|
|
412
|
+
*/
|
|
413
|
+
translations?: PresetTranslations;
|
|
414
|
+
/**
|
|
415
|
+
* Override the directive → JSX-component-name map (`markdown.features.directives`).
|
|
416
|
+
* When omitted, the canonical seven
|
|
417
|
+
* (`@takazudo/zudo-doc/directive-vocabulary-defaults`) are used.
|
|
418
|
+
* @default undefined (`defaultDirectiveVocabulary` is used)
|
|
419
|
+
*/
|
|
420
|
+
directives?: DirectiveVocabulary;
|
|
421
|
+
/**
|
|
422
|
+
* The tag-vocabulary ENTRIES array (distinct from the boolean `tagVocabulary`
|
|
423
|
+
* gate). Threaded into the route-context virtual module and consulted by the
|
|
424
|
+
* governance-aware default schema builder.
|
|
425
|
+
* @default []
|
|
426
|
+
*/
|
|
427
|
+
tagVocabularyEntries?: readonly PresetTagVocabularyEntry[];
|
|
428
|
+
/**
|
|
429
|
+
* Dev/preview server port.
|
|
430
|
+
* @default 4321
|
|
431
|
+
*/
|
|
432
|
+
port?: number;
|
|
433
|
+
/**
|
|
434
|
+
* Deploy-target adapter package name (e.g.
|
|
435
|
+
* `"@takazudo/zfb-adapter-cloudflare"`). Omit for a pure static build.
|
|
436
|
+
* @default undefined (pure static build)
|
|
437
|
+
*/
|
|
438
|
+
adapter?: string;
|
|
439
|
+
/**
|
|
440
|
+
* zfb bundler options (`exclude` / `mainFields` / `external`) — passed
|
|
441
|
+
* through verbatim when set.
|
|
442
|
+
* @default undefined
|
|
443
|
+
*/
|
|
444
|
+
bundle?: BundleConfig;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Build a complete `ZfbConfig` from user config, defaulting every field.
|
|
448
|
+
*
|
|
449
|
+
* ```ts
|
|
450
|
+
* export default defineConfig(zudoDoc({ siteName: "My Docs" }));
|
|
451
|
+
* ```
|
|
452
|
+
*
|
|
453
|
+
* @param user Partial config; every field has a documented default. See
|
|
454
|
+
* {@link ZudoDocConfig}.
|
|
455
|
+
* @returns A complete `ZfbConfig` — spread nothing; pass it straight to
|
|
456
|
+
* `defineConfig`.
|
|
457
|
+
*/
|
|
458
|
+
export declare function zudoDoc(user?: ZudoDocConfig): ZfbConfig;
|
|
459
|
+
export {};
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { zudoDocPreset } from "./preset.js";
|
|
2
|
+
import { buildDocsSchema as defaultBuildDocsSchema } from "./docs-schema/index.js";
|
|
3
|
+
import { defaultDirectiveVocabulary } from "./directive-vocabulary-defaults/index.js";
|
|
4
|
+
import { defaultTranslations } from "./i18n-defaults/index.js";
|
|
5
|
+
import { defaultColorSchemes } from "./color-schemes-defaults/index.js";
|
|
6
|
+
const DEFAULT_SETTINGS = {
|
|
7
|
+
colorScheme: "Default Dark",
|
|
8
|
+
colorMode: {
|
|
9
|
+
defaultMode: "dark",
|
|
10
|
+
lightScheme: "Default Light",
|
|
11
|
+
darkScheme: "Default Dark",
|
|
12
|
+
respectPrefersColorScheme: true
|
|
13
|
+
},
|
|
14
|
+
siteName: "Docs",
|
|
15
|
+
siteDescription: "",
|
|
16
|
+
base: "/",
|
|
17
|
+
trailingSlash: false,
|
|
18
|
+
minifyHtml: true,
|
|
19
|
+
docsDir: "src/content/docs",
|
|
20
|
+
defaultLocale: "en",
|
|
21
|
+
locales: {},
|
|
22
|
+
mermaid: true,
|
|
23
|
+
noindex: false,
|
|
24
|
+
editUrl: false,
|
|
25
|
+
githubUrl: false,
|
|
26
|
+
siteUrl: "",
|
|
27
|
+
metaTags: {
|
|
28
|
+
description: true,
|
|
29
|
+
keywords: false,
|
|
30
|
+
ogImage: false,
|
|
31
|
+
ogSiteName: true,
|
|
32
|
+
twitterCard: false
|
|
33
|
+
},
|
|
34
|
+
sitemap: false,
|
|
35
|
+
docMetainfo: false,
|
|
36
|
+
docTags: false,
|
|
37
|
+
tagPlacement: "after-title",
|
|
38
|
+
tagGovernance: "off",
|
|
39
|
+
tagVocabulary: false,
|
|
40
|
+
llmsTxt: false,
|
|
41
|
+
changelogs: false,
|
|
42
|
+
math: false,
|
|
43
|
+
cjkFriendly: false,
|
|
44
|
+
onBrokenMarkdownLinks: "warn",
|
|
45
|
+
aiAssistant: false,
|
|
46
|
+
aiChatDemoMode: false,
|
|
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.
|
|
50
|
+
aiChatGlobalDailyLimit: false,
|
|
51
|
+
designTokenPanel: false,
|
|
52
|
+
tocMinDepth: 2,
|
|
53
|
+
tocMaxDepth: 4,
|
|
54
|
+
sidebarResizer: false,
|
|
55
|
+
sidebarToggle: false,
|
|
56
|
+
imageEnlarge: false,
|
|
57
|
+
findInPage: false,
|
|
58
|
+
dynamicPageTransition: false,
|
|
59
|
+
frontmatterPreview: false,
|
|
60
|
+
docHistory: false,
|
|
61
|
+
bodyFootUtilArea: false,
|
|
62
|
+
htmlPreview: void 0,
|
|
63
|
+
versions: false,
|
|
64
|
+
claudeResources: false,
|
|
65
|
+
defaultLocaleOnlyPrefixes: [],
|
|
66
|
+
footer: false,
|
|
67
|
+
headerNav: [],
|
|
68
|
+
headerRightItems: [{ type: "component", component: "theme-toggle" }],
|
|
69
|
+
packageOwnedRoutes: true,
|
|
70
|
+
themePack: "default",
|
|
71
|
+
themePackSwitcher: false,
|
|
72
|
+
themePacks: void 0
|
|
73
|
+
};
|
|
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
|
+
}
|
|
80
|
+
const {
|
|
81
|
+
port,
|
|
82
|
+
adapter,
|
|
83
|
+
bundle,
|
|
84
|
+
buildDocsSchema: userBuildDocsSchema,
|
|
85
|
+
colorSchemes: userColorSchemes,
|
|
86
|
+
translations: userTranslations,
|
|
87
|
+
directives: userDirectives,
|
|
88
|
+
tagVocabularyEntries: userTagVocabularyEntries,
|
|
89
|
+
...settingsOverrides
|
|
90
|
+
} = user;
|
|
91
|
+
const settings = { ...DEFAULT_SETTINGS, ...settingsOverrides };
|
|
92
|
+
const fragment = zudoDocPreset({
|
|
93
|
+
settings,
|
|
94
|
+
buildDocsSchema: userBuildDocsSchema ?? (() => defaultBuildDocsSchema({
|
|
95
|
+
tagGovernance: settings.tagGovernance,
|
|
96
|
+
tagVocabulary: userTagVocabularyEntries
|
|
97
|
+
})),
|
|
98
|
+
directiveVocabulary: userDirectives ?? defaultDirectiveVocabulary,
|
|
99
|
+
translations: userTranslations ?? defaultTranslations,
|
|
100
|
+
colorSchemes: userColorSchemes ?? defaultColorSchemes,
|
|
101
|
+
tagVocabulary: userTagVocabularyEntries ?? []
|
|
102
|
+
});
|
|
103
|
+
return {
|
|
104
|
+
// ── Host-owned shell fields ──────────────────────────────────────────
|
|
105
|
+
framework: "preact",
|
|
106
|
+
port: port ?? 4321,
|
|
107
|
+
tailwind: { enabled: true },
|
|
108
|
+
base: settings.base,
|
|
109
|
+
...adapter ? { adapter } : {},
|
|
110
|
+
...bundle ? { bundle } : {},
|
|
111
|
+
// ── Preset-owned fields (collections, plugins, markdown, …) ──────────
|
|
112
|
+
...fragment,
|
|
113
|
+
// The preset's `markdown.features` intentionally uses the loose Record
|
|
114
|
+
// shape (the exact shape zfb's config shim binds against); the engine's
|
|
115
|
+
// strict `MarkdownFeaturesConfig` is a structural subset of it. Every
|
|
116
|
+
// other preset field type-checks against `ZfbConfig` directly, so only
|
|
117
|
+
// `markdown` needs this single documented bridge — `satisfies ZfbConfig`
|
|
118
|
+
// below keeps full strict checking on all the rest.
|
|
119
|
+
markdown: fragment.markdown
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export {
|
|
123
|
+
DEFAULT_SETTINGS,
|
|
124
|
+
zudoDoc
|
|
125
|
+
};
|
|
@@ -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
|
|
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
|
};
|
package/dist/content/index.d.ts
CHANGED
|
@@ -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 {
|
|
29
|
+
export { defaultComponents } from "./component-map.js";
|
package/dist/content/index.js
CHANGED
|
@@ -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 {
|
|
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 `
|
|
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
|