@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
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const FONT_WEIGHT_OPTIONS = [
|
|
2
|
+
"100",
|
|
3
|
+
"200",
|
|
4
|
+
"300",
|
|
5
|
+
"400",
|
|
6
|
+
"500",
|
|
7
|
+
"600",
|
|
8
|
+
"700",
|
|
9
|
+
"800",
|
|
10
|
+
"900"
|
|
11
|
+
];
|
|
12
|
+
const SPACING_TOKENS = [
|
|
13
|
+
// --- Horizontal spacing ---
|
|
14
|
+
{ id: "hsp-2xs", cssVar: "--spacing-hsp-2xs", label: "hsp-2xs", group: "hsp", default: "0.125rem", step: 0.025, unit: "rem" },
|
|
15
|
+
{ id: "hsp-xs", cssVar: "--spacing-hsp-xs", label: "hsp-xs", group: "hsp", default: "0.375rem", step: 0.025, unit: "rem" },
|
|
16
|
+
{ id: "hsp-sm", cssVar: "--spacing-hsp-sm", label: "hsp-sm", group: "hsp", default: "0.5rem", step: 0.025, unit: "rem" },
|
|
17
|
+
{ id: "hsp-md", cssVar: "--spacing-hsp-md", label: "hsp-md", group: "hsp", default: "0.75rem", step: 0.025, unit: "rem" },
|
|
18
|
+
{ id: "hsp-lg", cssVar: "--spacing-hsp-lg", label: "hsp-lg", group: "hsp", default: "1rem", step: 0.025, unit: "rem" },
|
|
19
|
+
{ id: "hsp-xl", cssVar: "--spacing-hsp-xl", label: "hsp-xl", group: "hsp", default: "1.5rem", step: 0.025, unit: "rem" },
|
|
20
|
+
{ id: "hsp-2xl", cssVar: "--spacing-hsp-2xl", label: "hsp-2xl", group: "hsp", default: "2rem", step: 0.025, unit: "rem" },
|
|
21
|
+
// --- Vertical spacing ---
|
|
22
|
+
{ id: "vsp-3xs", cssVar: "--spacing-vsp-3xs", label: "vsp-3xs", group: "vsp", default: "0.25rem", step: 0.025, unit: "rem" },
|
|
23
|
+
{ id: "vsp-2xs", cssVar: "--spacing-vsp-2xs", label: "vsp-2xs", group: "vsp", default: "0.4375rem", step: 0.025, unit: "rem" },
|
|
24
|
+
{ id: "vsp-xs", cssVar: "--spacing-vsp-xs", label: "vsp-xs", group: "vsp", default: "0.875rem", step: 0.025, unit: "rem" },
|
|
25
|
+
{ id: "vsp-sm", cssVar: "--spacing-vsp-sm", label: "vsp-sm", group: "vsp", default: "1.25rem", step: 0.025, unit: "rem" },
|
|
26
|
+
{ id: "vsp-md", cssVar: "--spacing-vsp-md", label: "vsp-md", group: "vsp", default: "1.5rem", step: 0.025, unit: "rem" },
|
|
27
|
+
{ id: "vsp-lg", cssVar: "--spacing-vsp-lg", label: "vsp-lg", group: "vsp", default: "1.75rem", step: 0.025, unit: "rem" },
|
|
28
|
+
{ id: "vsp-xl", cssVar: "--spacing-vsp-xl", label: "vsp-xl", group: "vsp", default: "2.5rem", step: 0.025, unit: "rem" },
|
|
29
|
+
{ id: "vsp-2xl", cssVar: "--spacing-vsp-2xl", label: "vsp-2xl", group: "vsp", default: "3.5rem", step: 0.025, unit: "rem" },
|
|
30
|
+
// --- Icons ---
|
|
31
|
+
{ id: "icon-xs", cssVar: "--spacing-icon-xs", label: "icon-xs", group: "icon", default: "0.75rem", step: 0.05, unit: "rem" },
|
|
32
|
+
{ id: "icon-sm", cssVar: "--spacing-icon-sm", label: "icon-sm", group: "icon", default: "1rem", step: 0.05, unit: "rem" },
|
|
33
|
+
{ id: "icon-md", cssVar: "--spacing-icon-md", label: "icon-md", group: "icon", default: "1.25rem", step: 0.05, unit: "rem" },
|
|
34
|
+
{ id: "icon-lg", cssVar: "--spacing-icon-lg", label: "icon-lg", group: "icon", default: "1.5rem", step: 0.05, unit: "rem" },
|
|
35
|
+
// --- Layout ---
|
|
36
|
+
{ id: "image-overlay-inset", cssVar: "--spacing-image-overlay-inset", label: "image-overlay-inset", group: "layout", default: "0.5rem", step: 0.05, unit: "rem" },
|
|
37
|
+
// Structural zero — surfaced as read-only so designers see it exists, but
|
|
38
|
+
// editing it would break every utility that relies on "0 is 0".
|
|
39
|
+
{ id: "spacing-0", cssVar: "--spacing-0", label: "spacing-0", group: "layout", default: "0", step: 1, unit: "", readonly: true },
|
|
40
|
+
// 1px hairline — also read-only by design.
|
|
41
|
+
{ id: "spacing-px", cssVar: "--spacing-px", label: "spacing-px", group: "layout", default: "1px", step: 1, unit: "px", readonly: true },
|
|
42
|
+
// Responsive clamp() expression — can't be expressed on a single slider.
|
|
43
|
+
{ id: "sidebar-w", cssVar: "--zd-sidebar-w", label: "sidebar-w", group: "layout", default: "clamp(14rem, 20vw, 22rem)", step: 1, unit: "", readonly: true }
|
|
44
|
+
];
|
|
45
|
+
const FONT_TOKENS = [
|
|
46
|
+
// --- Font sizes (Tier 2 semantic) ---
|
|
47
|
+
{ id: "text-micro", cssVar: "--text-micro", label: "text-micro", group: "font-size", default: "0.75rem", step: 0.05, unit: "rem" },
|
|
48
|
+
{ id: "text-caption", cssVar: "--text-caption", label: "text-caption", group: "font-size", default: "0.875rem", step: 0.05, unit: "rem" },
|
|
49
|
+
{ id: "text-small", cssVar: "--text-small", label: "text-small", group: "font-size", default: "1rem", step: 0.05, unit: "rem" },
|
|
50
|
+
{ id: "text-body", cssVar: "--text-body", label: "text-body", group: "font-size", default: "1.2rem", step: 0.05, unit: "rem" },
|
|
51
|
+
{ id: "text-title", cssVar: "--text-title", label: "text-title", group: "font-size", default: "1.4rem", step: 0.05, unit: "rem" },
|
|
52
|
+
{ id: "text-heading", cssVar: "--text-heading", label: "text-heading", group: "font-size", default: "3rem", step: 0.05, unit: "rem" },
|
|
53
|
+
{ id: "text-display", cssVar: "--text-display", label: "text-display", group: "font-size", default: "3.75rem", step: 0.05, unit: "rem" },
|
|
54
|
+
// --- Line heights (unitless) ---
|
|
55
|
+
{ id: "leading-tight", cssVar: "--leading-tight", label: "leading-tight", group: "line-height", default: "1.25", step: 0.05, unit: "" },
|
|
56
|
+
{ id: "leading-snug", cssVar: "--leading-snug", label: "leading-snug", group: "line-height", default: "1.375", step: 0.05, unit: "" },
|
|
57
|
+
{ id: "leading-normal", cssVar: "--leading-normal", label: "leading-normal", group: "line-height", default: "1.5", step: 0.05, unit: "" },
|
|
58
|
+
{ id: "leading-relaxed", cssVar: "--leading-relaxed", label: "leading-relaxed", group: "line-height", default: "1.625", step: 0.05, unit: "" },
|
|
59
|
+
// --- Font weights (select) ---
|
|
60
|
+
{ id: "font-weight-normal", cssVar: "--font-weight-normal", label: "font-weight-normal", group: "font-weight", default: "400", step: 1, unit: "", control: "select", options: FONT_WEIGHT_OPTIONS },
|
|
61
|
+
{ id: "font-weight-medium", cssVar: "--font-weight-medium", label: "font-weight-medium", group: "font-weight", default: "500", step: 1, unit: "", control: "select", options: FONT_WEIGHT_OPTIONS },
|
|
62
|
+
{ id: "font-weight-semibold", cssVar: "--font-weight-semibold", label: "font-weight-semibold", group: "font-weight", default: "600", step: 1, unit: "", control: "select", options: FONT_WEIGHT_OPTIONS },
|
|
63
|
+
{ id: "font-weight-bold", cssVar: "--font-weight-bold", label: "font-weight-bold", group: "font-weight", default: "700", step: 1, unit: "", control: "select", options: FONT_WEIGHT_OPTIONS },
|
|
64
|
+
// --- Font families (text input) ---
|
|
65
|
+
{ id: "font-sans", cssVar: "--font-sans", label: "font-sans", group: "font-family", default: "system-ui, sans-serif", step: 1, unit: "", control: "text" },
|
|
66
|
+
{ id: "font-mono", cssVar: "--font-mono", label: "font-mono", group: "font-family", default: "ui-monospace, monospace", step: 1, unit: "", control: "text" },
|
|
67
|
+
// --- Tier 1 abstract scale ---
|
|
68
|
+
{ id: "text-scale-2xs", cssVar: "--text-scale-2xs", label: "text-scale-2xs", group: "font-scale", default: "0.75rem", step: 0.05, unit: "rem" },
|
|
69
|
+
{ id: "text-scale-xs", cssVar: "--text-scale-xs", label: "text-scale-xs", group: "font-scale", default: "0.875rem", step: 0.05, unit: "rem" },
|
|
70
|
+
{ id: "text-scale-sm", cssVar: "--text-scale-sm", label: "text-scale-sm", group: "font-scale", default: "1rem", step: 0.05, unit: "rem" },
|
|
71
|
+
{ id: "text-scale-md", cssVar: "--text-scale-md", label: "text-scale-md", group: "font-scale", default: "1.2rem", step: 0.05, unit: "rem" },
|
|
72
|
+
{ id: "text-scale-lg", cssVar: "--text-scale-lg", label: "text-scale-lg", group: "font-scale", default: "1.4rem", step: 0.05, unit: "rem" },
|
|
73
|
+
{ id: "text-scale-xl", cssVar: "--text-scale-xl", label: "text-scale-xl", group: "font-scale", default: "3rem", step: 0.05, unit: "rem" },
|
|
74
|
+
{ id: "text-scale-2xl", cssVar: "--text-scale-2xl", label: "text-scale-2xl", group: "font-scale", default: "3.75rem", step: 0.05, unit: "rem" }
|
|
75
|
+
];
|
|
76
|
+
const SIZE_TOKENS = [
|
|
77
|
+
// --- Radius ---
|
|
78
|
+
{ id: "radius-DEFAULT", cssVar: "--radius-DEFAULT", label: "radius-DEFAULT", group: "radius", default: "4px", step: 1, unit: "px" },
|
|
79
|
+
{ id: "radius-lg", cssVar: "--radius-lg", label: "radius-lg", group: "radius", default: "8px", step: 1, unit: "px" },
|
|
80
|
+
{
|
|
81
|
+
id: "radius-full",
|
|
82
|
+
cssVar: "--radius-full",
|
|
83
|
+
label: "radius-full",
|
|
84
|
+
group: "radius",
|
|
85
|
+
default: "9999px",
|
|
86
|
+
step: 1,
|
|
87
|
+
unit: "px",
|
|
88
|
+
pill: { value: "9999px", customDefault: "16px" }
|
|
89
|
+
},
|
|
90
|
+
// --- Transitions ---
|
|
91
|
+
{
|
|
92
|
+
id: "default-transition-duration",
|
|
93
|
+
cssVar: "--default-transition-duration",
|
|
94
|
+
label: "default-transition-duration",
|
|
95
|
+
group: "transition",
|
|
96
|
+
default: "150ms",
|
|
97
|
+
step: 10,
|
|
98
|
+
unit: "ms"
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
export {
|
|
102
|
+
FONT_TOKENS,
|
|
103
|
+
SIZE_TOKENS,
|
|
104
|
+
SPACING_TOKENS
|
|
105
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default directive vocabulary — the canonical seven.
|
|
3
|
+
*
|
|
4
|
+
* Ported from the `directiveVocabulary` object that every
|
|
5
|
+
* `create-zudo-doc`-generated `zfb.config.ts` previously hardcoded inline
|
|
6
|
+
* (see `packages/create-zudo-doc/src/zfb-config-gen.ts`'s `generateZfbConfig`
|
|
7
|
+
* and this repo's own `zfb.config.ts`) into a package default (epic
|
|
8
|
+
* zudolab/zudo-doc#2651, S4 #2654).
|
|
9
|
+
*
|
|
10
|
+
* Keys are directive names; values are the JSX component names the markdown
|
|
11
|
+
* pipeline's `directives` feature resolves them to (registered in the host's
|
|
12
|
+
* `pages/_mdx-components.ts`). `details` routes to a collapsible, NOT an
|
|
13
|
+
* admonition — the other six are admonition variants.
|
|
14
|
+
*/
|
|
15
|
+
import type { DirectiveVocabulary } from "../preset.js";
|
|
16
|
+
export declare const defaultDirectiveVocabulary: DirectiveVocabulary;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @jsxRuntime automatic */
|
|
2
|
+
/** @jsxImportSource preact */
|
|
3
|
+
import type { JSX } from "preact";
|
|
4
|
+
import type { FactoryComponent } from "../factory-context/index.js";
|
|
5
|
+
export interface DesignTokenPanelIslandDeps {
|
|
6
|
+
designTokenPanel: boolean;
|
|
7
|
+
DesignTokenPanelBootstrap?: FactoryComponent;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Bind the current settings gate to the package-owned bootstrap island.
|
|
11
|
+
* Kept separate from the rest of the package body-end islands so a host
|
|
12
|
+
* BodyEndIslands override can be composed with this package-owned marker
|
|
13
|
+
* without duplicating the other package defaults.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createDesignTokenPanelIsland(deps: DesignTokenPanelIslandDeps): () => JSX.Element | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
2
|
+
import { Island } from "@takazudo/zfb";
|
|
3
|
+
const ZDTP_TOGGLE_SHIM_SRC = `(function(){
|
|
4
|
+
if(window.__zdtpToggleShimInstalled)return;
|
|
5
|
+
window.__zdtpToggleShimInstalled=true;
|
|
6
|
+
var pending=false;
|
|
7
|
+
function shim(){pending=true;}
|
|
8
|
+
window.addEventListener('toggle-design-token-panel',shim);
|
|
9
|
+
window.__zdtpReadyClicks=function(){
|
|
10
|
+
window.removeEventListener('toggle-design-token-panel',shim);
|
|
11
|
+
delete window.__zdtpReadyClicks;
|
|
12
|
+
if(pending){pending=false;window.dispatchEvent(new CustomEvent('toggle-design-token-panel'));}
|
|
13
|
+
};
|
|
14
|
+
})();`;
|
|
15
|
+
function createDesignTokenPanelIsland(deps) {
|
|
16
|
+
const DesignTokenPanelBootstrap = deps.DesignTokenPanelBootstrap;
|
|
17
|
+
function DesignTokenPanelIsland() {
|
|
18
|
+
if (!deps.designTokenPanel || !DesignTokenPanelBootstrap) return null;
|
|
19
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx("script", { dangerouslySetInnerHTML: { __html: ZDTP_TOGGLE_SHIM_SRC } }),
|
|
21
|
+
Island({
|
|
22
|
+
when: "load",
|
|
23
|
+
children: /* @__PURE__ */ jsx(DesignTokenPanelBootstrap, {})
|
|
24
|
+
})
|
|
25
|
+
] });
|
|
26
|
+
}
|
|
27
|
+
return DesignTokenPanelIsland;
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
createDesignTokenPanelIsland
|
|
31
|
+
};
|
|
@@ -1,23 +1,68 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
2
|
/** @jsxImportSource preact */
|
|
3
3
|
import type { JSX } from "preact";
|
|
4
|
-
|
|
4
|
+
import type { FactoryComponent } from "../factory-context/index.js";
|
|
5
|
+
import type { ThemePackSwitcherProps } from "../theme-pack-switcher/index.js";
|
|
6
|
+
/** The `settings` subset this factory reads — the package feature flags.
|
|
5
7
|
* A structural subset so the host can pass its full `Settings` object. */
|
|
6
8
|
export interface BodyEndIslandsSettings {
|
|
7
9
|
aiAssistant: boolean;
|
|
8
10
|
imageEnlarge: boolean;
|
|
9
11
|
mermaid: boolean;
|
|
10
12
|
/** Gates the pure-SSR `<PageLoadingOverlay/>` mount (zudolab/zudo-doc#2482),
|
|
11
|
-
* mirroring the host gate and `enableClientRouter`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* `
|
|
15
|
-
*
|
|
16
|
-
|
|
13
|
+
* mirroring the host gate and `enableClientRouter` on package-owned routes. */
|
|
14
|
+
dynamicPageTransition: boolean;
|
|
15
|
+
/** Gates the `DesignTokenPanelBootstrap` island mount (#2658). Even when
|
|
16
|
+
* `true`, nothing mounts unless `deps.DesignTokenPanelBootstrap` was also
|
|
17
|
+
* supplied — see {@link BodyEndIslandsDeps}. */
|
|
18
|
+
designTokenPanel: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Gates the `FindInPageInit` island mount (zudolab/zudo-doc#2689).
|
|
21
|
+
* Controls the PACKAGE-DEFAULT `BodyEndIslands` slot only — a host that
|
|
22
|
+
* overrides the `BodyEndIslands` chrome binding must mount `FindInPageInit`
|
|
23
|
+
* itself.
|
|
24
|
+
*/
|
|
25
|
+
findInPage: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Gates the `ThemePackSwitcher` flyout island mount (ADR
|
|
28
|
+
* `docs/adr/theme-packs.md` Decision 7; #2821). Optional — the field is
|
|
29
|
+
* optional on the host `Settings` census too (default `false`). Even when
|
|
30
|
+
* `true`, nothing mounts unless `deps.themePackSwitcherProps` AND
|
|
31
|
+
* `deps.ThemePackSwitcher` were also supplied — see
|
|
32
|
+
* {@link BodyEndIslandsDeps}.
|
|
33
|
+
*/
|
|
34
|
+
themePackSwitcher?: boolean;
|
|
17
35
|
}
|
|
18
36
|
/** Dependencies injected by `_chrome.tsx` (carries the virtual-module settings). */
|
|
19
37
|
export interface BodyEndIslandsDeps {
|
|
20
38
|
settings: BodyEndIslandsSettings;
|
|
39
|
+
/**
|
|
40
|
+
* The real `DesignTokenPanelBootstrap` component (#2658) — see the module
|
|
41
|
+
* header note above for why it is NOT imported directly here.
|
|
42
|
+
* `chrome/derive.tsx`'s `deriveBodyEndIslands` supplies
|
|
43
|
+
* `@takazudo/zudo-doc/design-token-panel-bootstrap`'s
|
|
44
|
+
* `DesignTokenPanelBootstrap` as the default for every `createChrome`
|
|
45
|
+
* consumer (#2659 gate-2 fix), so chrome-derived callers always carry it.
|
|
46
|
+
* Omitted (a bare `createBodyEndIslands({ settings })` call outside the
|
|
47
|
+
* chrome path, as this factory's own unit tests do) means no panel island
|
|
48
|
+
* mounts even when `settings.designTokenPanel` is `true` — a safe no-op,
|
|
49
|
+
* not a crash.
|
|
50
|
+
*/
|
|
51
|
+
DesignTokenPanelBootstrap?: FactoryComponent;
|
|
52
|
+
/**
|
|
53
|
+
* SSR props for the theme-pack switcher flyout (#2821) — derived from
|
|
54
|
+
* `ctx.themePackRegistry` by `chrome/derive.tsx` (only the chrome-derive
|
|
55
|
+
* path knows the registry). `null`/omitted renders the feature inert even
|
|
56
|
+
* when `settings.themePackSwitcher` is `true`.
|
|
57
|
+
*/
|
|
58
|
+
themePackSwitcherProps?: ThemePackSwitcherProps | null;
|
|
59
|
+
/**
|
|
60
|
+
* The real `ThemePackSwitcher` island component (#2821), injected by
|
|
61
|
+
* `chrome/derive.tsx` (which statically imports it — the island-scanner
|
|
62
|
+
* reachability chain, mirroring `DesignTokenPanelBootstrap` above).
|
|
63
|
+
* Omitted means no switcher island mounts — a safe no-op, not a crash.
|
|
64
|
+
*/
|
|
65
|
+
ThemePackSwitcher?: FactoryComponent;
|
|
21
66
|
}
|
|
22
67
|
/** Props for the produced `BodyEndIslands` component. */
|
|
23
68
|
export interface BodyEndIslandsProps {
|
|
@@ -3,10 +3,22 @@ import { Island } from "@takazudo/zfb";
|
|
|
3
3
|
import { AiChatModal } from "../ai-chat-modal/index.js";
|
|
4
4
|
import { ImageEnlarge, ImageEnlargeSsrFallback } from "../image-enlarge/index.js";
|
|
5
5
|
import { MermaidEnlarge, MermaidEnlargeSsrFallback } from "../mermaid-enlarge/index.js";
|
|
6
|
+
import { FindInPageInit } from "../find-in-page/index.js";
|
|
6
7
|
import { PageLoadingOverlay } from "../page-loading/index.js";
|
|
8
|
+
import { createDesignTokenPanelIsland } from "./design-token-panel-island.js";
|
|
9
|
+
import { createThemePackSwitcherIsland } from "./theme-pack-switcher-island.js";
|
|
7
10
|
const DEFAULT_AI_CHAT_BODY_LABEL = "Ask a question about the documentation.";
|
|
8
11
|
function createBodyEndIslands(deps) {
|
|
9
12
|
const { settings } = deps;
|
|
13
|
+
const DesignTokenPanelIsland = createDesignTokenPanelIsland({
|
|
14
|
+
designTokenPanel: settings.designTokenPanel,
|
|
15
|
+
DesignTokenPanelBootstrap: deps.DesignTokenPanelBootstrap
|
|
16
|
+
});
|
|
17
|
+
const ThemePackSwitcherIsland = createThemePackSwitcherIsland({
|
|
18
|
+
themePackSwitcher: settings.themePackSwitcher === true,
|
|
19
|
+
themePackSwitcherProps: deps.themePackSwitcherProps ?? null,
|
|
20
|
+
ThemePackSwitcher: deps.ThemePackSwitcher
|
|
21
|
+
});
|
|
10
22
|
function BodyEndIslands({
|
|
11
23
|
basePath,
|
|
12
24
|
aiChatBodyLabel = DEFAULT_AI_CHAT_BODY_LABEL
|
|
@@ -28,8 +40,15 @@ function createBodyEndIslands(deps) {
|
|
|
28
40
|
ssrFallback: /* @__PURE__ */ jsx(MermaidEnlargeSsrFallback, {}),
|
|
29
41
|
children: /* @__PURE__ */ jsx(MermaidEnlarge, {})
|
|
30
42
|
}) : null;
|
|
43
|
+
const findInPageInit = settings.findInPage ? Island({
|
|
44
|
+
when: "load",
|
|
45
|
+
children: /* @__PURE__ */ jsx(FindInPageInit, {})
|
|
46
|
+
}) : null;
|
|
31
47
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32
48
|
settings.dynamicPageTransition ? /* @__PURE__ */ jsx(PageLoadingOverlay, {}) : null,
|
|
49
|
+
/* @__PURE__ */ jsx(DesignTokenPanelIsland, {}),
|
|
50
|
+
/* @__PURE__ */ jsx(ThemePackSwitcherIsland, {}),
|
|
51
|
+
findInPageInit,
|
|
33
52
|
aiAssistant,
|
|
34
53
|
imageEnlarge,
|
|
35
54
|
mermaidEnlarge
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** @jsxRuntime automatic */
|
|
2
|
+
/** @jsxImportSource preact */
|
|
3
|
+
import type { JSX } from "preact";
|
|
4
|
+
import type { FactoryComponent } from "../factory-context/index.js";
|
|
5
|
+
import type { ThemePackSwitcherProps } from "../theme-pack-switcher/index.js";
|
|
6
|
+
export interface ThemePackSwitcherIslandDeps {
|
|
7
|
+
/** The `settings.themePackSwitcher` gate (default `false`). */
|
|
8
|
+
themePackSwitcher: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* SSR props derived from `ctx.themePackRegistry` by
|
|
11
|
+
* `chrome/derive.tsx` (ADR theme-packs.md Decision 7 "Switcher data
|
|
12
|
+
* flow"). `null` means the registry was not threaded
|
|
13
|
+
* (`themePackRegistry: null`) — the whole feature renders inert even when
|
|
14
|
+
* the settings gate is on.
|
|
15
|
+
*/
|
|
16
|
+
themePackSwitcherProps: ThemePackSwitcherProps | null;
|
|
17
|
+
/**
|
|
18
|
+
* The real `ThemePackSwitcher` island component. Injected (not imported
|
|
19
|
+
* here) mirroring `design-token-panel-island.tsx`'s shape: the props above
|
|
20
|
+
* only exist on the chrome-derive path, so `chrome/derive.tsx` supplies the
|
|
21
|
+
* statically imported package component as the default for every
|
|
22
|
+
* `createChrome` consumer (route → chrome → derive → component is the
|
|
23
|
+
* island-scanner reachability chain — the #2480 lesson). Omitted means no
|
|
24
|
+
* island mounts even when the gate is on — a safe no-op, not a crash.
|
|
25
|
+
*/
|
|
26
|
+
ThemePackSwitcher?: FactoryComponent;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Bind the settings gate + the SSR-derived props to the theme-pack switcher
|
|
30
|
+
* flyout island mount (`Island({ when: "load" })` — the island SSRs its
|
|
31
|
+
* launcher markup and hydrates at load; its serializable props ride the
|
|
32
|
+
* marker's `data-props` JSON). Kept separate from the rest of the package
|
|
33
|
+
* body-end islands so a host BodyEndIslands override can be composed with
|
|
34
|
+
* this package-owned mount without duplicating the other package defaults
|
|
35
|
+
* (the `design-token-panel-island.tsx` pattern).
|
|
36
|
+
*/
|
|
37
|
+
export declare function createThemePackSwitcherIsland(deps: ThemePackSwitcherIslandDeps): () => JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Fragment, jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { Island } from "@takazudo/zfb";
|
|
3
|
+
function createThemePackSwitcherIsland(deps) {
|
|
4
|
+
const ThemePackSwitcher = deps.ThemePackSwitcher;
|
|
5
|
+
function ThemePackSwitcherIsland() {
|
|
6
|
+
if (!deps.themePackSwitcher || deps.themePackSwitcherProps === null || !ThemePackSwitcher) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return /* @__PURE__ */ jsx(Fragment, { children: Island({
|
|
10
|
+
when: "load",
|
|
11
|
+
children: /* @__PURE__ */ jsx(ThemePackSwitcher, { ...deps.themePackSwitcherProps })
|
|
12
|
+
}) });
|
|
13
|
+
}
|
|
14
|
+
return ThemePackSwitcherIsland;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
createThemePackSwitcherIsland
|
|
18
|
+
};
|
|
@@ -37,7 +37,7 @@ function createDocContentHeader(ctx) {
|
|
|
37
37
|
children: t("doc.fallbackNotice", locale)
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
|
-
entry.data.description && /* @__PURE__ */ jsx("p", { class: "mb-vsp-lg text-title text-muted", children: entry.data.description }),
|
|
40
|
+
entry.data.description && /* @__PURE__ */ jsx("p", { class: "mb-vsp-lg text-title text-muted", "data-doc-description": true, children: entry.data.description }),
|
|
41
41
|
/* @__PURE__ */ jsx(
|
|
42
42
|
FrontmatterPreview,
|
|
43
43
|
{
|
|
@@ -8,8 +8,8 @@ export interface DocHistoryMetaEntry {
|
|
|
8
8
|
author: string;
|
|
9
9
|
createdDate: string;
|
|
10
10
|
updatedDate: string;
|
|
11
|
-
/** Source file extension
|
|
12
|
-
ext
|
|
11
|
+
/** Source file extension recorded by the current build-time manifest. */
|
|
12
|
+
ext: ".mdx" | ".md";
|
|
13
13
|
}
|
|
14
14
|
/** Settings subset read by the DocHistoryArea factory. */
|
|
15
15
|
export interface DocHistoryAreaSettings {
|
|
@@ -36,12 +36,18 @@ export interface DocHistoryAreaProps {
|
|
|
36
36
|
/**
|
|
37
37
|
* Raw zfb entry slug (relative path without extension), e.g.
|
|
38
38
|
* "getting-started/intro" or "getting-started/index". Appended with
|
|
39
|
-
* the source extension from the build-time manifest
|
|
40
|
-
*
|
|
39
|
+
* the source extension from the build-time manifest to form the file path
|
|
40
|
+
* passed to buildGitHubSourceUrl.
|
|
41
41
|
* Omit for auto-index pages (no underlying MDX file) — sourceUrl
|
|
42
42
|
* will be suppressed automatically.
|
|
43
43
|
*/
|
|
44
44
|
entrySlug?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Source extension from the current content entry. Used only when the file
|
|
47
|
+
* has no manifest metadata yet (for example, an untracked file or a build
|
|
48
|
+
* with `SKIP_DOC_HISTORY=1`). A present manifest owns its required `ext`.
|
|
49
|
+
*/
|
|
50
|
+
sourceFileExt?: ".mdx" | ".md";
|
|
45
51
|
/**
|
|
46
52
|
* Content directory for the active locale, e.g. "src/content/docs"
|
|
47
53
|
* or "src/content/docs-ja". Combined with entrySlug to build the
|
|
@@ -22,6 +22,7 @@ function createDocHistoryArea(ctx) {
|
|
|
22
22
|
slug,
|
|
23
23
|
locale,
|
|
24
24
|
entrySlug,
|
|
25
|
+
sourceFileExt,
|
|
25
26
|
contentDir,
|
|
26
27
|
isFallback
|
|
27
28
|
}) {
|
|
@@ -62,8 +63,8 @@ function createDocHistoryArea(ctx) {
|
|
|
62
63
|
)
|
|
63
64
|
});
|
|
64
65
|
const utilSettings = settings.bodyFootUtilArea;
|
|
65
|
-
const sourceExt = meta
|
|
66
|
-
const sourceUrl = utilSettings && utilSettings.viewSourceLink && entrySlug && contentDir ? buildGitHubSourceUrl(contentDir, entrySlug + sourceExt) : null;
|
|
66
|
+
const sourceExt = meta ? meta.ext : sourceFileExt;
|
|
67
|
+
const sourceUrl = utilSettings && utilSettings.viewSourceLink && entrySlug && sourceExt && contentDir ? buildGitHubSourceUrl(contentDir, entrySlug + sourceExt) : null;
|
|
67
68
|
const viewSourceLabel = t("doc.viewSource", locale);
|
|
68
69
|
void historyLabel;
|
|
69
70
|
return /* @__PURE__ */ jsx(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type { HeadingItem } from "../extract-headings/index.js";
|
|
2
2
|
import type { HeadingItem } from "../extract-headings/index.js";
|
|
3
3
|
import type { BreadcrumbItem } from "../breadcrumb/types.js";
|
|
4
|
+
import type { CollectionEntry } from "@takazudo/zfb/content";
|
|
4
5
|
/**
|
|
5
6
|
* Nav tree node shape as consumed by doc-route pages.
|
|
6
7
|
*
|
|
@@ -35,37 +36,20 @@ export interface DocPageFrontmatter {
|
|
|
35
36
|
draft?: boolean;
|
|
36
37
|
unlisted?: boolean;
|
|
37
38
|
standalone?: boolean;
|
|
39
|
+
sidebar_position?: number;
|
|
40
|
+
sidebar_label?: string;
|
|
38
41
|
category_no_page?: boolean;
|
|
42
|
+
category_sort_order?: "asc" | "desc";
|
|
39
43
|
pagination_prev?: string | null;
|
|
40
44
|
pagination_next?: string | null;
|
|
41
45
|
tags?: string[];
|
|
42
46
|
[key: string]: unknown;
|
|
43
47
|
}
|
|
44
48
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* renderer surface.
|
|
48
|
-
*
|
|
49
|
-
* Structural counterpart of the host's `DocPageEntry` (from
|
|
50
|
-
* `pages/lib/doc-page-props.ts`). The host stub re-exports this type under
|
|
51
|
-
* the original name.
|
|
49
|
+
* The native zfb collection entry with docs frontmatter. Route consumers
|
|
50
|
+
* derive canonical route slugs from `entry.data.slug ?? toRouteSlug(entry.slug)`.
|
|
52
51
|
*/
|
|
53
|
-
export
|
|
54
|
-
/** zfb content engine slug (filename without `.md`/`.mdx`). */
|
|
55
|
-
slug: string;
|
|
56
|
-
/** Bridged from `slug` for host `@/utils/docs` compat. */
|
|
57
|
-
id: string;
|
|
58
|
-
/** Collection name, e.g. "docs", "docs-ja", "docs-v-1.0". */
|
|
59
|
-
collection: string;
|
|
60
|
-
/** Parsed frontmatter. Structural superset of `DocPageFrontmatter`. */
|
|
61
|
-
data: DocPageFrontmatter;
|
|
62
|
-
/** Raw MDX body (for heading extraction). */
|
|
63
|
-
body?: string;
|
|
64
|
-
/** zfb module specifier (for Content bridge). */
|
|
65
|
-
module_specifier: string;
|
|
66
|
-
/** zfb content renderer — callable Preact component. */
|
|
67
|
-
Content: unknown;
|
|
68
|
-
}
|
|
52
|
+
export type DocPageEntry = CollectionEntry<DocPageFrontmatter>;
|
|
69
53
|
export interface AutoIndexNode extends DocNavNode {
|
|
70
54
|
children: DocNavNode[];
|
|
71
55
|
}
|
|
@@ -102,6 +102,7 @@ function createRenderDocPage(ctx) {
|
|
|
102
102
|
slug,
|
|
103
103
|
locale,
|
|
104
104
|
entrySlug: props.entry.slug,
|
|
105
|
+
sourceFileExt: props.entry.module_specifier.endsWith(".mdx") ? ".mdx" : props.entry.module_specifier.endsWith(".md") ? ".md" : void 0,
|
|
105
106
|
contentDir: opts.docHistoryContentDir,
|
|
106
107
|
isFallback
|
|
107
108
|
}
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
2
2
|
import { Island } from "@takazudo/zfb";
|
|
3
3
|
import { DocLayoutWithDefaults } from "../doclayout/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import { Breadcrumb } from "../breadcrumb/index.js";
|
|
4
|
+
import { MobileToc, getTocTitle } from "../toc/index.js";
|
|
6
5
|
import { NavCardGrid } from "../nav-indexing/index.js";
|
|
7
6
|
import {
|
|
8
7
|
createSidebarPrepaint,
|
|
9
8
|
createSidebarVisibilityPrepaint
|
|
10
9
|
} from "../sidebar-prepaint/index.js";
|
|
11
10
|
import { createHeadWithDefaults } from "../head-with-defaults/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import { createHeaderWithDefaults } from "../header-with-defaults/index.js";
|
|
14
|
-
import { createFooterWithDefaults } from "../footer-with-defaults/index.js";
|
|
11
|
+
import { resolveThemePackSsrSlug } from "../theme/theme-pack-provider.js";
|
|
15
12
|
import { createDocBodyEnd } from "../doc-body-end/index.js";
|
|
16
|
-
import { createDocPager } from "../doc-pager/index.js";
|
|
17
13
|
import { deriveComposeMetaTitle } from "../chrome/derive.js";
|
|
14
|
+
import { derivePrimaryChromeSlots } from "../chrome/primary-slots.js";
|
|
18
15
|
import { assertChromeContext } from "../chrome/assert-chrome-context.js";
|
|
19
16
|
function createDocPageShell(ctx) {
|
|
20
17
|
assertChromeContext(ctx, "createDocPageShell");
|
|
21
18
|
const settings = ctx.settings;
|
|
22
19
|
const composeMetaTitle = deriveComposeMetaTitle(ctx);
|
|
23
20
|
const HeadWithDefaults = createHeadWithDefaults(ctx);
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
const {
|
|
22
|
+
Header: HeaderWithDefaults,
|
|
23
|
+
Footer: FooterWithDefaults,
|
|
24
|
+
Sidebar: SidebarWithDefaults,
|
|
25
|
+
Toc,
|
|
26
|
+
Breadcrumb,
|
|
27
|
+
DocPager
|
|
28
|
+
} = derivePrimaryChromeSlots(ctx);
|
|
29
|
+
const customTocIsPresent = ctx.hostBindings.Toc !== void 0;
|
|
27
30
|
const sidebarToggleEnabled = Boolean(
|
|
28
31
|
ctx.settings.sidebarToggle
|
|
29
32
|
);
|
|
@@ -34,7 +37,10 @@ function createDocPageShell(ctx) {
|
|
|
34
37
|
sidebarToggle: sidebarToggleEnabled
|
|
35
38
|
});
|
|
36
39
|
const DocBodyEnd = createDocBodyEnd(ctx);
|
|
37
|
-
const
|
|
40
|
+
const dataThemePack = resolveThemePackSsrSlug(
|
|
41
|
+
ctx.themePackRegistry,
|
|
42
|
+
ctx.settings
|
|
43
|
+
);
|
|
38
44
|
function DocPageShell(props) {
|
|
39
45
|
const {
|
|
40
46
|
kind,
|
|
@@ -66,7 +72,7 @@ function createDocPageShell(ctx) {
|
|
|
66
72
|
} = props;
|
|
67
73
|
const tocTitle = getTocTitle(locale);
|
|
68
74
|
const shouldRenderToc = !hideToc && headings.length > 0;
|
|
69
|
-
const tocOverride = shouldRenderToc ? Island({
|
|
75
|
+
const tocOverride = shouldRenderToc ? customTocIsPresent ? /* @__PURE__ */ jsx(Toc, { headings, title: tocTitle }) : Island({
|
|
70
76
|
when: "load",
|
|
71
77
|
children: /* @__PURE__ */ jsx(Toc, { headings, title: tocTitle })
|
|
72
78
|
}) : void 0;
|
|
@@ -84,6 +90,7 @@ function createDocPageShell(ctx) {
|
|
|
84
90
|
/* @__PURE__ */ jsx(SidebarVisibilityPrepaint, { hideSidebar })
|
|
85
91
|
] }),
|
|
86
92
|
lang: locale,
|
|
93
|
+
dataThemePack,
|
|
87
94
|
noindex: settings.noindex,
|
|
88
95
|
hideSidebar,
|
|
89
96
|
hideToc,
|
|
@@ -128,7 +135,7 @@ function createDocPageShell(ctx) {
|
|
|
128
135
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
129
136
|
/* @__PURE__ */ jsx("h1", { class: "text-heading font-bold mb-vsp-xs", children: autoIndexLabel }),
|
|
130
137
|
metainfoSlot,
|
|
131
|
-
description && /* @__PURE__ */ jsx("p", { class: "mb-vsp-lg text-title text-muted", children: description }),
|
|
138
|
+
description && /* @__PURE__ */ jsx("p", { class: "mb-vsp-lg text-title text-muted", "data-doc-description": true, children: description }),
|
|
132
139
|
/* @__PURE__ */ jsx(NavCardGrid, { children: autoIndexChildren ?? [] })
|
|
133
140
|
] })
|
|
134
141
|
) : (
|
package/dist/doc-pager/index.js
CHANGED
|
@@ -5,7 +5,7 @@ function createDocPager(ctx) {
|
|
|
5
5
|
assertChromeContext(ctx, "createDocPager");
|
|
6
6
|
const t = ctx.t;
|
|
7
7
|
function DocPager({ prev, next, locale }) {
|
|
8
|
-
return /* @__PURE__ */ jsxs("nav", { class: "mt-vsp-2xl grid grid-cols-2 gap-hsp-xl", children: [
|
|
8
|
+
return /* @__PURE__ */ jsxs("nav", { class: "mt-vsp-2xl grid grid-cols-2 gap-hsp-xl", "data-doc-pager": true, children: [
|
|
9
9
|
prev ? /* @__PURE__ */ jsxs(
|
|
10
10
|
"a",
|
|
11
11
|
{
|
|
@@ -63,7 +63,7 @@ export interface DocRouteEntriesContext {
|
|
|
63
63
|
/** Filter top-level nav nodes by a categoryMatch value. */
|
|
64
64
|
getNavSubtree: (tree: DocNavNode[], categoryMatch?: string) => DocNavNode[];
|
|
65
65
|
/** Convert a content entry slug to a canonical route slug. */
|
|
66
|
-
toRouteSlug: (
|
|
66
|
+
toRouteSlug: (entrySlug: string) => string;
|
|
67
67
|
/** Convert a canonical route slug to an optional-catchall params array. */
|
|
68
68
|
toSlugParams: (slug: string) => string[];
|
|
69
69
|
/** Extract headings from a raw MDX body (bound to settings depth/strategy). */
|
|
@@ -91,7 +91,7 @@ export interface DocRouteEntriesAPI {
|
|
|
91
91
|
* import { createDocRouteEntries } from "@takazudo/zudo-doc/doc-route-entries";
|
|
92
92
|
* import { buildNavTree, buildBreadcrumbs, collectAutoIndexNodes } from "@/utils/docs";
|
|
93
93
|
* import { getNavSectionForSlug, getNavSubtree } from "@/utils/nav-scope";
|
|
94
|
-
* import { toRouteSlug, toSlugParams } from "
|
|
94
|
+
* import { toRouteSlug, toSlugParams } from "@takazudo/zudo-doc/slug";
|
|
95
95
|
* import { extractHeadings } from "./_extract-headings";
|
|
96
96
|
*
|
|
97
97
|
* export const { buildDocRouteEntries } = createDocRouteEntries(routeContext);
|
|
@@ -120,10 +120,10 @@ function DocLayoutWithDefaults(props) {
|
|
|
120
120
|
footer: footerOverride ?? /* @__PURE__ */ jsx(Footer, {}),
|
|
121
121
|
bodyEndComponents,
|
|
122
122
|
bodyEndScripts: bodyEndScripts ?? // Default body-end scripts:
|
|
123
|
-
// - CodeBlockEnhancer wraps every <pre
|
|
124
|
-
// copy + word-wrap controls and emits an SR-announce live
|
|
125
|
-
// region for clipboard feedback.
|
|
126
|
-
// fenced code.
|
|
123
|
+
// - CodeBlockEnhancer wraps every highlighted <pre> (`.hi-root`)
|
|
124
|
+
// with copy + word-wrap controls and emits an SR-announce live
|
|
125
|
+
// region for clipboard feedback.
|
|
126
|
+
// Idempotent on pages with no fenced code.
|
|
127
127
|
// - TabsInit activates the correct tab panel and wires click
|
|
128
128
|
// handlers for <Tabs> components.
|
|
129
129
|
// - MermaidInit lazily imports the mermaid library from
|