@takazudo/zudo-doc 3.3.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 +32 -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 -10
- package/dist/chrome/derive.js +53 -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 +68 -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 +71 -3
- package/dist/color-scheme-utils.js +137 -0
- package/dist/color-schemes-defaults/index.js +13 -0
- package/dist/config.d.ts +28 -12
- package/dist/config.js +11 -2
- 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 +45 -40
- package/dist/design-token-panel-bootstrap.js +98 -21
- package/dist/design-token-panel-config/index.js +1 -4
- 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 +39 -17
- package/dist/doc-body-end-islands/index.js +13 -21
- 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.js +1 -5
- 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 +42 -4
- package/dist/features.css +55 -43
- package/dist/footer/footer.js +1 -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/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 +11 -1
- 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 +19 -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 +2 -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 +27 -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/versions-page/index.d.ts +2 -2
- package/dist/versions-page/index.js +8 -8
- 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 +35 -29
- package/routes-src/404.tsx +4 -1
- package/routes-src/_chrome.tsx +6 -5
- package/routes-src/_context.ts +4 -0
- package/routes-src/_docs-helpers.ts +9 -29
- package/routes-src/_virtual.d.ts +4 -0
- package/virtual-modules.d.ts +4 -0
- package/zfb-config-shim.d.ts +40 -18
- 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
|
@@ -55,6 +55,16 @@ export interface Ramps {
|
|
|
55
55
|
export type SemanticKey = "surface" | "muted" | "accent" | "accentHover" | "codeBg" | "codeFg" | "success" | "danger" | "warning" | "info" | "mermaidNodeBg" | "mermaidText" | "mermaidLine" | "mermaidLabelBg" | "mermaidNoteBg" | "chatUserBg" | "chatUserText" | "chatAssistantBg" | "chatAssistantText" | "imageOverlayBg" | "imageOverlayFg" | "matchedKeywordBg" | "matchedKeywordFg";
|
|
56
56
|
/** Canonical order of the 23 semantic roles — used for `--zd-*` emit. */
|
|
57
57
|
export declare const SEMANTIC_KEYS: readonly SemanticKey[];
|
|
58
|
+
/**
|
|
59
|
+
* Compact Tier-2 syntax vocabulary. zfb's fixed 18-role renderer taxonomy is
|
|
60
|
+
* intentionally collapsed onto these nine public design decisions; see
|
|
61
|
+
* `ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN` below.
|
|
62
|
+
*/
|
|
63
|
+
export declare const SYNTAX_SEMANTIC_KEYS: readonly ["syntaxComment", "syntaxString", "syntaxNumber", "syntaxKeyword", "syntaxCallable", "syntaxType", "syntaxName", "syntaxInserted", "syntaxDeleted"];
|
|
64
|
+
export type SyntaxSemanticKey = (typeof SYNTAX_SEMANTIC_KEYS)[number];
|
|
65
|
+
/** Existing semantic role inherited when a syntax role has no explicit map. */
|
|
66
|
+
export declare const SYNTAX_SEMANTIC_ALIASES: Readonly<Record<SyntaxSemanticKey, SemanticKey>>;
|
|
67
|
+
export declare const SYNTAX_CSS_NAMES: Readonly<Record<SyntaxSemanticKey, string>>;
|
|
58
68
|
/** The per-mode wiring: each UI role points at a ramp stop (or literal OKLCH)
|
|
59
69
|
* via a `RampRef`. Two `ColorScheme`s (light + dark) share `ramps` but carry
|
|
60
70
|
* their own `ModeMap`. */
|
|
@@ -64,6 +74,9 @@ export interface ModeMap {
|
|
|
64
74
|
selectionBg: RampRef;
|
|
65
75
|
selectionFg: RampRef;
|
|
66
76
|
semantic: Record<SemanticKey, RampRef>;
|
|
77
|
+
/** Syntax-specific overrides. The map is required, while omitted roles
|
|
78
|
+
* inherit the aliases in `SYNTAX_SEMANTIC_ALIASES`. */
|
|
79
|
+
syntax: Partial<Record<SyntaxSemanticKey, RampRef>>;
|
|
67
80
|
}
|
|
68
81
|
/** A complete color scheme — shared Tier-1 ramps + per-mode Tier-2 wiring. */
|
|
69
82
|
export interface ColorScheme {
|
|
@@ -75,6 +88,45 @@ export interface ColorScheme {
|
|
|
75
88
|
* where a mode needs a different stop (or a per-mode AA-tuned literal). */
|
|
76
89
|
export declare const SEMANTIC_RAMP_DEFAULTS: Record<SemanticKey, RampRef>;
|
|
77
90
|
export declare const SEMANTIC_CSS_NAMES: Record<SemanticKey, string>;
|
|
91
|
+
/**
|
|
92
|
+
* Canonical renderer-role contraction shared by native zfb fenced code and
|
|
93
|
+
* `@takazudo/zfb-md-wasm` HTML Preview output. Values name zudo-doc semantic
|
|
94
|
+
* tokens, never palette stops, so renderer/component CSS stays downstream of
|
|
95
|
+
* the theme tier.
|
|
96
|
+
*/
|
|
97
|
+
export declare const ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN: {
|
|
98
|
+
readonly foreground: "codeFg";
|
|
99
|
+
readonly background: "codeBg";
|
|
100
|
+
readonly escape: "syntaxString";
|
|
101
|
+
readonly operator: "codeFg";
|
|
102
|
+
readonly comment: "syntaxComment";
|
|
103
|
+
readonly string: "syntaxString";
|
|
104
|
+
readonly number: "syntaxNumber";
|
|
105
|
+
readonly constant: "syntaxNumber";
|
|
106
|
+
readonly keyword: "syntaxKeyword";
|
|
107
|
+
readonly function: "syntaxCallable";
|
|
108
|
+
readonly type: "syntaxType";
|
|
109
|
+
readonly namespace: "syntaxType";
|
|
110
|
+
readonly property: "syntaxName";
|
|
111
|
+
readonly variable: "syntaxName";
|
|
112
|
+
readonly tag: "syntaxName";
|
|
113
|
+
readonly attribute: "syntaxName";
|
|
114
|
+
readonly punctuation: "codeFg";
|
|
115
|
+
readonly inserted: "syntaxInserted";
|
|
116
|
+
readonly deleted: "syntaxDeleted";
|
|
117
|
+
readonly heading: "syntaxKeyword";
|
|
118
|
+
};
|
|
119
|
+
export type ZfbHighlightRole = keyof typeof ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN;
|
|
120
|
+
/** Percentage of the inserted/deleted foreground mixed into `codeBg`. */
|
|
121
|
+
export declare const SYNTAX_DIFF_BACKGROUND_MIX_PERCENT = 15;
|
|
122
|
+
/**
|
|
123
|
+
* Component-token values for zfb's inserted/deleted background variables.
|
|
124
|
+
* They deliberately do not create public `--zd-syntax-*-bg` roles.
|
|
125
|
+
*/
|
|
126
|
+
export declare const SYNTAX_DIFF_BACKGROUND_CSS: {
|
|
127
|
+
readonly inserted: `color-mix(in srgb, var(${string}) 15%, var(${string}))`;
|
|
128
|
+
readonly deleted: `color-mix(in srgb, var(${string}) 15%, var(${string}))`;
|
|
129
|
+
};
|
|
78
130
|
/**
|
|
79
131
|
* Resolve a `RampRef` to a concrete color string against the given `ramps`.
|
|
80
132
|
* - `{ base: n }` → `ramps.base[n]`
|
|
@@ -90,6 +142,21 @@ export declare function resolveRampRef(ref: RampRef, ramps: Ramps): string;
|
|
|
90
142
|
/** Resolve every semantic role to a concrete color string via the scheme's
|
|
91
143
|
* per-mode `map.semantic` wiring. Returns all 23 keys. */
|
|
92
144
|
export declare function resolveSemanticColors(scheme: ColorScheme): Record<SemanticKey, string>;
|
|
145
|
+
export interface ResolvedSyntaxPalette {
|
|
146
|
+
/** Effective refs retain ramp identity for design-token-panel rows. */
|
|
147
|
+
refs: Record<SyntaxSemanticKey, RampRef>;
|
|
148
|
+
/** Concrete colors used by generated CSS and contrast validation. */
|
|
149
|
+
colors: Record<SyntaxSemanticKey, string>;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Canonical complete syntax resolver. Explicit partial overrides win; missing
|
|
153
|
+
* or invalid overrides inherit the scheme's semantic alias. A defensive
|
|
154
|
+
* `codeFg` / `fg` / first-ramp chain keeps runtime-authored data non-throwing
|
|
155
|
+
* even when it bypasses TypeScript or serde validation.
|
|
156
|
+
*/
|
|
157
|
+
export declare function resolveSyntaxPalette(scheme: ColorScheme): ResolvedSyntaxPalette;
|
|
158
|
+
/** Convenience view of the canonical syntax palette's concrete colors. */
|
|
159
|
+
export declare function resolveSyntaxColors(scheme: ColorScheme): Record<SyntaxSemanticKey, string>;
|
|
93
160
|
export interface TierItem {
|
|
94
161
|
/** Stable id used as the Record key in persisted state (e.g. `surface`). */
|
|
95
162
|
id: string;
|
|
@@ -120,10 +187,10 @@ export interface TierItem {
|
|
|
120
187
|
*/
|
|
121
188
|
export declare function rampRefToPanelDefault(ref: RampRef): string;
|
|
122
189
|
/**
|
|
123
|
-
* Build the
|
|
190
|
+
* Build the 36-row mode-scoped semantic tier's `items` for the design-token
|
|
124
191
|
* panel, from a single (already mode-resolved) `ColorScheme`: 4 base roles
|
|
125
192
|
* (`bg`, `fg`, `selection-bg`, `selection-fg`) followed by the 23
|
|
126
|
-
* `SEMANTIC_KEYS` rows, in that order. Every row's `default` is
|
|
193
|
+
* `SEMANTIC_KEYS` rows and 9 syntax rows, in that order. Every row's `default` is
|
|
127
194
|
* `rampRefToPanelDefault` of the scheme's `map` entry for that role — never a
|
|
128
195
|
* resolved literal color — so the panel's grouped ramp dropdown can decode it
|
|
129
196
|
* back to a ramp reference (the no-snapping guarantee: a scheme with no
|
|
@@ -134,7 +201,7 @@ export declare function buildSemanticTierItems(scheme: ColorScheme): TierItem[];
|
|
|
134
201
|
/** Which tiers a `schemeToCssPairs` call emits:
|
|
135
202
|
* - `"all"` (default) — base roles + `--palette-*` + `--zd-*` semantic
|
|
136
203
|
* - `"palette"` — only the bare Tier-1 `--palette-*` pairs
|
|
137
|
-
* - `"roles"` — base roles + the 23
|
|
204
|
+
* - `"roles"` — base roles + the 23 UI and 9 syntax semantic pairs
|
|
138
205
|
*
|
|
139
206
|
* The split lets `generateLightDarkCssProperties` emit the shared `--palette-*`
|
|
140
207
|
* once (bare) while wrapping the per-mode `--zd-*` roles in `light-dark(…)`.
|
|
@@ -150,6 +217,7 @@ export type CssEmitScope = "all" | "palette" | "roles";
|
|
|
150
217
|
* - Tier-1 ramps: `--palette-base-0..4`, `--palette-accent-0..2`,
|
|
151
218
|
* `--palette-state-{danger,success,warning,info}`
|
|
152
219
|
* - the 23 Tier-2 `--zd-{role}` semantic tokens
|
|
220
|
+
* - the 9 Tier-2 `--zd-syntax-*` semantic tokens
|
|
153
221
|
*
|
|
154
222
|
* It intentionally does NOT emit the retired `--zd-0..15` slots or `--zd-cursor`.
|
|
155
223
|
*/
|
|
@@ -24,6 +24,39 @@ const SEMANTIC_KEYS = [
|
|
|
24
24
|
"matchedKeywordBg",
|
|
25
25
|
"matchedKeywordFg"
|
|
26
26
|
];
|
|
27
|
+
const SYNTAX_SEMANTIC_KEYS = [
|
|
28
|
+
"syntaxComment",
|
|
29
|
+
"syntaxString",
|
|
30
|
+
"syntaxNumber",
|
|
31
|
+
"syntaxKeyword",
|
|
32
|
+
"syntaxCallable",
|
|
33
|
+
"syntaxType",
|
|
34
|
+
"syntaxName",
|
|
35
|
+
"syntaxInserted",
|
|
36
|
+
"syntaxDeleted"
|
|
37
|
+
];
|
|
38
|
+
const SYNTAX_SEMANTIC_ALIASES = {
|
|
39
|
+
syntaxComment: "muted",
|
|
40
|
+
syntaxString: "success",
|
|
41
|
+
syntaxNumber: "warning",
|
|
42
|
+
syntaxKeyword: "accent",
|
|
43
|
+
syntaxCallable: "info",
|
|
44
|
+
syntaxType: "warning",
|
|
45
|
+
syntaxName: "codeFg",
|
|
46
|
+
syntaxInserted: "success",
|
|
47
|
+
syntaxDeleted: "danger"
|
|
48
|
+
};
|
|
49
|
+
const SYNTAX_CSS_NAMES = {
|
|
50
|
+
syntaxComment: "--zd-syntax-comment",
|
|
51
|
+
syntaxString: "--zd-syntax-string",
|
|
52
|
+
syntaxNumber: "--zd-syntax-number",
|
|
53
|
+
syntaxKeyword: "--zd-syntax-keyword",
|
|
54
|
+
syntaxCallable: "--zd-syntax-callable",
|
|
55
|
+
syntaxType: "--zd-syntax-type",
|
|
56
|
+
syntaxName: "--zd-syntax-name",
|
|
57
|
+
syntaxInserted: "--zd-syntax-inserted",
|
|
58
|
+
syntaxDeleted: "--zd-syntax-deleted"
|
|
59
|
+
};
|
|
27
60
|
const SEMANTIC_RAMP_DEFAULTS = {
|
|
28
61
|
// Re-pointed for the 5-base / 3-accent minimized ramp (#2602); mirrors the
|
|
29
62
|
// Default Dark reference wiring (surface/chatAssistantBg/imageOverlayBg merged
|
|
@@ -79,6 +112,33 @@ const SEMANTIC_CSS_NAMES = {
|
|
|
79
112
|
matchedKeywordBg: "--zd-matched-keyword-bg",
|
|
80
113
|
matchedKeywordFg: "--zd-matched-keyword-fg"
|
|
81
114
|
};
|
|
115
|
+
const ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN = {
|
|
116
|
+
foreground: "codeFg",
|
|
117
|
+
background: "codeBg",
|
|
118
|
+
escape: "syntaxString",
|
|
119
|
+
operator: "codeFg",
|
|
120
|
+
comment: "syntaxComment",
|
|
121
|
+
string: "syntaxString",
|
|
122
|
+
number: "syntaxNumber",
|
|
123
|
+
constant: "syntaxNumber",
|
|
124
|
+
keyword: "syntaxKeyword",
|
|
125
|
+
function: "syntaxCallable",
|
|
126
|
+
type: "syntaxType",
|
|
127
|
+
namespace: "syntaxType",
|
|
128
|
+
property: "syntaxName",
|
|
129
|
+
variable: "syntaxName",
|
|
130
|
+
tag: "syntaxName",
|
|
131
|
+
attribute: "syntaxName",
|
|
132
|
+
punctuation: "codeFg",
|
|
133
|
+
inserted: "syntaxInserted",
|
|
134
|
+
deleted: "syntaxDeleted",
|
|
135
|
+
heading: "syntaxKeyword"
|
|
136
|
+
};
|
|
137
|
+
const SYNTAX_DIFF_BACKGROUND_MIX_PERCENT = 15;
|
|
138
|
+
const SYNTAX_DIFF_BACKGROUND_CSS = {
|
|
139
|
+
inserted: `color-mix(in srgb, var(${SYNTAX_CSS_NAMES.syntaxInserted}) ${SYNTAX_DIFF_BACKGROUND_MIX_PERCENT}%, var(${SEMANTIC_CSS_NAMES.codeBg}))`,
|
|
140
|
+
deleted: `color-mix(in srgb, var(${SYNTAX_CSS_NAMES.syntaxDeleted}) ${SYNTAX_DIFF_BACKGROUND_MIX_PERCENT}%, var(${SEMANTIC_CSS_NAMES.codeBg}))`
|
|
141
|
+
};
|
|
82
142
|
function resolveRampRef(ref, ramps) {
|
|
83
143
|
if (typeof ref === "string") return ref;
|
|
84
144
|
if ("base" in ref) {
|
|
@@ -105,6 +165,61 @@ function resolveSemanticColors(scheme) {
|
|
|
105
165
|
}
|
|
106
166
|
return out;
|
|
107
167
|
}
|
|
168
|
+
function tryResolveRampRef(ref, ramps) {
|
|
169
|
+
if (typeof ref === "string") return ref.trim().length > 0 ? ref : void 0;
|
|
170
|
+
if (!ref || typeof ref !== "object") return void 0;
|
|
171
|
+
const candidate = ref;
|
|
172
|
+
if ("base" in candidate) {
|
|
173
|
+
const index = candidate.base;
|
|
174
|
+
if (typeof index !== "number" || !Number.isInteger(index) || index < 0) return void 0;
|
|
175
|
+
const value = ramps.base[index];
|
|
176
|
+
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
177
|
+
}
|
|
178
|
+
if ("accent" in candidate) {
|
|
179
|
+
const index = candidate.accent;
|
|
180
|
+
if (typeof index !== "number" || !Number.isInteger(index) || index < 0) return void 0;
|
|
181
|
+
const value = ramps.accent[index];
|
|
182
|
+
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
183
|
+
}
|
|
184
|
+
if ("state" in candidate) {
|
|
185
|
+
const state = candidate.state;
|
|
186
|
+
if (typeof state !== "string" || !STATE_ROLES.includes(state)) return void 0;
|
|
187
|
+
const value = ramps.state[state];
|
|
188
|
+
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
189
|
+
}
|
|
190
|
+
return void 0;
|
|
191
|
+
}
|
|
192
|
+
function copyRampRef(ref) {
|
|
193
|
+
return typeof ref === "string" ? ref : { ...ref };
|
|
194
|
+
}
|
|
195
|
+
function resolveSyntaxPalette(scheme) {
|
|
196
|
+
const { ramps, map } = scheme;
|
|
197
|
+
const refs = {};
|
|
198
|
+
const colors = {};
|
|
199
|
+
const emergencyCandidates = [
|
|
200
|
+
map.semantic.codeFg,
|
|
201
|
+
map.fg,
|
|
202
|
+
ramps.base.find((value) => typeof value === "string" && value.trim().length > 0),
|
|
203
|
+
"currentColor"
|
|
204
|
+
];
|
|
205
|
+
const emergencyRef = emergencyCandidates.find(
|
|
206
|
+
(candidate) => tryResolveRampRef(candidate, ramps) !== void 0
|
|
207
|
+
);
|
|
208
|
+
const emergencyColor = tryResolveRampRef(emergencyRef, ramps) ?? "currentColor";
|
|
209
|
+
for (const key of SYNTAX_SEMANTIC_KEYS) {
|
|
210
|
+
const explicitRef = map.syntax[key];
|
|
211
|
+
const explicitColor = tryResolveRampRef(explicitRef, ramps);
|
|
212
|
+
const inheritedRef = map.semantic[SYNTAX_SEMANTIC_ALIASES[key]];
|
|
213
|
+
const inheritedColor = tryResolveRampRef(inheritedRef, ramps);
|
|
214
|
+
const effectiveRef = explicitColor !== void 0 ? explicitRef : inheritedColor !== void 0 ? inheritedRef : emergencyRef;
|
|
215
|
+
refs[key] = copyRampRef(effectiveRef);
|
|
216
|
+
colors[key] = explicitColor ?? inheritedColor ?? emergencyColor;
|
|
217
|
+
}
|
|
218
|
+
return { refs, colors };
|
|
219
|
+
}
|
|
220
|
+
function resolveSyntaxColors(scheme) {
|
|
221
|
+
return resolveSyntaxPalette(scheme).colors;
|
|
222
|
+
}
|
|
108
223
|
function rampRefToPanelDefault(ref) {
|
|
109
224
|
if (typeof ref === "string") return ref;
|
|
110
225
|
if ("base" in ref) return `base:base-${ref.base}`;
|
|
@@ -113,6 +228,7 @@ function rampRefToPanelDefault(ref) {
|
|
|
113
228
|
}
|
|
114
229
|
function buildSemanticTierItems(scheme) {
|
|
115
230
|
const { map } = scheme;
|
|
231
|
+
const syntax = resolveSyntaxPalette(scheme);
|
|
116
232
|
const items = [
|
|
117
233
|
{
|
|
118
234
|
id: "bg",
|
|
@@ -152,6 +268,15 @@ function buildSemanticTierItems(scheme) {
|
|
|
152
268
|
type: { kind: "color", format: "oklch" }
|
|
153
269
|
});
|
|
154
270
|
}
|
|
271
|
+
for (const key of SYNTAX_SEMANTIC_KEYS) {
|
|
272
|
+
items.push({
|
|
273
|
+
id: key,
|
|
274
|
+
cssVar: SYNTAX_CSS_NAMES[key],
|
|
275
|
+
label: key,
|
|
276
|
+
default: rampRefToPanelDefault(syntax.refs[key]),
|
|
277
|
+
type: { kind: "color", format: "oklch" }
|
|
278
|
+
});
|
|
279
|
+
}
|
|
155
280
|
return items;
|
|
156
281
|
}
|
|
157
282
|
function schemeToCssPairs(scheme, scope = "all") {
|
|
@@ -177,6 +302,10 @@ function schemeToCssPairs(scheme, scope = "all") {
|
|
|
177
302
|
for (const key of SEMANTIC_KEYS) {
|
|
178
303
|
pairs.push([SEMANTIC_CSS_NAMES[key], sem[key]]);
|
|
179
304
|
}
|
|
305
|
+
const syntax = resolveSyntaxColors(scheme);
|
|
306
|
+
for (const key of SYNTAX_SEMANTIC_KEYS) {
|
|
307
|
+
pairs.push([SYNTAX_CSS_NAMES[key], syntax[key]]);
|
|
308
|
+
}
|
|
180
309
|
}
|
|
181
310
|
return pairs;
|
|
182
311
|
}
|
|
@@ -212,11 +341,19 @@ export {
|
|
|
212
341
|
SEMANTIC_KEYS,
|
|
213
342
|
SEMANTIC_RAMP_DEFAULTS,
|
|
214
343
|
STATE_ROLES,
|
|
344
|
+
SYNTAX_CSS_NAMES,
|
|
345
|
+
SYNTAX_DIFF_BACKGROUND_CSS,
|
|
346
|
+
SYNTAX_DIFF_BACKGROUND_MIX_PERCENT,
|
|
347
|
+
SYNTAX_SEMANTIC_ALIASES,
|
|
348
|
+
SYNTAX_SEMANTIC_KEYS,
|
|
349
|
+
ZFB_HIGHLIGHT_ROLE_TO_ZUDO_TOKEN,
|
|
215
350
|
buildSemanticTierItems,
|
|
216
351
|
generateCssCustomProperties,
|
|
217
352
|
generateLightDarkCssProperties,
|
|
218
353
|
rampRefToPanelDefault,
|
|
219
354
|
resolveRampRef,
|
|
220
355
|
resolveSemanticColors,
|
|
356
|
+
resolveSyntaxColors,
|
|
357
|
+
resolveSyntaxPalette,
|
|
221
358
|
schemeToCssPairs
|
|
222
359
|
};
|
|
@@ -64,6 +64,13 @@ const darkMap = {
|
|
|
64
64
|
// the amber bg — matched-keyword at threshold+0.1; carried from #2593.
|
|
65
65
|
matchedKeywordBg: "oklch(.700 .158 62)",
|
|
66
66
|
matchedKeywordFg: "oklch(.300 .003 65)"
|
|
67
|
+
},
|
|
68
|
+
// Diff foregrounds are checked against their actual 15% foreground tint on
|
|
69
|
+
// codeBg. The ordinary success/danger aliases are not light enough on that
|
|
70
|
+
// derived dark background, so only these two syntax roles need overrides.
|
|
71
|
+
syntax: {
|
|
72
|
+
syntaxInserted: "oklch(.750 .145 145)",
|
|
73
|
+
syntaxDeleted: "oklch(.820 .100 25)"
|
|
67
74
|
}
|
|
68
75
|
};
|
|
69
76
|
const lightMap = {
|
|
@@ -110,6 +117,12 @@ const lightMap = {
|
|
|
110
117
|
// Default Dark (an amber-on-white highlight reads identically in both modes).
|
|
111
118
|
matchedKeywordBg: "oklch(.700 .158 62)",
|
|
112
119
|
matchedKeywordFg: "oklch(.300 .003 65)"
|
|
120
|
+
},
|
|
121
|
+
// Slightly darker than the shared success/danger aliases so the foregrounds
|
|
122
|
+
// retain >= 4.6:1 on their own 15% tints over the light code background.
|
|
123
|
+
syntax: {
|
|
124
|
+
syntaxInserted: "oklch(.460 .140 145)",
|
|
125
|
+
syntaxDeleted: "oklch(.490 .170 25)"
|
|
113
126
|
}
|
|
114
127
|
};
|
|
115
128
|
const defaultColorSchemes = {
|
package/dist/config.d.ts
CHANGED
|
@@ -192,8 +192,8 @@ export interface ZudoDocConfig {
|
|
|
192
192
|
*/
|
|
193
193
|
tagGovernance?: TagGovernanceMode;
|
|
194
194
|
/**
|
|
195
|
-
* Whether the tag vocabulary is consulted at runtime (
|
|
196
|
-
*
|
|
195
|
+
* Whether the canonical tag vocabulary is consulted at runtime (validation
|
|
196
|
+
* and grouped footer rendering). Orthogonal to `tagGovernance`.
|
|
197
197
|
* The vocabulary ENTRIES are supplied separately via `tagVocabularyEntries`.
|
|
198
198
|
* @default false
|
|
199
199
|
*/
|
|
@@ -229,8 +229,8 @@ export interface ZudoDocConfig {
|
|
|
229
229
|
*/
|
|
230
230
|
aiAssistant?: boolean;
|
|
231
231
|
/**
|
|
232
|
-
* Short-circuit `/api/ai-chat` with a fixed "disabled" reply (no API key
|
|
233
|
-
* KV
|
|
232
|
+
* Short-circuit `/api/ai-chat` with a fixed "disabled" reply (no API key,
|
|
233
|
+
* KV/DO binding, or rate limiter touched).
|
|
234
234
|
* @default false
|
|
235
235
|
*/
|
|
236
236
|
aiChatDemoMode?: boolean;
|
|
@@ -241,8 +241,9 @@ export interface ZudoDocConfig {
|
|
|
241
241
|
*/
|
|
242
242
|
aiChatAllowedOrigins?: string[];
|
|
243
243
|
/**
|
|
244
|
-
*
|
|
245
|
-
* to disable
|
|
244
|
+
* Exact UTC-day paid-call admission cap across all IPs for `/api/ai-chat`,
|
|
245
|
+
* or `false` to disable it. Admissions are not refunded after provider
|
|
246
|
+
* failure and are not provider-confirmed spend accounting.
|
|
246
247
|
* @default false
|
|
247
248
|
*/
|
|
248
249
|
aiChatGlobalDailyLimit?: number | false;
|
|
@@ -261,12 +262,6 @@ export interface ZudoDocConfig {
|
|
|
261
262
|
* @default 4
|
|
262
263
|
*/
|
|
263
264
|
tocMaxDepth?: number;
|
|
264
|
-
/**
|
|
265
|
-
* Heading-ID (anchor) strategy. `"hierarchical"` prefixes each anchor with
|
|
266
|
-
* its ancestor chain; `"flat"` is zfb's legacy github-slugger scheme.
|
|
267
|
-
* @default "hierarchical"
|
|
268
|
-
*/
|
|
269
|
-
headingIdStrategy?: "flat" | "hierarchical";
|
|
270
265
|
/**
|
|
271
266
|
* Enable the draggable sidebar resizer.
|
|
272
267
|
* @default false
|
|
@@ -374,6 +369,27 @@ export interface ZudoDocConfig {
|
|
|
374
369
|
* @default undefined (package-default builder is used)
|
|
375
370
|
*/
|
|
376
371
|
designTokenPanelConfigModule?: string;
|
|
372
|
+
/**
|
|
373
|
+
* Active theme pack slug. "default" is the stock zudo-doc look (no pack
|
|
374
|
+
* stylesheet loaded). Must be a member of the resolved `themePacks` list;
|
|
375
|
+
* an unknown slug fails the build loudly at plugin setup.
|
|
376
|
+
* @default "default"
|
|
377
|
+
*/
|
|
378
|
+
themePack?: string;
|
|
379
|
+
/**
|
|
380
|
+
* Mount the bottom-right theme-pack switcher flyout (and its browse-all
|
|
381
|
+
* dialog) on every page.
|
|
382
|
+
* @default false
|
|
383
|
+
*/
|
|
384
|
+
themePackSwitcher?: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Enabled pack slugs, in switcher order. `undefined` = all bundled packs:
|
|
387
|
+
* "default" first, then the bundled registry in canonical
|
|
388
|
+
* (alphabetical-by-slug) order. An explicit list is authoritative — may omit
|
|
389
|
+
* "default", reorder freely; duplicates/unknown slugs fail loudly.
|
|
390
|
+
* @default undefined
|
|
391
|
+
*/
|
|
392
|
+
themePacks?: string[];
|
|
377
393
|
/**
|
|
378
394
|
* Replace the default docs-frontmatter zod schema builder entirely. When
|
|
379
395
|
* omitted, `zudoDoc()` builds the default schema
|
package/dist/config.js
CHANGED
|
@@ -45,11 +45,12 @@ const DEFAULT_SETTINGS = {
|
|
|
45
45
|
aiAssistant: false,
|
|
46
46
|
aiChatDemoMode: false,
|
|
47
47
|
aiChatAllowedOrigins: [],
|
|
48
|
+
// Exact UTC-day paid-call admission cap; false disables it. An admission is
|
|
49
|
+
// consumed before provider fetch and is not provider-confirmed accounting.
|
|
48
50
|
aiChatGlobalDailyLimit: false,
|
|
49
51
|
designTokenPanel: false,
|
|
50
52
|
tocMinDepth: 2,
|
|
51
53
|
tocMaxDepth: 4,
|
|
52
|
-
headingIdStrategy: "hierarchical",
|
|
53
54
|
sidebarResizer: false,
|
|
54
55
|
sidebarToggle: false,
|
|
55
56
|
imageEnlarge: false,
|
|
@@ -65,9 +66,17 @@ const DEFAULT_SETTINGS = {
|
|
|
65
66
|
footer: false,
|
|
66
67
|
headerNav: [],
|
|
67
68
|
headerRightItems: [{ type: "component", component: "theme-toggle" }],
|
|
68
|
-
packageOwnedRoutes: true
|
|
69
|
+
packageOwnedRoutes: true,
|
|
70
|
+
themePack: "default",
|
|
71
|
+
themePackSwitcher: false,
|
|
72
|
+
themePacks: void 0
|
|
69
73
|
};
|
|
70
74
|
function zudoDoc(user = {}) {
|
|
75
|
+
if ("headingIdStrategy" in user) {
|
|
76
|
+
throw new TypeError(
|
|
77
|
+
"headingIdStrategy is no longer supported; heading IDs are always hierarchical"
|
|
78
|
+
);
|
|
79
|
+
}
|
|
71
80
|
const {
|
|
72
81
|
port,
|
|
73
82
|
adapter,
|
|
@@ -16,22 +16,6 @@ import { ContentCode } from "./content-code.js";
|
|
|
16
16
|
* into a larger components object that also includes admonition overrides,
|
|
17
17
|
* custom shortcodes, etc.) at the Astro page layer.
|
|
18
18
|
*/
|
|
19
|
-
export declare const htmlOverrides: {
|
|
20
|
-
h2: typeof HeadingH2;
|
|
21
|
-
h3: typeof HeadingH3;
|
|
22
|
-
h4: typeof HeadingH4;
|
|
23
|
-
p: typeof ContentParagraph;
|
|
24
|
-
a: typeof ContentLink;
|
|
25
|
-
strong: typeof ContentStrong;
|
|
26
|
-
blockquote: typeof ContentBlockquote;
|
|
27
|
-
ul: typeof ContentUl;
|
|
28
|
-
ol: typeof ContentOl;
|
|
29
|
-
table: typeof ContentTable;
|
|
30
|
-
code: typeof ContentCode;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Alias for `htmlOverrides`. Prefer this name in new consumer code.
|
|
34
|
-
*/
|
|
35
19
|
export declare const defaultComponents: {
|
|
36
20
|
h2: typeof HeadingH2;
|
|
37
21
|
h3: typeof HeadingH3;
|
|
@@ -9,7 +9,7 @@ import { ContentUl } from "./content-ul.js";
|
|
|
9
9
|
import { ContentOl } from "./content-ol.js";
|
|
10
10
|
import { ContentTable } from "./content-table.js";
|
|
11
11
|
import { ContentCode } from "./content-code.js";
|
|
12
|
-
const
|
|
12
|
+
const defaultComponents = {
|
|
13
13
|
h2: HeadingH2,
|
|
14
14
|
h3: HeadingH3,
|
|
15
15
|
h4: HeadingH4,
|
|
@@ -22,8 +22,6 @@ const htmlOverrides = {
|
|
|
22
22
|
table: ContentTable,
|
|
23
23
|
code: ContentCode
|
|
24
24
|
};
|
|
25
|
-
const defaultComponents = htmlOverrides;
|
|
26
25
|
export {
|
|
27
|
-
defaultComponents
|
|
28
|
-
htmlOverrides
|
|
26
|
+
defaultComponents
|
|
29
27
|
};
|
package/dist/content/index.d.ts
CHANGED
|
@@ -26,4 +26,4 @@ export { ContentUl } from "./content-ul.js";
|
|
|
26
26
|
export { ContentOl } from "./content-ol.js";
|
|
27
27
|
export { ContentTable } from "./content-table.js";
|
|
28
28
|
export { ContentCode } from "./content-code.js";
|
|
29
|
-
export {
|
|
29
|
+
export { defaultComponents } from "./component-map.js";
|
package/dist/content/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { ContentUl } from "./content-ul.js";
|
|
|
9
9
|
import { ContentOl } from "./content-ol.js";
|
|
10
10
|
import { ContentTable } from "./content-table.js";
|
|
11
11
|
import { ContentCode } from "./content-code.js";
|
|
12
|
-
import {
|
|
12
|
+
import { defaultComponents } from "./component-map.js";
|
|
13
13
|
export {
|
|
14
14
|
ContentBlockquote,
|
|
15
15
|
ContentCode,
|
|
@@ -22,6 +22,5 @@ export {
|
|
|
22
22
|
HeadingH2,
|
|
23
23
|
HeadingH3,
|
|
24
24
|
HeadingH4,
|
|
25
|
-
defaultComponents
|
|
26
|
-
htmlOverrides
|
|
25
|
+
defaultComponents
|
|
27
26
|
};
|
package/dist/content.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* drift). See zudolab/zudo-doc#2188.
|
|
11
11
|
*
|
|
12
12
|
* Component-first split: the major elements (h2–h4, p, a, strong, blockquote,
|
|
13
|
-
* ul, ol, table) get their VISUALS from the package's `
|
|
13
|
+
* ul, ol, table) get their VISUALS from the package's `defaultComponents` Preact
|
|
14
14
|
* components (Tailwind classes + inline styles), whose utilities ship in
|
|
15
15
|
* `dist/safelist.css`. This file owns only what those components do NOT emit:
|
|
16
16
|
* the flow-space vertical rhythm, heading `--flow-space` + tightening, the
|
|
@@ -6,25 +6,17 @@
|
|
|
6
6
|
*
|
|
7
7
|
* `bootstrapDesignTokenPanel` is a callable that configures zdtp's panel and
|
|
8
8
|
* wires its lifecycle hooks to zfb's navigation events via
|
|
9
|
-
* `setLifecycleAdapter()`.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* `setLifecycleAdapter()`. It receives a mode-scoped PanelConfig builder —
|
|
10
|
+
* either a project override or the package default from
|
|
11
|
+
* `@takazudo/zudo-doc/design-token-panel-config`.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* The current call shape is a mode-scoped builder. It rebuilds the panel per
|
|
14
|
+
* light/dark mode on every `color-scheme-changed` toggle:
|
|
14
15
|
*
|
|
15
|
-
* // Mode-scoped builder — rebuilds the panel per light/dark mode on every
|
|
16
|
-
* // `color-scheme-changed` toggle:
|
|
17
16
|
* import { bootstrapDesignTokenPanel } from "@takazudo/zudo-doc/design-token-panel-bootstrap";
|
|
18
17
|
* import { buildDesignTokenPanelConfig } from "@/config/design-token-panel-config";
|
|
19
18
|
* bootstrapDesignTokenPanel(buildDesignTokenPanelConfig);
|
|
20
19
|
*
|
|
21
|
-
* // Plain config (back-compat — generated projects on the old shape):
|
|
22
|
-
* import { designTokenPanelConfig } from "@/config/design-token-panel-config";
|
|
23
|
-
* bootstrapDesignTokenPanel(designTokenPanelConfig);
|
|
24
|
-
*
|
|
25
|
-
* A plain-config caller gets NO toggle listener (a static config has nothing to
|
|
26
|
-
* rebuild), so existing generated projects keep working with zero changes.
|
|
27
|
-
*
|
|
28
20
|
* `DesignTokenPanelBootstrap` (below) is the PACKAGE-OWNED island component
|
|
29
21
|
* that wires the mode-scoped builder for package-owned routes with no host
|
|
30
22
|
* config file — the #2658 "Approach (a)" package default. It resolves its
|
|
@@ -32,27 +24,25 @@
|
|
|
32
24
|
* module the routes plugin registers (`../plugins/routes.ts`): absent a host
|
|
33
25
|
* `designTokenPanelConfigModule` override, that resolves to
|
|
34
26
|
* `@takazudo/zudo-doc/design-token-panel-config`'s `buildDesignTokenPanelConfig`.
|
|
35
|
-
* `packages/zudo-doc/src/
|
|
36
|
-
* island scanner walks route →
|
|
37
|
-
* #2480 static-import
|
|
38
|
-
* `
|
|
39
|
-
*
|
|
40
|
-
* same as always.
|
|
27
|
+
* `packages/zudo-doc/src/chrome/derive.tsx` statically imports it so zfb's
|
|
28
|
+
* island scanner walks route → chrome → derive → here (mirrors the DocHistory
|
|
29
|
+
* #2480 static-import contract). A host that ejects entirely can call
|
|
30
|
+
* `bootstrapDesignTokenPanel` with its own builder, but current package-owned
|
|
31
|
+
* routes use this component directly.
|
|
41
32
|
*
|
|
42
33
|
* KNOWN COUPLING: `DesignTokenPanelBootstrap`'s top-level import of
|
|
43
34
|
* `virtual:zudo-doc-design-token-panel-config` requires the routes plugin
|
|
44
35
|
* (`settings.packageOwnedRoutes`, default `true`) to be active in the
|
|
45
36
|
* consuming project, since that plugin is what registers the virtual module.
|
|
46
37
|
* A project that explicitly sets `packageOwnedRoutes: false` AND wants to
|
|
47
|
-
* reuse the bare `bootstrapDesignTokenPanel` export for its own
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* `DesignTokenPanelBootstrap` itself.
|
|
38
|
+
* reuse the bare `bootstrapDesignTokenPanel` export for its own component is
|
|
39
|
+
* unaffected — that import graph never reaches `DesignTokenPanelBootstrap` —
|
|
40
|
+
* but a `packageOwnedRoutes: false` project must not import the package island
|
|
41
|
+
* component itself.
|
|
52
42
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
43
|
+
* Package-first wiring landed in S9a zudolab/zudo-doc#2333; mode-scoped rebuild
|
|
44
|
+
* wiring was added in zudolab/zudo-doc#2610 and the package-default island in
|
|
45
|
+
* #2658.
|
|
56
46
|
*
|
|
57
47
|
* CSS is pulled via `@import "@takazudo/zdtp/styles.css"` in the project's
|
|
58
48
|
* `src/styles/global.css` so the panel chrome lands in the main page CSS
|
|
@@ -65,28 +55,43 @@ import { type PanelConfig } from "@takazudo/zdtp";
|
|
|
65
55
|
/** Active color-scheme mode, read from `<html data-theme>`. */
|
|
66
56
|
type ColorSchemeMode = "light" | "dark";
|
|
67
57
|
/**
|
|
68
|
-
* A per-mode PanelConfig factory.
|
|
69
|
-
* defaults
|
|
70
|
-
* in the host's `design-token-panel-config.ts`).
|
|
58
|
+
* A per-mode PanelConfig factory. The package default and host overrides use
|
|
59
|
+
* this same shape so panel defaults follow the live light/dark mode.
|
|
71
60
|
*/
|
|
72
61
|
export type PanelConfigBuilder = (mode: ColorSchemeMode) => PanelConfig;
|
|
62
|
+
/**
|
|
63
|
+
* Theme-pack storage-prefix rule (ADR theme-packs.md Decision 4), enforced
|
|
64
|
+
* CENTRALLY here — never per-builder, so host builders supplied via
|
|
65
|
+
* `designTokenPanelConfigModule` cannot cross-contaminate namespaces even if
|
|
66
|
+
* unaware of packs:
|
|
67
|
+
*
|
|
68
|
+
* - active pack `default` → the builder's `storagePrefix` stays BYTE-UNCHANGED
|
|
69
|
+
* (the existing-user carry-over guarantee: `zudo-doc-tweak` keys keep
|
|
70
|
+
* working on the stock look).
|
|
71
|
+
* - any other pack → `${storagePrefix}--<slug>` (double hyphen avoids
|
|
72
|
+
* colliding with zdtp's own `-open`/version suffixes). zdtp derives every
|
|
73
|
+
* key — including the `${prefix}-open` open-state mirror — from the prefix,
|
|
74
|
+
* so tweaks saved under pack A are invisible under pack B and restored
|
|
75
|
+
* verbatim on switch-back.
|
|
76
|
+
*
|
|
77
|
+
* The `PanelConfigBuilder` signature stays `(mode) => PanelConfig` — this is a
|
|
78
|
+
* post-process of the RETURNED config, not a builder-contract change.
|
|
79
|
+
*/
|
|
80
|
+
export declare function withPackScopedStoragePrefix(config: PanelConfig, activePack: string): PanelConfig;
|
|
73
81
|
/**
|
|
74
82
|
* Bootstrap zdtp for a project. Configures the panel, drains any pre-hydration
|
|
75
83
|
* click queue, and wires the zdtp lifecycle adapter to zfb's navigation events
|
|
76
84
|
* so persisted token overrides re-apply on every soft navigation.
|
|
77
85
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* Call this once, as a side-effect import from the project's island wrapper
|
|
83
|
-
* (`src/components/design-token-panel-bootstrap.tsx`).
|
|
86
|
+
* Wires a `color-scheme-changed` listener that rebuilds the panel per
|
|
87
|
+
* light/dark mode (see the toggle sequence below), and a parallel
|
|
88
|
+
* `theme-pack-changed` listener that rebuilds it per theme pack with a
|
|
89
|
+
* pack-scoped storage prefix (ADR theme-packs.md Decision 4, #2822).
|
|
84
90
|
*
|
|
85
|
-
* @param
|
|
86
|
-
*
|
|
87
|
-
* `src/config/design-token-panel-config.ts`.
|
|
91
|
+
* @param buildConfig - The project's `(mode) => PanelConfig` builder for
|
|
92
|
+
* mode-scoped rebuilds.
|
|
88
93
|
*/
|
|
89
|
-
export declare function bootstrapDesignTokenPanel(
|
|
94
|
+
export declare function bootstrapDesignTokenPanel(buildConfig: PanelConfigBuilder): void;
|
|
90
95
|
/**
|
|
91
96
|
* The package-default `<DesignTokenPanelBootstrap/>` island: mounted (via
|
|
92
97
|
* `Island({ when: "load" })`, no `ssrFallback` — it renders nothing on either
|