@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
|
@@ -14,11 +14,10 @@ import type { BuildSidebarTreeOptions, CollectionEntryLike, SidebarFrontmatter,
|
|
|
14
14
|
* Build a recursive sidebar tree from `entries`. Visibility filtering is
|
|
15
15
|
* applied first; the resulting structure mirrors the filesystem.
|
|
16
16
|
*
|
|
17
|
-
* - Multi-segment
|
|
17
|
+
* - Multi-segment slugs (e.g. `getting-started/intro`) walk the tree creating
|
|
18
18
|
* intermediate category nodes as needed.
|
|
19
|
-
* -
|
|
20
|
-
*
|
|
21
|
-
* `getting-started`).
|
|
19
|
+
* - A trailing `/index` represents a category index page and is stripped from
|
|
20
|
+
* the canonical route slug.
|
|
22
21
|
* - Sibling order is determined by `sidebar_position` then alphabetical
|
|
23
22
|
* slug, with the parent's `sortOrder` (from `_category_.json`) flipping
|
|
24
23
|
* the comparator when set to `"desc"`.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
function toRouteSlug(
|
|
2
|
-
|
|
1
|
+
function toRouteSlug(slug) {
|
|
2
|
+
if (slug === "index") return "";
|
|
3
|
+
return slug.replace(/\/index$/, "");
|
|
3
4
|
}
|
|
4
5
|
function toTitleCase(str) {
|
|
5
6
|
return str.split("-").map((word) => word.length === 0 ? word : word[0].toUpperCase() + word.slice(1)).join(" ");
|
|
@@ -24,7 +25,7 @@ function buildSidebarTree(entries, locale, options = {}) {
|
|
|
24
25
|
};
|
|
25
26
|
for (const entry of entries) {
|
|
26
27
|
if (!isNavVisible(entry)) continue;
|
|
27
|
-
const slug = entry.data.slug ??
|
|
28
|
+
const slug = entry.data.slug ?? toRouteSlug(entry.slug);
|
|
28
29
|
if (!slug) continue;
|
|
29
30
|
const parts = slug.split("/");
|
|
30
31
|
if (parts.length <= 1) {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* type SidebarNode,
|
|
10
10
|
* } from "@takazudo/zudo-doc/sidebar-tree";
|
|
11
11
|
*
|
|
12
|
-
* The builder takes a flat list of
|
|
13
|
-
*
|
|
12
|
+
* The builder takes a flat list of current zfb collection entries plus a
|
|
13
|
+
* locale, and emits a recursive `SidebarNode[]`
|
|
14
14
|
* suitable for rendering or for further sidebar-config processing.
|
|
15
15
|
*/
|
|
16
16
|
export { buildSidebarTree, findSidebarNode, flattenSidebarTree, } from "./build-tree.js";
|
|
@@ -24,7 +24,7 @@ export interface SidebarFrontmatter {
|
|
|
24
24
|
standalone?: boolean;
|
|
25
25
|
/**
|
|
26
26
|
* Optional override for the route slug. When omitted, the builder derives
|
|
27
|
-
* the slug from the entry's
|
|
27
|
+
* the route slug from the entry's zfb slug (stripping a trailing `/index`).
|
|
28
28
|
*/
|
|
29
29
|
slug?: string;
|
|
30
30
|
/**
|
|
@@ -43,27 +43,16 @@ export interface SidebarFrontmatter {
|
|
|
43
43
|
category_sort_order?: "asc" | "desc";
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* Minimum
|
|
47
|
-
* structural superset of both Astro's `CollectionEntry` and zfb's
|
|
48
|
-
* `CollectionEntry<T>` so callers can pass either through unchanged.
|
|
46
|
+
* Minimum current zfb collection-entry shape required by the builder.
|
|
49
47
|
*/
|
|
50
48
|
export interface CollectionEntryLike<T extends SidebarFrontmatter = SidebarFrontmatter> {
|
|
51
49
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* convention is to put the cleaned slug here too — either form is fine
|
|
55
|
-
* because the builder strips a trailing `/index`.
|
|
50
|
+
* Filename without the extension. Canonical route identity is derived by
|
|
51
|
+
* stripping the root or nested `index` suffix.
|
|
56
52
|
*/
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Optional pre-computed slug. When present it wins over the id-derived
|
|
60
|
-
* value. zfb entries always populate this field; Astro callers can leave
|
|
61
|
-
* it undefined.
|
|
62
|
-
*/
|
|
63
|
-
slug?: string;
|
|
53
|
+
slug: string;
|
|
64
54
|
data: T;
|
|
65
|
-
/**
|
|
66
|
-
collection?: string;
|
|
55
|
+
/** Other native zfb fields are accepted structurally and never read here. */
|
|
67
56
|
body?: string;
|
|
68
57
|
}
|
|
69
58
|
/**
|
|
@@ -4,8 +4,10 @@ export interface SiteTreeNavProps {
|
|
|
4
4
|
ariaLabel?: string;
|
|
5
5
|
categoryOrder?: string[];
|
|
6
6
|
categoryIgnore?: string[];
|
|
7
|
+
/** Root-category slugs that should start collapsed. */
|
|
8
|
+
initiallyCollapsedCategorySlugs?: string[];
|
|
7
9
|
}
|
|
8
|
-
export declare function SiteTreeNav({ tree, ariaLabel, categoryOrder, categoryIgnore, }: SiteTreeNavProps): import("preact").JSX.Element;
|
|
10
|
+
export declare function SiteTreeNav({ tree, ariaLabel, categoryOrder, categoryIgnore, initiallyCollapsedCategorySlugs, }: SiteTreeNavProps): import("preact").JSX.Element;
|
|
9
11
|
export declare namespace SiteTreeNav {
|
|
10
12
|
var displayName: string;
|
|
11
13
|
}
|
|
@@ -3,6 +3,7 @@ import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
|
3
3
|
import { useState } from "preact/hooks";
|
|
4
4
|
import { INDENT, connectorLeft, ConnectorLines, CategoryLinkIcon } from "../tree-nav-shared/index.js";
|
|
5
5
|
import { ChevronRight } from "../icons/index.js";
|
|
6
|
+
import { initialCategoryOpenState, toggleCategoryOpenState } from "./state.js";
|
|
6
7
|
const SITE_BASE_PAD = "clamp(0.5rem, 0.8vw, 1rem)";
|
|
7
8
|
function padLeft(depth) {
|
|
8
9
|
if (depth === 0) return SITE_BASE_PAD;
|
|
@@ -27,7 +28,8 @@ function SiteTreeNav({
|
|
|
27
28
|
tree,
|
|
28
29
|
ariaLabel = "Site index",
|
|
29
30
|
categoryOrder,
|
|
30
|
-
categoryIgnore
|
|
31
|
+
categoryIgnore,
|
|
32
|
+
initiallyCollapsedCategorySlugs
|
|
31
33
|
}) {
|
|
32
34
|
let processedTree = tree;
|
|
33
35
|
if (categoryIgnore) {
|
|
@@ -37,6 +39,7 @@ function SiteTreeNav({
|
|
|
37
39
|
if (categoryOrder) {
|
|
38
40
|
processedTree = reorderTree(processedTree, categoryOrder);
|
|
39
41
|
}
|
|
42
|
+
const initiallyCollapsed = new Set(initiallyCollapsedCategorySlugs);
|
|
40
43
|
return /* @__PURE__ */ jsx(
|
|
41
44
|
"nav",
|
|
42
45
|
{
|
|
@@ -46,7 +49,15 @@ function SiteTreeNav({
|
|
|
46
49
|
style: {
|
|
47
50
|
gridTemplateColumns: "repeat(auto-fill, minmax(min(18rem, 100%), 1fr))"
|
|
48
51
|
},
|
|
49
|
-
children: processedTree.map((node) => /* @__PURE__ */ jsx("div", { className: "min-w-0 border border-muted pl-hsp-sm py-vsp-2xs", children: node.children.length > 0 ? /* @__PURE__ */ jsx(
|
|
52
|
+
children: processedTree.map((node) => /* @__PURE__ */ jsx("div", { className: "min-w-0 border border-muted pl-hsp-sm py-vsp-2xs", children: node.children.length > 0 ? /* @__PURE__ */ jsx(
|
|
53
|
+
CategoryNode,
|
|
54
|
+
{
|
|
55
|
+
node,
|
|
56
|
+
depth: 0,
|
|
57
|
+
isLast: true,
|
|
58
|
+
initiallyCollapsed: initiallyCollapsed.has(node.slug)
|
|
59
|
+
}
|
|
60
|
+
) : /* @__PURE__ */ jsx(LeafNode, { node, depth: 0, isLast: true }) }, node.slug))
|
|
50
61
|
}
|
|
51
62
|
);
|
|
52
63
|
}
|
|
@@ -76,10 +87,11 @@ function NodeList({ nodes, depth }) {
|
|
|
76
87
|
function CategoryNode({
|
|
77
88
|
node,
|
|
78
89
|
depth,
|
|
79
|
-
isLast
|
|
90
|
+
isLast,
|
|
91
|
+
initiallyCollapsed = false
|
|
80
92
|
}) {
|
|
81
|
-
const [open, setOpen] = useState(
|
|
82
|
-
const toggle = () => setOpen(
|
|
93
|
+
const [open, setOpen] = useState(() => initialCategoryOpenState(initiallyCollapsed));
|
|
94
|
+
const toggle = () => setOpen(toggleCategoryOpenState);
|
|
83
95
|
const paddingLeft = padLeft(depth);
|
|
84
96
|
return /* @__PURE__ */ jsxs("div", { className: `${depth >= 1 && !isLast ? "relative" : ""}`, children: [
|
|
85
97
|
depth >= 1 && !isLast && open && /* @__PURE__ */ jsx(
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Derive the one-time open state used when a category mounts. */
|
|
2
|
+
export declare function initialCategoryOpenState(initiallyCollapsed: boolean): boolean;
|
|
3
|
+
/** Toggle a mounted category without coupling later state to its initial input. */
|
|
4
|
+
export declare function toggleCategoryOpenState(open: boolean): boolean;
|
|
@@ -2,11 +2,9 @@ import type { TagVocabularyEntry, TagGovernanceMode } from "../settings.js";
|
|
|
2
2
|
export type { TagVocabularyEntry, TagGovernanceMode };
|
|
3
3
|
/** Result of resolving a raw tag string. */
|
|
4
4
|
export interface ResolvedTag {
|
|
5
|
-
/**
|
|
5
|
+
/** Exact canonical id, or the raw input when it is unknown/inactive. */
|
|
6
6
|
canonical: string;
|
|
7
|
-
/** True when the
|
|
8
|
-
deprecated: boolean;
|
|
9
|
-
/** True when the raw input matched a vocabulary entry (as id or alias). */
|
|
7
|
+
/** True when the raw input exactly matched a vocabulary id. */
|
|
10
8
|
known: boolean;
|
|
11
9
|
}
|
|
12
10
|
/**
|
|
@@ -17,20 +15,15 @@ export interface ResolvedTag {
|
|
|
17
15
|
*
|
|
18
16
|
* When the vocabulary is inactive (`tagVocabulary` is empty/falsy or
|
|
19
17
|
* `tagGovernance` is `"off"`), the raw value passes through unchanged with
|
|
20
|
-
* `known: false
|
|
18
|
+
* `known: false`. Otherwise:
|
|
21
19
|
*
|
|
22
|
-
* -
|
|
23
|
-
* - An alias match returns the aliased entry's id.
|
|
24
|
-
* - `deprecated: { redirect: "<id>" }` rewrites to the redirect target.
|
|
25
|
-
* - `deprecated: true` (no redirect) returns `deprecated: true` so callers
|
|
26
|
-
* can drop the tag from aggregation.
|
|
20
|
+
* - An exact id match returns that id with `known: true`.
|
|
27
21
|
* - An unknown value returns the raw string with `known: false`.
|
|
28
22
|
*/
|
|
29
23
|
export declare function resolveTag(raw: string, tagVocabulary: readonly TagVocabularyEntry[] | false | undefined, tagGovernance: TagGovernanceMode | undefined): ResolvedTag;
|
|
30
24
|
/**
|
|
31
|
-
* Resolve a list of raw tag strings (e.g. from frontmatter)
|
|
32
|
-
*
|
|
33
|
-
* produced by alias collapse are removed.
|
|
25
|
+
* Resolve a list of raw tag strings (e.g. from frontmatter), preserving order
|
|
26
|
+
* and removing exact duplicates. Unknown strings pass through unchanged.
|
|
34
27
|
*
|
|
35
28
|
* Builds the vocabulary index once and reuses it for all tags — O(N) index
|
|
36
29
|
* construction instead of O(N×M) when called with M tags.
|
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
function buildIndex(tagVocabulary) {
|
|
2
|
-
|
|
3
|
-
const byAlias = /* @__PURE__ */ new Map();
|
|
4
|
-
for (const entry of tagVocabulary) {
|
|
5
|
-
byId.set(entry.id, entry);
|
|
6
|
-
for (const alias of entry.aliases ?? []) byAlias.set(alias, entry);
|
|
7
|
-
}
|
|
8
|
-
return { byId, byAlias };
|
|
2
|
+
return new Set(tagVocabulary.map((entry) => entry.id));
|
|
9
3
|
}
|
|
10
|
-
function resolveTagWithIndex(raw,
|
|
11
|
-
|
|
12
|
-
if (!entry) return { canonical: raw, deprecated: false, known: false };
|
|
13
|
-
const dep = entry.deprecated;
|
|
14
|
-
if (dep && typeof dep === "object" && dep.redirect) {
|
|
15
|
-
const target = index.byId.get(dep.redirect);
|
|
16
|
-
if (target) return { canonical: target.id, deprecated: false, known: true };
|
|
17
|
-
return { canonical: entry.id, deprecated: true, known: true };
|
|
18
|
-
}
|
|
19
|
-
if (dep === true) {
|
|
20
|
-
return { canonical: entry.id, deprecated: true, known: true };
|
|
21
|
-
}
|
|
22
|
-
return { canonical: entry.id, deprecated: false, known: true };
|
|
4
|
+
function resolveTagWithIndex(raw, ids) {
|
|
5
|
+
return { canonical: raw, known: ids.has(raw) };
|
|
23
6
|
}
|
|
24
7
|
function resolveTag(raw, tagVocabulary, tagGovernance) {
|
|
25
8
|
if (!tagVocabulary || tagGovernance === "off") {
|
|
26
|
-
return { canonical: raw,
|
|
9
|
+
return { canonical: raw, known: false };
|
|
27
10
|
}
|
|
28
11
|
return resolveTagWithIndex(raw, buildIndex(tagVocabulary));
|
|
29
12
|
}
|
|
@@ -40,8 +23,7 @@ function resolvePageTags(rawTags, tagVocabulary, tagGovernance) {
|
|
|
40
23
|
}
|
|
41
24
|
const index = buildIndex(tagVocabulary);
|
|
42
25
|
for (const raw of rawTags) {
|
|
43
|
-
const { canonical
|
|
44
|
-
if (deprecated) continue;
|
|
26
|
+
const { canonical } = resolveTagWithIndex(raw, index);
|
|
45
27
|
if (seen.has(canonical)) continue;
|
|
46
28
|
seen.add(canonical);
|
|
47
29
|
out.push(canonical);
|
|
@@ -3,20 +3,9 @@
|
|
|
3
3
|
import type { ComponentChildren, JSX } from "preact";
|
|
4
4
|
import type { ChromeContext } from "../factory-context/index.js";
|
|
5
5
|
import type { Settings } from "../settings.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
data: {
|
|
10
|
-
slug?: string;
|
|
11
|
-
draft?: boolean;
|
|
12
|
-
unlisted?: boolean;
|
|
13
|
-
category_no_page?: boolean;
|
|
14
|
-
tags?: string[];
|
|
15
|
-
title: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
[key: string]: unknown;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
6
|
+
import type { DocPageEntry } from "../doc-page-props/index.js";
|
|
7
|
+
/** Current zfb docs entry used by the tag-pages factory. */
|
|
8
|
+
export type TagPagesDocsEntry = DocPageEntry;
|
|
20
9
|
/** Tag info produced and consumed by the tag-pages factory. */
|
|
21
10
|
export interface TagInfo {
|
|
22
11
|
tag: string;
|
|
@@ -40,11 +29,11 @@ export interface TagPagesComponents {
|
|
|
40
29
|
title: string;
|
|
41
30
|
}) => JSX.Element;
|
|
42
31
|
HeaderWithDefaults: (props: {
|
|
43
|
-
lang
|
|
32
|
+
lang: string;
|
|
44
33
|
currentPath?: string;
|
|
45
34
|
}) => JSX.Element;
|
|
46
35
|
FooterWithDefaults: (props: {
|
|
47
|
-
lang
|
|
36
|
+
lang: string;
|
|
48
37
|
}) => JSX.Element;
|
|
49
38
|
BodyEndIslands: (props: {
|
|
50
39
|
basePath: string;
|
|
@@ -71,7 +60,7 @@ export interface TagPagesDeps {
|
|
|
71
60
|
* Collect tags from a docs array, producing a Map<tag, TagInfo>.
|
|
72
61
|
* Host passes `collectTags` from `@/utils/tags`.
|
|
73
62
|
*/
|
|
74
|
-
collectTags: (entries: TagPagesDocsEntry[], slugFn: (
|
|
63
|
+
collectTags: (entries: TagPagesDocsEntry[], slugFn: (entrySlug: string, data: {
|
|
75
64
|
slug?: string;
|
|
76
65
|
}) => string) => Map<string, TagInfo>;
|
|
77
66
|
/**
|
|
@@ -83,7 +72,7 @@ export interface TagPagesDeps {
|
|
|
83
72
|
* Returns true for paths that are only shown in the default locale.
|
|
84
73
|
* Host passes `isDefaultLocaleOnlyPath` from `@/utils/base`.
|
|
85
74
|
*/
|
|
86
|
-
isDefaultLocaleOnlyPath
|
|
75
|
+
isDefaultLocaleOnlyPath: (path: string) => boolean;
|
|
87
76
|
components: TagPagesComponents;
|
|
88
77
|
}
|
|
89
78
|
/** Result of {@link createTagPages}. */
|
|
@@ -116,8 +105,6 @@ export interface TagPagesAPI {
|
|
|
116
105
|
* Reads `settings`/`defaultLocale`/`t`/`withBase`/`docsUrl`/`collectTags`/
|
|
117
106
|
* `stableDocs` off the context, derives `composeMetaTitle`, and rebuilds the
|
|
118
107
|
* Head / Header / Footer / BodyEndIslands / DocHistoryArea chrome from the SAME
|
|
119
|
-
* context
|
|
120
|
-
* pre-collapse injected wiring (`routes/_chrome.tsx` passed `undefined`) — the
|
|
121
|
-
* frozen baseline's tag pages are rendered through that path BYTE-FOR-BYTE.
|
|
108
|
+
* context, including the current default-locale-only path predicate.
|
|
122
109
|
*/
|
|
123
110
|
export declare function createTagPages<S extends Settings = Settings>(ctx: ChromeContext<S>): TagPagesAPI;
|
package/dist/tag-pages/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
2
2
|
import { DocLayoutWithDefaults } from "../doclayout/index.js";
|
|
3
|
-
import { Breadcrumb } from "../breadcrumb/index.js";
|
|
4
3
|
import { DocCardGrid, TagNav } from "../nav-indexing/index.js";
|
|
5
4
|
import { memoizeDerived } from "../nav-source-cache/index.js";
|
|
6
5
|
import { mergeLocaleDocs } from "../locale-merge/index.js";
|
|
7
6
|
import { toRouteSlug } from "../slug/index.js";
|
|
8
7
|
import { createHeadWithDefaults } from "../head-with-defaults/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import { createFooterWithDefaults } from "../footer-with-defaults/index.js";
|
|
8
|
+
import { resolveThemePackSsrSlug } from "../theme/theme-pack-provider.js";
|
|
11
9
|
import { createDocHistoryArea } from "../doc-history-area/index.js";
|
|
12
10
|
import { deriveComposeMetaTitle, deriveBodyEndIslands } from "../chrome/derive.js";
|
|
11
|
+
import { derivePrimaryChromeSlots } from "../chrome/primary-slots.js";
|
|
13
12
|
import { assertChromeContext } from "../chrome/assert-chrome-context.js";
|
|
14
13
|
function createTagPages(ctx) {
|
|
15
14
|
assertChromeContext(ctx, "createTagPages");
|
|
@@ -21,16 +20,19 @@ function createTagPages(ctx) {
|
|
|
21
20
|
const composeMetaTitle = deriveComposeMetaTitle(ctx);
|
|
22
21
|
const collectTags = ctx.collectTags;
|
|
23
22
|
const stableDocs = ctx.stableDocs;
|
|
24
|
-
const isDefaultLocaleOnlyPath =
|
|
23
|
+
const isDefaultLocaleOnlyPath = ctx.isDefaultLocaleOnlyPath;
|
|
25
24
|
const HeadWithDefaults = createHeadWithDefaults(ctx);
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
);
|
|
25
|
+
const {
|
|
26
|
+
Header: HeaderWithDefaults,
|
|
27
|
+
Footer: FooterWithDefaults,
|
|
28
|
+
Breadcrumb
|
|
29
|
+
} = derivePrimaryChromeSlots(ctx);
|
|
32
30
|
const BodyEndIslands = deriveBodyEndIslands(ctx);
|
|
33
31
|
const DocHistoryArea = createDocHistoryArea(ctx);
|
|
32
|
+
const dataThemePack = resolveThemePackSsrSlug(
|
|
33
|
+
ctx.themePackRegistry,
|
|
34
|
+
ctx.settings
|
|
35
|
+
);
|
|
34
36
|
function localePrefix(locale) {
|
|
35
37
|
return locale === defaultLocale ? "" : `/${locale}`;
|
|
36
38
|
}
|
|
@@ -82,6 +84,7 @@ function createTagPages(ctx) {
|
|
|
82
84
|
title: composeMetaTitle(pageTitle),
|
|
83
85
|
head: /* @__PURE__ */ jsx(HeadWithDefaults, { title: pageTitle }),
|
|
84
86
|
lang: isDefault ? void 0 : locale,
|
|
87
|
+
dataThemePack,
|
|
85
88
|
noindex: settings.noindex,
|
|
86
89
|
hideSidebar: true,
|
|
87
90
|
hideToc: true,
|
|
@@ -125,6 +128,7 @@ function createTagPages(ctx) {
|
|
|
125
128
|
title: composeMetaTitle(pageTitle),
|
|
126
129
|
head: /* @__PURE__ */ jsx(HeadWithDefaults, { title: pageTitle }),
|
|
127
130
|
lang: isDefault ? void 0 : locale,
|
|
131
|
+
dataThemePack,
|
|
128
132
|
noindex: settings.noindex,
|
|
129
133
|
hideSidebar: true,
|
|
130
134
|
hideToc: true,
|
package/dist/tags-audit.d.ts
CHANGED
|
@@ -4,44 +4,22 @@
|
|
|
4
4
|
* Core library for vocabulary-aware frontmatter tag auditing.
|
|
5
5
|
*
|
|
6
6
|
* Exports pure functions and types consumed by:
|
|
7
|
-
* - the package
|
|
8
|
-
*
|
|
7
|
+
* - the package bins (packages/zudo-doc/bin/tags-audit.mjs and
|
|
8
|
+
* packages/zudo-doc/bin/tags-suggest.mjs)
|
|
9
9
|
* - custom integrations
|
|
10
10
|
*
|
|
11
11
|
* Does NOT import from project-specific config (settings, tag-vocabulary).
|
|
12
12
|
* The caller passes those in via AuditOptions.
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
id: string;
|
|
17
|
-
label?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
group?: string;
|
|
20
|
-
aliases?: readonly string[];
|
|
21
|
-
deprecated?: boolean | {
|
|
22
|
-
redirect?: string;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
14
|
+
import type { TagVocabularyEntry } from "./settings.js";
|
|
15
|
+
export type { TagVocabularyEntry } from "./settings.js";
|
|
25
16
|
interface VocabularyIndex {
|
|
26
17
|
byId: Map<string, TagVocabularyEntry>;
|
|
27
|
-
byAlias: Map<string, TagVocabularyEntry>;
|
|
28
|
-
aliasToId: Map<string, string>;
|
|
29
18
|
}
|
|
30
19
|
export interface UnknownIssue {
|
|
31
20
|
file: string;
|
|
32
21
|
raw: string;
|
|
33
22
|
}
|
|
34
|
-
export interface DeprecatedIssue {
|
|
35
|
-
file: string;
|
|
36
|
-
raw: string;
|
|
37
|
-
canonical: string;
|
|
38
|
-
redirect?: string;
|
|
39
|
-
}
|
|
40
|
-
export interface AliasIssue {
|
|
41
|
-
file: string;
|
|
42
|
-
raw: string;
|
|
43
|
-
canonical: string;
|
|
44
|
-
}
|
|
45
23
|
export interface NearDuplicatePair {
|
|
46
24
|
a: string;
|
|
47
25
|
b: string;
|
|
@@ -50,12 +28,10 @@ export interface NearDuplicatePair {
|
|
|
50
28
|
}
|
|
51
29
|
export interface AuditReport {
|
|
52
30
|
unknowns: UnknownIssue[];
|
|
53
|
-
deprecated: DeprecatedIssue[];
|
|
54
|
-
aliases: AliasIssue[];
|
|
55
31
|
nearDuplicates: NearDuplicatePair[];
|
|
56
32
|
orphans: string[];
|
|
57
33
|
filesScanned: number;
|
|
58
|
-
/** Totals keyed by canonical id
|
|
34
|
+
/** Totals keyed by exact canonical id, or raw unknown id. */
|
|
59
35
|
frequency: Record<string, number>;
|
|
60
36
|
}
|
|
61
37
|
export interface AuditOptions {
|
|
@@ -71,6 +47,17 @@ export interface AuditOptions {
|
|
|
71
47
|
*/
|
|
72
48
|
nearDupHelpers?: NearDupHelpers;
|
|
73
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Explicit project input shared by the package-owned tag audit and suggestion
|
|
52
|
+
* CLIs. Paths are project-root-relative and are resolved from the CLI's cwd.
|
|
53
|
+
* A config module passed with `--config` must default-export this shape.
|
|
54
|
+
*/
|
|
55
|
+
export interface TagCliConfig {
|
|
56
|
+
contentDirs: readonly string[];
|
|
57
|
+
vocabulary: readonly TagVocabularyEntry[];
|
|
58
|
+
governance: "off" | "warn" | "strict";
|
|
59
|
+
vocabularyActive: boolean;
|
|
60
|
+
}
|
|
74
61
|
export interface NearDupHelpers {
|
|
75
62
|
singular: (word: string) => string;
|
|
76
63
|
compareTwoStrings: (a: string, b: string) => number;
|
|
@@ -81,19 +68,6 @@ export declare function normalizeTags(value: unknown): string[];
|
|
|
81
68
|
export declare function findNearDuplicates(tags: string[], helpers: NearDupHelpers): NearDuplicatePair[];
|
|
82
69
|
export declare function audit(opts: AuditOptions): Promise<AuditReport>;
|
|
83
70
|
export declare function hasHardIssues(report: AuditReport): boolean;
|
|
84
|
-
export declare function computeRewrites(vocabulary: readonly TagVocabularyEntry[]): Map<string, string>;
|
|
85
|
-
export declare function applyFixes(contentDirs: string[], rewrites: Map<string, string>, rootDir: string): Promise<string[]>;
|
|
86
|
-
/**
|
|
87
|
-
* Rewrite alias tags to canonical ids within a single MDX file, preserving
|
|
88
|
-
* every other byte of the file verbatim. Returns `{ content, changed }`.
|
|
89
|
-
*
|
|
90
|
-
* Supports block-style (`tags:\n - foo\n`) and flow-style
|
|
91
|
-
* (`tags: [foo, bar]`) YAML sequences. Quoted string values are handled.
|
|
92
|
-
*/
|
|
93
|
-
export declare function rewriteAliasesByteStable(content: string, rewrites: Map<string, string>): {
|
|
94
|
-
content: string;
|
|
95
|
-
changed: boolean;
|
|
96
|
-
};
|
|
97
71
|
/** Format a human-readable text report. Requires picocolors for coloring. */
|
|
98
72
|
export declare function formatTextReport(report: AuditReport, governance: AuditOptions["governance"], vocabularyActive: boolean, pc: {
|
|
99
73
|
bold: (s: string) => string;
|
|
@@ -101,7 +75,5 @@ export declare function formatTextReport(report: AuditReport, governance: AuditO
|
|
|
101
75
|
dim: (s: string) => string;
|
|
102
76
|
red: (s: string) => string;
|
|
103
77
|
yellow: (s: string) => string;
|
|
104
|
-
blue: (s: string) => string;
|
|
105
78
|
green: (s: string) => string;
|
|
106
79
|
}): string;
|
|
107
|
-
export {};
|