@takazudo/zudo-doc 3.2.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/README.md +2 -2
- package/bin/tag-cli-config.ts +126 -0
- package/bin/tags-audit-runner.ts +60 -76
- package/bin/tags-audit.mjs +17 -36
- package/bin/tags-suggest-runner.ts +429 -0
- package/bin/tags-suggest.mjs +30 -0
- package/bin/zudo-doc.mjs +78 -25
- package/dist/breadcrumb/breadcrumb.d.ts +4 -4
- package/dist/breadcrumb/find-path.d.ts +2 -2
- package/dist/breadcrumb/index.d.ts +1 -1
- package/dist/breadcrumb/types.d.ts +0 -5
- package/dist/chrome/derive.d.ts +16 -4
- package/dist/chrome/derive.js +64 -4
- package/dist/chrome/index.d.ts +13 -10
- package/dist/chrome/index.js +12 -6
- package/dist/chrome/primary-slots.d.ts +21 -0
- package/dist/chrome/primary-slots.js +59 -0
- package/dist/chrome-bindings.d.ts +227 -0
- package/dist/chrome-bindings.js +6 -0
- package/dist/code-syntax/code-block-enhancer-script.d.ts +4 -0
- package/dist/code-syntax/code-block-enhancer-script.js +7 -4
- package/dist/code-syntax/code-block-enhancer.d.ts +2 -2
- package/dist/code-syntax/code-block-enhancer.js +1 -3
- package/dist/code-syntax/index.d.ts +5 -5
- package/dist/code-syntax/index.js +4 -13
- package/dist/code-syntax/mermaid-init-script.d.ts +1 -22
- package/dist/code-syntax/mermaid-init-script.js +0 -2
- package/dist/code-syntax/mermaid-init.d.ts +0 -1
- package/dist/code-syntax/mermaid-init.js +3 -4
- package/dist/code-syntax/tabs-init.d.ts +0 -1
- package/dist/code-syntax/tabs-init.js +1 -3
- package/dist/code-syntax/tabs.d.ts +0 -1
- package/dist/code-syntax/tabs.js +1 -3
- package/dist/color-scheme-utils.d.ts +72 -4
- package/dist/color-scheme-utils.js +137 -0
- package/dist/color-schemes-defaults/index.d.ts +23 -0
- package/dist/color-schemes-defaults/index.js +134 -0
- package/dist/config.d.ts +459 -0
- package/dist/config.js +125 -0
- package/dist/content/component-map.d.ts +0 -16
- package/dist/content/component-map.js +2 -4
- package/dist/content/index.d.ts +1 -1
- package/dist/content/index.js +2 -3
- package/dist/content.css +1 -1
- package/dist/design-token-panel-bootstrap.d.ts +82 -27
- package/dist/design-token-panel-bootstrap.js +110 -21
- package/dist/design-token-panel-config/index.d.ts +49 -0
- package/dist/design-token-panel-config/index.js +211 -0
- package/dist/design-token-panel-config/manifest.d.ts +46 -0
- package/dist/design-token-panel-config/manifest.js +105 -0
- package/dist/directive-vocabulary-defaults/index.d.ts +16 -0
- package/dist/directive-vocabulary-defaults/index.js +12 -0
- package/dist/doc-body-end-islands/design-token-panel-island.d.ts +15 -0
- package/dist/doc-body-end-islands/design-token-panel-island.js +31 -0
- package/dist/doc-body-end-islands/index.d.ts +52 -7
- package/dist/doc-body-end-islands/index.js +19 -0
- package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +37 -0
- package/dist/doc-body-end-islands/theme-pack-switcher-island.js +18 -0
- package/dist/doc-content-header/index.js +1 -1
- package/dist/doc-history-area/index.d.ts +10 -4
- package/dist/doc-history-area/index.js +3 -2
- package/dist/doc-metainfo-area/index.d.ts +1 -0
- package/dist/doc-page-props/index.d.ts +7 -23
- package/dist/doc-page-renderer/index.d.ts +1 -0
- package/dist/doc-page-renderer/index.js +1 -0
- package/dist/doc-page-shell/index.js +19 -12
- package/dist/doc-pager/index.js +1 -1
- package/dist/doc-route-entries/index.d.ts +2 -2
- package/dist/doclayout/doc-layout-with-defaults.js +4 -4
- package/dist/doclayout/doc-layout.d.ts +8 -0
- package/dist/doclayout/doc-layout.js +10 -1
- package/dist/docs-schema/index.d.ts +67 -0
- package/dist/docs-schema/index.js +43 -0
- package/dist/eject/index.d.ts +16 -0
- package/dist/eject/index.js +122 -28
- package/dist/extract-headings/index.d.ts +5 -8
- package/dist/extract-headings/index.js +2 -9
- package/dist/factory-context/index.d.ts +56 -4
- package/dist/features.css +65 -43
- package/dist/find-in-page/find-bar.d.ts +9 -0
- package/dist/find-in-page/find-bar.js +114 -0
- package/dist/find-in-page/find-in-page.d.ts +17 -0
- package/dist/find-in-page/find-in-page.js +131 -0
- package/dist/find-in-page/index.d.ts +11 -0
- package/dist/find-in-page/index.js +49 -0
- package/dist/footer/footer.js +1 -0
- package/dist/frontmatter-preview-defaults/index.d.ts +16 -0
- package/dist/frontmatter-preview-defaults/index.js +25 -0
- package/dist/head-with-defaults/index.d.ts +2 -0
- package/dist/head-with-defaults/index.js +16 -0
- package/dist/header/header.d.ts +10 -5
- package/dist/header/header.js +45 -5
- package/dist/header/index.d.ts +1 -1
- package/dist/header/types.d.ts +30 -1
- package/dist/header-with-defaults/index.js +1 -0
- package/dist/home-page/index.d.ts +2 -0
- package/dist/home-page/index.js +11 -5
- package/dist/home-page/prepare-home-data.js +1 -1
- package/dist/i18n-defaults/index.d.ts +22 -0
- package/dist/i18n-defaults/index.js +167 -0
- package/dist/locale-merge/index.d.ts +9 -14
- package/dist/locale-merge/index.js +6 -4
- package/dist/mdx-components/index.js +4 -4
- package/dist/plugins/claude-resources.d.ts +1 -0
- package/dist/plugins/claude-resources.js +4 -2
- package/dist/plugins/doc-history.js +1 -1
- package/dist/{integrations → plugins/internal}/claude-resources/index.d.ts +1 -16
- package/dist/{integrations → plugins/internal}/claude-resources/index.js +0 -9
- package/dist/{integrations → plugins/internal}/doc-history/index.d.ts +0 -17
- package/dist/{integrations → plugins/internal}/doc-history/index.js +0 -4
- package/dist/{integrations → plugins/internal}/doc-history/pre-build.d.ts +2 -4
- package/dist/plugins/internal/llms-txt/index.d.ts +7 -0
- package/dist/{integrations → plugins/internal}/llms-txt/load.d.ts +1 -1
- package/dist/{integrations → plugins/internal}/llms-txt/load.js +2 -2
- package/dist/{integrations → plugins/internal}/llms-txt/strip.d.ts +2 -3
- package/dist/{integrations → plugins/internal}/llms-txt/strip.js +1 -1
- package/dist/{integrations → plugins/internal}/llms-txt/types.d.ts +13 -22
- package/dist/{integrations → plugins/internal}/search-index/collect.js +1 -1
- package/dist/plugins/internal/theme-packs/copy.d.ts +32 -0
- package/dist/plugins/internal/theme-packs/copy.js +45 -0
- package/dist/plugins/internal/theme-packs/dev-middleware.d.ts +22 -0
- package/dist/plugins/internal/theme-packs/dev-middleware.js +80 -0
- package/dist/plugins/internal/theme-packs/index.d.ts +6 -0
- package/dist/plugins/internal/theme-packs/index.js +9 -0
- package/dist/plugins/internal/theme-packs/resolve.d.ts +17 -0
- package/dist/plugins/internal/theme-packs/resolve.js +17 -0
- package/dist/plugins/internal/theme-packs/types.d.ts +22 -0
- package/dist/plugins/internal/theme-packs/types.js +0 -0
- package/dist/plugins/llms-txt.js +1 -1
- package/dist/plugins/routes.js +55 -21
- package/dist/plugins/search-index.js +1 -1
- package/dist/plugins/theme-packs.d.ts +3 -0
- package/dist/plugins/theme-packs.js +40 -0
- package/dist/preset.d.ts +28 -14
- package/dist/preset.js +24 -9
- package/dist/route-context/index.js +4 -6
- package/dist/route-enumerators/index.d.ts +6 -18
- package/dist/route-enumerators/index.js +8 -6
- package/dist/routes/404.js +3 -1
- package/dist/routes/_chrome.js +3 -2
- package/dist/routes/_context.d.ts +7 -3
- package/dist/routes/_context.js +2 -0
- package/dist/routes/_docs-helpers.js +9 -21
- package/dist/safelist.css +1 -1
- package/dist/settings.d.ts +64 -12
- package/dist/sidebar-tree/build-tree.d.ts +3 -4
- package/dist/sidebar-tree/build-tree.js +4 -3
- package/dist/sidebar-tree/index.d.ts +2 -2
- package/dist/sidebar-tree/types.d.ts +6 -17
- package/dist/site-tree-nav-island/index.d.ts +3 -1
- package/dist/site-tree-nav-island/index.js +17 -5
- package/dist/site-tree-nav-island/state.d.ts +4 -0
- package/dist/site-tree-nav-island/state.js +10 -0
- package/dist/tag-helpers/index.d.ts +6 -13
- package/dist/tag-helpers/index.js +5 -23
- package/dist/tag-pages/index.d.ts +8 -21
- package/dist/tag-pages/index.js +14 -10
- package/dist/tags-audit.d.ts +16 -44
- package/dist/tags-audit.js +9 -172
- package/dist/theme/color-scheme-provider.d.ts +2 -3
- package/dist/theme/color-scheme-provider.js +2 -10
- package/dist/theme/index.d.ts +1 -4
- package/dist/theme/index.js +2 -30
- package/dist/theme/theme-pack-provider.d.ts +42 -0
- package/dist/theme/theme-pack-provider.js +75 -0
- package/dist/theme-cli/apply.d.ts +16 -0
- package/dist/theme-cli/apply.js +61 -0
- package/dist/theme-cli/config-io.d.ts +15 -0
- package/dist/theme-cli/config-io.js +51 -0
- package/dist/theme-cli/config-rewriter.d.ts +21 -0
- package/dist/theme-cli/config-rewriter.js +141 -0
- package/dist/theme-cli/config-scanner.d.ts +63 -0
- package/dist/theme-cli/config-scanner.js +288 -0
- package/dist/theme-cli/index.d.ts +7 -0
- package/dist/theme-cli/index.js +38 -0
- package/dist/theme-cli/list.d.ts +27 -0
- package/dist/theme-cli/list.js +64 -0
- package/dist/theme-cli/provenance.d.ts +17 -0
- package/dist/theme-cli/provenance.js +35 -0
- package/dist/theme-cli/registry.d.ts +14 -0
- package/dist/theme-cli/registry.js +13 -0
- package/dist/theme-pack-dialog/dialog-state.d.ts +25 -0
- package/dist/theme-pack-dialog/dialog-state.js +40 -0
- package/dist/theme-pack-dialog/index.d.ts +5 -0
- package/dist/theme-pack-dialog/index.js +152 -0
- package/dist/theme-pack-dialog/theme-pack-card.d.ts +25 -0
- package/dist/theme-pack-dialog/theme-pack-card.js +72 -0
- package/dist/theme-pack-switcher/index.d.ts +49 -0
- package/dist/theme-pack-switcher/index.js +205 -0
- package/dist/theme-pack-switcher/switcher-state.d.ts +56 -0
- package/dist/theme-pack-switcher/switcher-state.js +43 -0
- package/dist/theme-pack-switcher/theme-pack-sync.d.ts +85 -0
- package/dist/theme-pack-switcher/theme-pack-sync.js +121 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-400-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-700-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-400-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegible-italic-700-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-italic-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/AtkinsonHyperlegibleMono-latin.woff2 +0 -0
- package/dist/theme-packs/beacon/fonts/OFL.txt +94 -0
- package/dist/theme-packs/beacon/meta.json +37 -0
- package/dist/theme-packs/beacon/pack.css +442 -0
- package/dist/theme-packs/broadsheet/fonts/CourierPrime-400-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/CourierPrime-700-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/OFL.txt +95 -0
- package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-italic-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/PlayfairDisplay-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/SourceSerif4-italic-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/fonts/SourceSerif4-latin.woff2 +0 -0
- package/dist/theme-packs/broadsheet/meta.json +38 -0
- package/dist/theme-packs/broadsheet/pack.css +448 -0
- package/dist/theme-packs/brutalist/fonts/ArchivoBlack-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/fonts/IBMPlexMono-700-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/fonts/OFL.txt +95 -0
- package/dist/theme-packs/brutalist/fonts/SpaceGrotesk-latin.woff2 +0 -0
- package/dist/theme-packs/brutalist/meta.json +38 -0
- package/dist/theme-packs/brutalist/pack.css +546 -0
- package/dist/theme-packs/default/meta.json +37 -0
- package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexSans-italic-latin.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexSans-latin-ext.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/IBMPlexSans-latin.woff2 +0 -0
- package/dist/theme-packs/drift/fonts/OFL.txt +93 -0
- package/dist/theme-packs/drift/meta.json +37 -0
- package/dist/theme-packs/drift/pack.css +478 -0
- package/dist/theme-packs/fjord/fonts/Inter-latin-ext.woff2 +0 -0
- package/dist/theme-packs/fjord/fonts/Inter-latin.woff2 +0 -0
- package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
- package/dist/theme-packs/fjord/fonts/JetBrainsMono-latin.woff2 +0 -0
- package/dist/theme-packs/fjord/fonts/OFL.txt +94 -0
- package/dist/theme-packs/fjord/meta.json +37 -0
- package/dist/theme-packs/fjord/pack.css +375 -0
- package/dist/theme-packs/foundry/fonts/Inter-latin-ext.woff2 +0 -0
- package/dist/theme-packs/foundry/fonts/Inter-latin.woff2 +0 -0
- package/dist/theme-packs/foundry/fonts/OFL.txt +93 -0
- package/dist/theme-packs/foundry/meta.json +37 -0
- package/dist/theme-packs/foundry/pack.css +202 -0
- package/dist/theme-packs/futura-editorial/fonts/Jost-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/fonts/NotoSans-italic-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/fonts/NotoSans-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/fonts/OFL.txt +95 -0
- package/dist/theme-packs/futura-editorial/fonts/SpaceMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/fonts/SpaceMono-700-latin.woff2 +0 -0
- package/dist/theme-packs/futura-editorial/meta.json +38 -0
- package/dist/theme-packs/futura-editorial/pack.css +313 -0
- package/dist/theme-packs/hearth/fonts/Fraunces-italic-latin.woff2 +0 -0
- package/dist/theme-packs/hearth/fonts/Fraunces-latin.woff2 +0 -0
- package/dist/theme-packs/hearth/fonts/Nunito-latin.woff2 +0 -0
- package/dist/theme-packs/hearth/fonts/OFL.txt +95 -0
- package/dist/theme-packs/hearth/fonts/SplineSansMono-latin.woff2 +0 -0
- package/dist/theme-packs/hearth/meta.json +38 -0
- package/dist/theme-packs/hearth/pack.css +385 -0
- package/dist/theme-packs/hollow/fonts/OFL.txt +94 -0
- package/dist/theme-packs/hollow/fonts/SpaceGrotesk-latin.woff2 +0 -0
- package/dist/theme-packs/hollow/fonts/SpaceMono-400-italic-latin.woff2 +0 -0
- package/dist/theme-packs/hollow/fonts/SpaceMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/hollow/fonts/SpaceMono-700-latin.woff2 +0 -0
- package/dist/theme-packs/hollow/meta.json +37 -0
- package/dist/theme-packs/hollow/pack.css +428 -0
- package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext-italic.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-ext.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/CrimsonPro-latin-italic.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/CrimsonPro-latin.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/ledger/fonts/OFL.txt +94 -0
- package/dist/theme-packs/ledger/meta.json +37 -0
- package/dist/theme-packs/ledger/pack.css +463 -0
- package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/CourierPrime-400-latin.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin-ext.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/CourierPrime-700-latin.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/EBGaramond-latin-italic.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/EBGaramond-latin.woff2 +0 -0
- package/dist/theme-packs/manuscript/fonts/OFL.txt +94 -0
- package/dist/theme-packs/manuscript/meta.json +37 -0
- package/dist/theme-packs/manuscript/pack.css +376 -0
- package/dist/theme-packs/matcha/fonts/MPLUS1Code-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/fonts/OFL.txt +95 -0
- package/dist/theme-packs/matcha/fonts/ShipporiMincho-500-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/fonts/ShipporiMincho-700-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
- package/dist/theme-packs/matcha/meta.json +38 -0
- package/dist/theme-packs/matcha/pack.css +409 -0
- package/dist/theme-packs/nocturne/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/CormorantGaramond-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/IBMPlexMono-italic-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/Manrope-latin.woff2 +0 -0
- package/dist/theme-packs/nocturne/fonts/OFL.txt +95 -0
- package/dist/theme-packs/nocturne/meta.json +38 -0
- package/dist/theme-packs/nocturne/pack.css +502 -0
- package/dist/theme-packs/observatory/fonts/JosefinSans-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/Jost-italic-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/Jost-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/OFL.txt +95 -0
- package/dist/theme-packs/observatory/fonts/SpaceMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/SpaceMono-700-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/fonts/SpaceMono-italic-latin.woff2 +0 -0
- package/dist/theme-packs/observatory/meta.json +38 -0
- package/dist/theme-packs/observatory/pack.css +728 -0
- package/dist/theme-packs/onyx/fonts/CormorantGaramond-italic-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/CormorantGaramond-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/Jost-latin.woff2 +0 -0
- package/dist/theme-packs/onyx/fonts/OFL.txt +95 -0
- package/dist/theme-packs/onyx/meta.json +38 -0
- package/dist/theme-packs/onyx/pack.css +497 -0
- package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin-ext.woff2 +0 -0
- package/dist/theme-packs/phosphor/fonts/JetBrainsMono-latin.woff2 +0 -0
- package/dist/theme-packs/phosphor/fonts/OFL.txt +94 -0
- package/dist/theme-packs/phosphor/fonts/VT323-latin-ext.woff2 +0 -0
- package/dist/theme-packs/phosphor/fonts/VT323-latin.woff2 +0 -0
- package/dist/theme-packs/phosphor/meta.json +38 -0
- package/dist/theme-packs/phosphor/pack.css +493 -0
- package/dist/theme-packs/solar/fonts/OFL.txt +94 -0
- package/dist/theme-packs/solar/fonts/SourceCodePro-italic-latin.woff2 +0 -0
- package/dist/theme-packs/solar/fonts/SourceCodePro-latin.woff2 +0 -0
- package/dist/theme-packs/solar/fonts/SourceSans3-italic-latin.woff2 +0 -0
- package/dist/theme-packs/solar/fonts/SourceSans3-latin.woff2 +0 -0
- package/dist/theme-packs/solar/meta.json +37 -0
- package/dist/theme-packs/solar/pack.css +380 -0
- package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin-ext.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/IBMPlexMono-500-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/OFL.txt +95 -0
- package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-600-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-700-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/ShipporiMinchoB1-800-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
- package/dist/theme-packs/sumi/meta.json +38 -0
- package/dist/theme-packs/sumi/pack.css +502 -0
- package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin-ext.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-400-latin.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/IBMPlexMono-600-latin.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/Inter-latin-ext.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/Inter-latin.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/InterTight-latin.woff2 +0 -0
- package/dist/theme-packs/swissgrid/fonts/OFL.txt +95 -0
- package/dist/theme-packs/swissgrid/meta.json +38 -0
- package/dist/theme-packs/swissgrid/pack.css +518 -0
- package/dist/theme-packs/washi/fonts/MPlus1Code-400-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/MPlus1Code-500-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/OFL.txt +95 -0
- package/dist/theme-packs/washi/fonts/ShipporiMincho-500-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ShipporiMincho-600-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ShipporiMincho-700-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-400-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-500-latin.woff2 +0 -0
- package/dist/theme-packs/washi/fonts/ZenKakuGothicNew-700-latin.woff2 +0 -0
- package/dist/theme-packs/washi/meta.json +38 -0
- package/dist/theme-packs/washi/pack.css +479 -0
- package/dist/theme-packs-registry/index.d.ts +5 -0
- package/dist/theme-packs-registry/index.js +30 -0
- package/dist/theme-packs-registry/load-registry.d.ts +23 -0
- package/dist/theme-packs-registry/load-registry.js +64 -0
- package/dist/theme-packs-registry/meta-schema.d.ts +70 -0
- package/dist/theme-packs-registry/meta-schema.js +38 -0
- package/dist/theme-packs-registry/resolve-enabled-packs.d.ts +25 -0
- package/dist/theme-packs-registry/resolve-enabled-packs.js +43 -0
- package/dist/theme-packs-registry/token-manifest.d.ts +19 -0
- package/dist/theme-packs-registry/token-manifest.js +57 -0
- package/dist/theme-packs-registry/validator.d.ts +35 -0
- package/dist/theme-packs-registry/validator.js +284 -0
- package/dist/theme-toggle/color-scheme-sync.d.ts +2 -4
- package/dist/theme.css +319 -0
- package/dist/versions-page/index.d.ts +2 -2
- package/dist/versions-page/index.js +8 -8
- package/dist/z-index-defaults/index.d.ts +45 -0
- package/dist/z-index-defaults/index.js +34 -0
- package/eject/breadcrumb/breadcrumb.tsx +4 -4
- package/eject/breadcrumb/find-path.ts +2 -2
- package/eject/breadcrumb/index.ts +1 -1
- package/eject/breadcrumb/types.ts +0 -6
- package/eject/code-group/index.tsx +2 -2
- package/eject/doc-history/index.tsx +1 -1
- package/eject/doc-pager/index.tsx +1 -1
- package/eject/footer/footer.tsx +1 -0
- package/eject/header/header.tsx +86 -21
- package/eject/header/index.ts +3 -0
- package/eject/header/types.ts +39 -1
- package/eject/site-tree-nav-island/index.tsx +15 -3
- package/eject/site-tree-nav-island/state.ts +9 -0
- package/eject/theme-toggle/color-scheme-sync.ts +2 -4
- package/package.json +82 -29
- package/routes-src/404.tsx +4 -1
- package/routes-src/_chrome.tsx +31 -8
- package/routes-src/_context.ts +4 -0
- package/routes-src/_docs-helpers.ts +9 -29
- package/routes-src/_virtual.d.ts +38 -2
- package/tsconfig.base.json +29 -0
- package/virtual-modules.d.ts +83 -0
- package/zfb-config-shim.d.ts +210 -0
- package/dist/integrations/llms-txt/index.d.ts +0 -33
- package/dist/theme/color-tweak-export-modal.d.ts +0 -16
- package/dist/theme/color-tweak-export-modal.js +0 -138
- package/dist/theme/design-token-serde.d.ts +0 -183
- package/dist/theme/design-token-serde.js +0 -346
- package/dist/theme/design-token-types.d.ts +0 -13
- package/dist/theme/design-token-types.js +0 -6
- package/dist/theme/iframe-bridge.d.ts +0 -42
- package/dist/theme/iframe-bridge.js +0 -72
- /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/claude-resources/escape-for-mdx.js +0 -0
- /package/dist/{integrations → plugins/internal}/claude-resources/generate.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/claude-resources/generate.js +0 -0
- /package/dist/{integrations → plugins/internal}/doc-history/pre-build.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/dev-middleware.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/emit.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/emit.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/generate.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/generate.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/index.js +0 -0
- /package/dist/{integrations → plugins/internal}/llms-txt/types.js +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/build-emitter.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/build-emitter.js +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/collect.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/dev-middleware.js +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/index.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/index.js +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/types.d.ts +0 -0
- /package/dist/{integrations → plugins/internal}/search-index/types.js +0 -0
package/routes-src/_context.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { routeContext } from "virtual:zudo-doc-route-context";
|
|
|
22
22
|
|
|
23
23
|
import type { Settings } from "@takazudo/zudo-doc/settings";
|
|
24
24
|
import type { ColorScheme } from "@takazudo/zudo-doc/color-scheme-utils";
|
|
25
|
+
import type { ThemePackRegistry } from "@takazudo/zudo-doc/theme-packs-registry";
|
|
25
26
|
import {
|
|
26
27
|
createRouteContext,
|
|
27
28
|
type RouteContextPayload,
|
|
@@ -42,6 +43,9 @@ export const settings: Settings = routeCtx.settings;
|
|
|
42
43
|
/** Host color-scheme palette map. `null` when not supplied — `_chrome.tsx`
|
|
43
44
|
* falls back to `DEFAULT_SCHEME` in that case. */
|
|
44
45
|
export const colorSchemes: Record<string, ColorScheme> | null = routeCtx.colorSchemes;
|
|
46
|
+
/** Resolved, enabled, ordered theme-pack registry. `null` when the routes
|
|
47
|
+
* plugin did not thread one (ADR `docs/adr/theme-packs.md`, Decision 2). */
|
|
48
|
+
export const themePackRegistry: ThemePackRegistry | null = routeCtx.themePackRegistry;
|
|
45
49
|
|
|
46
50
|
export const {
|
|
47
51
|
i18n,
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
import {
|
|
23
23
|
getCollection,
|
|
24
24
|
getContentSnapshot,
|
|
25
|
-
type CollectionEntry,
|
|
26
25
|
} from "@takazudo/zfb/content";
|
|
27
26
|
import {
|
|
28
27
|
buildSidebarTree,
|
|
@@ -44,29 +43,10 @@ function snapshotAnchor(name: string): readonly unknown[] | undefined {
|
|
|
44
43
|
return getContentSnapshot()?.collections[name];
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
const
|
|
46
|
+
const docsByAnchor = new WeakMap<object, DocPageEntry[]>();
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* canonical root-slug rule). */
|
|
52
|
-
function bridgeEntry(
|
|
53
|
-
e: CollectionEntry<DocPageFrontmatter>,
|
|
54
|
-
collectionName: string,
|
|
55
|
-
): DocPageEntry {
|
|
56
|
-
return {
|
|
57
|
-
slug: e.slug,
|
|
58
|
-
id: toRouteSlug(e.slug),
|
|
59
|
-
collection: collectionName,
|
|
60
|
-
data: e.data,
|
|
61
|
-
body: e.body,
|
|
62
|
-
module_specifier: e.module_specifier,
|
|
63
|
-
Content: e.Content,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function buildBridged(collectionName: string): DocPageEntry[] {
|
|
68
|
-
const raw = getCollection<DocPageFrontmatter>(collectionName);
|
|
69
|
-
return raw.map((e) => bridgeEntry(e, collectionName)).filter((d) => !d.data.draft);
|
|
48
|
+
function buildDocs(collectionName: string): DocPageEntry[] {
|
|
49
|
+
return getCollection<DocPageFrontmatter>(collectionName).filter((entry) => !entry.data.draft);
|
|
70
50
|
}
|
|
71
51
|
|
|
72
52
|
/**
|
|
@@ -77,11 +57,11 @@ function buildBridged(collectionName: string): DocPageEntry[] {
|
|
|
77
57
|
*/
|
|
78
58
|
export function stableDocs(collectionName: string): DocPageEntry[] {
|
|
79
59
|
const anchor = snapshotAnchor(collectionName);
|
|
80
|
-
if (anchor === undefined) return
|
|
81
|
-
const cached =
|
|
60
|
+
if (anchor === undefined) return buildDocs(collectionName);
|
|
61
|
+
const cached = docsByAnchor.get(anchor);
|
|
82
62
|
if (cached) return cached;
|
|
83
|
-
const built =
|
|
84
|
-
|
|
63
|
+
const built = buildDocs(collectionName);
|
|
64
|
+
docsByAnchor.set(anchor, built);
|
|
85
65
|
return built;
|
|
86
66
|
}
|
|
87
67
|
|
|
@@ -119,7 +99,7 @@ function toNavNode(node: SidebarNode): DocNavNode {
|
|
|
119
99
|
function findRootIndexDoc(docs: DocPageEntry[]): DocPageEntry | undefined {
|
|
120
100
|
let found: DocPageEntry | undefined;
|
|
121
101
|
for (const d of docs) {
|
|
122
|
-
const slug = d.data.slug ?? d.
|
|
102
|
+
const slug = d.data.slug ?? toRouteSlug(d.slug);
|
|
123
103
|
if (slug === "") found = d;
|
|
124
104
|
}
|
|
125
105
|
return found;
|
|
@@ -169,7 +149,7 @@ export function buildNavTree(
|
|
|
169
149
|
): DocNavNode[] {
|
|
170
150
|
const href: BuildHref = options?.buildHref ?? buildHref;
|
|
171
151
|
const sidebarTree = buildSidebarTree(
|
|
172
|
-
docs
|
|
152
|
+
docs,
|
|
173
153
|
locale,
|
|
174
154
|
{
|
|
175
155
|
categoryMeta,
|
package/routes-src/_virtual.d.ts
CHANGED
|
@@ -6,6 +6,20 @@
|
|
|
6
6
|
// The payload is SERIALIZABLE DATA ONLY (ADR Decision 1): `settings`,
|
|
7
7
|
// `translations`, `tagVocabulary`, `colorSchemes`. `_context.ts` narrows it
|
|
8
8
|
// to the concrete `RouteContextPayload` at the seam.
|
|
9
|
+
//
|
|
10
|
+
// SINGLE SOURCE OF TRUTH for three shipped copies (#2656) — edit HERE only:
|
|
11
|
+
// 1. This file itself — typechecks the package's own `src/routes/*.tsx`.
|
|
12
|
+
// 2. `routes-src/_virtual.d.ts` — copied by `scripts/copy-routes-src.mjs`
|
|
13
|
+
// for downstream `packageOwnedRoutes` consumers.
|
|
14
|
+
// 3. `<package root>/virtual-modules.d.ts` — GENERATED by
|
|
15
|
+
// `scripts/copy-virtual-modules.mjs` (tsup onSuccess; gitignored like
|
|
16
|
+
// `routes-src/`), shipped via `tsconfig.base.json`'s `files` so a HOST
|
|
17
|
+
// project that imports these virtual modules directly (e.g. a `pages/`
|
|
18
|
+
// re-export stub calling `createRouteContext(routeContext)`) typechecks.
|
|
19
|
+
// Both copy steps rewrite parent-relative `import(...)` specifiers to bare
|
|
20
|
+
// `@takazudo/zudo-doc/*` subpaths, so the relative specifier below stays
|
|
21
|
+
// correct here while the shipped copies resolve from a consumer's
|
|
22
|
+
// node_modules.
|
|
9
23
|
declare module "virtual:zudo-doc-route-context" {
|
|
10
24
|
export const routeContext: {
|
|
11
25
|
settings: unknown;
|
|
@@ -15,6 +29,10 @@ declare module "virtual:zudo-doc-route-context" {
|
|
|
15
29
|
* `colorSchemes` to `zudoDocPreset` — `_chrome.tsx` falls back to
|
|
16
30
|
* `DEFAULT_SCHEME` in that case. */
|
|
17
31
|
colorSchemes: Record<string, unknown> | null;
|
|
32
|
+
/** Resolved, enabled, ordered theme-pack registry (ADR
|
|
33
|
+
* `docs/adr/theme-packs.md`, Decision 2). `null` when the routes plugin
|
|
34
|
+
* did not thread one. */
|
|
35
|
+
themePackRegistry: Array<Record<string, unknown>> | null;
|
|
18
36
|
};
|
|
19
37
|
}
|
|
20
38
|
|
|
@@ -27,8 +45,26 @@ declare module "virtual:zudo-doc-route-context" {
|
|
|
27
45
|
// chromeBindingsModule").
|
|
28
46
|
//
|
|
29
47
|
// Typed via an INLINE `import(...)` type (not a top-level import, which would
|
|
30
|
-
// break this file's ambient module declarations) — see
|
|
31
|
-
//
|
|
48
|
+
// break this file's ambient module declarations) — see the package's
|
|
49
|
+
// factory-context module (`src/factory-context/index.ts`) for the
|
|
50
|
+
// `ChromeHostBindings` shape.
|
|
32
51
|
declare module "virtual:zudo-doc-chrome-bindings" {
|
|
33
52
|
export const chromeBindings: import("@takazudo/zudo-doc/factory-context").ChromeHostBindings;
|
|
34
53
|
}
|
|
54
|
+
|
|
55
|
+
// Ambient typing for the design-token-panel-config virtual module emitted by
|
|
56
|
+
// the routes plugin (`addVirtualModule("virtual:zudo-doc-design-token-panel-config",
|
|
57
|
+
// …)`, #2658). No on-disk source — materialised at build, either as a
|
|
58
|
+
// re-export of the host's `settings.designTokenPanelConfigModule` file or as
|
|
59
|
+
// a re-export of the package default (`@takazudo/zudo-doc/design-token-panel-config`)
|
|
60
|
+
// when the setting is absent. See `plugins/routes.ts` and this package's
|
|
61
|
+
// `design-token-panel-bootstrap.tsx` for the full contract.
|
|
62
|
+
//
|
|
63
|
+
// Typed via an inline `import(...)` type (not a top-level import, for the
|
|
64
|
+
// same ambient-module-declaration reason as `chromeBindings` above) — see
|
|
65
|
+
// `@takazudo/zdtp`'s `PanelConfig`.
|
|
66
|
+
declare module "virtual:zudo-doc-design-token-panel-config" {
|
|
67
|
+
export const buildDesignTokenPanelConfig: (
|
|
68
|
+
mode: "light" | "dark",
|
|
69
|
+
) => import("@takazudo/zdtp").PanelConfig;
|
|
70
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "Bundler",
|
|
7
|
+
"allowImportingTsExtensions": true,
|
|
8
|
+
"resolveJsonModule": true,
|
|
9
|
+
"verbatimModuleSyntax": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"allowJs": true,
|
|
16
|
+
"jsx": "preserve",
|
|
17
|
+
"strict": true,
|
|
18
|
+
"noImplicitAny": true,
|
|
19
|
+
"strictNullChecks": true,
|
|
20
|
+
"strictFunctionTypes": true,
|
|
21
|
+
"strictBindCallApply": true,
|
|
22
|
+
"strictPropertyInitialization": true,
|
|
23
|
+
"noImplicitThis": true,
|
|
24
|
+
"useUnknownInCatchVariables": true,
|
|
25
|
+
"alwaysStrict": true,
|
|
26
|
+
"baseUrl": "."
|
|
27
|
+
},
|
|
28
|
+
"files": ["./zfb-config-shim.d.ts", "./virtual-modules.d.ts"]
|
|
29
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// GENERATED FILE — DO NOT EDIT.
|
|
2
|
+
// Built from src/routes/_virtual.d.ts by scripts/copy-virtual-modules.mjs
|
|
3
|
+
// (tsup onSuccess), with parent-relative import(...) type specifiers
|
|
4
|
+
// rewritten to bare @takazudo/zudo-doc/* subpaths. Edit the source file and
|
|
5
|
+
// rebuild the package (pnpm --filter @takazudo/zudo-doc build) instead.
|
|
6
|
+
//
|
|
7
|
+
// Host-facing: pulled into consumer projects via tsconfig.base.json's
|
|
8
|
+
// top-level "files" so host code importing the zfb virtual modules
|
|
9
|
+
// (virtual:zudo-doc-route-context / virtual:zudo-doc-chrome-bindings)
|
|
10
|
+
// typechecks. Consumer-level regression proof (tsc/zfb check against a
|
|
11
|
+
// fixture extending tsconfig.base.json) lives in the Wave-5 confirm case
|
|
12
|
+
// (zudolab/zudo-doc#2659).
|
|
13
|
+
|
|
14
|
+
// Ambient typing for the route-context virtual module emitted by the routes
|
|
15
|
+
// plugin (`addVirtualModule("virtual:zudo-doc-route-context", …)`). The module
|
|
16
|
+
// has no on-disk source — it is materialised at build by the zfb plugin runtime
|
|
17
|
+
// — so this declaration gives the package route entrypoints a typed import.
|
|
18
|
+
//
|
|
19
|
+
// The payload is SERIALIZABLE DATA ONLY (ADR Decision 1): `settings`,
|
|
20
|
+
// `translations`, `tagVocabulary`, `colorSchemes`. `_context.ts` narrows it
|
|
21
|
+
// to the concrete `RouteContextPayload` at the seam.
|
|
22
|
+
//
|
|
23
|
+
// SINGLE SOURCE OF TRUTH for three shipped copies (#2656) — edit HERE only:
|
|
24
|
+
// 1. This file itself — typechecks the package's own `src/routes/*.tsx`.
|
|
25
|
+
// 2. `routes-src/_virtual.d.ts` — copied by `scripts/copy-routes-src.mjs`
|
|
26
|
+
// for downstream `packageOwnedRoutes` consumers.
|
|
27
|
+
// 3. `<package root>/virtual-modules.d.ts` — GENERATED by
|
|
28
|
+
// `scripts/copy-virtual-modules.mjs` (tsup onSuccess; gitignored like
|
|
29
|
+
// `routes-src/`), shipped via `tsconfig.base.json`'s `files` so a HOST
|
|
30
|
+
// project that imports these virtual modules directly (e.g. a `pages/`
|
|
31
|
+
// re-export stub calling `createRouteContext(routeContext)`) typechecks.
|
|
32
|
+
// Both copy steps rewrite parent-relative `import(...)` specifiers to bare
|
|
33
|
+
// `@takazudo/zudo-doc/*` subpaths, so the relative specifier below stays
|
|
34
|
+
// correct here while the shipped copies resolve from a consumer's
|
|
35
|
+
// node_modules.
|
|
36
|
+
declare module "virtual:zudo-doc-route-context" {
|
|
37
|
+
export const routeContext: {
|
|
38
|
+
settings: unknown;
|
|
39
|
+
translations: Record<string, Record<string, string>>;
|
|
40
|
+
tagVocabulary: ReadonlyArray<Record<string, unknown>>;
|
|
41
|
+
/** Host color-scheme palette map. `null` when the caller did not pass
|
|
42
|
+
* `colorSchemes` to `zudoDocPreset` — `_chrome.tsx` falls back to
|
|
43
|
+
* `DEFAULT_SCHEME` in that case. */
|
|
44
|
+
colorSchemes: Record<string, unknown> | null;
|
|
45
|
+
/** Resolved, enabled, ordered theme-pack registry (ADR
|
|
46
|
+
* `docs/adr/theme-packs.md`, Decision 2). `null` when the routes plugin
|
|
47
|
+
* did not thread one. */
|
|
48
|
+
themePackRegistry: Array<Record<string, unknown>> | null;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Ambient typing for the chrome-bindings virtual module emitted by the routes
|
|
53
|
+
// plugin (`addVirtualModule("virtual:zudo-doc-chrome-bindings", …)`, #2501).
|
|
54
|
+
// No on-disk source — materialised at build, either as a re-export of the
|
|
55
|
+
// host's `settings.chromeBindingsModule` file or as an empty-object fallback
|
|
56
|
+
// when the setting is absent. See `plugins/routes.ts` and
|
|
57
|
+
// `docs/adr/route-injection-seam.md` ("Host-callables channel —
|
|
58
|
+
// chromeBindingsModule").
|
|
59
|
+
//
|
|
60
|
+
// Typed via an INLINE `import(...)` type (not a top-level import, which would
|
|
61
|
+
// break this file's ambient module declarations) — see the package's
|
|
62
|
+
// factory-context module (`src/factory-context/index.ts`) for the
|
|
63
|
+
// `ChromeHostBindings` shape.
|
|
64
|
+
declare module "virtual:zudo-doc-chrome-bindings" {
|
|
65
|
+
export const chromeBindings: import("@takazudo/zudo-doc/factory-context").ChromeHostBindings;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Ambient typing for the design-token-panel-config virtual module emitted by
|
|
69
|
+
// the routes plugin (`addVirtualModule("virtual:zudo-doc-design-token-panel-config",
|
|
70
|
+
// …)`, #2658). No on-disk source — materialised at build, either as a
|
|
71
|
+
// re-export of the host's `settings.designTokenPanelConfigModule` file or as
|
|
72
|
+
// a re-export of the package default (`@takazudo/zudo-doc/design-token-panel-config`)
|
|
73
|
+
// when the setting is absent. See `plugins/routes.ts` and this package's
|
|
74
|
+
// `design-token-panel-bootstrap.tsx` for the full contract.
|
|
75
|
+
//
|
|
76
|
+
// Typed via an inline `import(...)` type (not a top-level import, for the
|
|
77
|
+
// same ambient-module-declaration reason as `chromeBindings` above) — see
|
|
78
|
+
// `@takazudo/zdtp`'s `PanelConfig`.
|
|
79
|
+
declare module "virtual:zudo-doc-design-token-panel-config" {
|
|
80
|
+
export const buildDesignTokenPanelConfig: (
|
|
81
|
+
mode: "light" | "dark",
|
|
82
|
+
) => import("@takazudo/zdtp").PanelConfig;
|
|
83
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
// Package-shipped type shim for the bare `zfb/config` specifier (#2656).
|
|
2
|
+
//
|
|
3
|
+
// `@takazudo/zfb` is consumed as a published npm package. The package
|
|
4
|
+
// exposes its real config types under the *scoped* subpath
|
|
5
|
+
// `@takazudo/zfb/config` → `dist/config.d.ts`. But `zfb.config.ts` imports
|
|
6
|
+
// from the *bare* specifier `zfb/config`, which zfb's build tool aliases to
|
|
7
|
+
// a runtime-only stub at parse time (`zfb-config-stub.mjs` — `defineConfig`
|
|
8
|
+
// is identity, carrying no types). No real file backs `zfb/config` in
|
|
9
|
+
// `node_modules`, so this ambient declaration is what supplies the
|
|
10
|
+
// `ZfbConfig` type to `zfb.config.ts`.
|
|
11
|
+
//
|
|
12
|
+
// Pulled into a consuming project via `tsconfig.base.json`'s
|
|
13
|
+
// `files: ["./zfb-config-shim.d.ts", "./virtual-modules.d.ts"]` — a project
|
|
14
|
+
// extending the base no longer needs its own local `zfb-shim.d.ts`.
|
|
15
|
+
//
|
|
16
|
+
// IMPORTANT — this block is the source of truth for the type `zfb check`
|
|
17
|
+
// (plain `tsc --noEmit`) binds against the config. An ambient `declare
|
|
18
|
+
// module` wins over node resolution AND over tsconfig `paths`, so it must
|
|
19
|
+
// be kept in sync BY HAND with the published `@takazudo/zfb/config`
|
|
20
|
+
// (`dist/config.d.ts`). When it lags the engine, valid config fields fail
|
|
21
|
+
// `pnpm check` with TS2353 (see Takazudo/zudo-front-builder#678 +
|
|
22
|
+
// zudolab/zudo-doc#1834 — `bundle` was missing here, blocking next.22's
|
|
23
|
+
// `bundle.exclude`). See `packages/zudo-doc/CLAUDE.md` ("Shipped ambient
|
|
24
|
+
// type shims") for the hand-sync duty this file carries.
|
|
25
|
+
|
|
26
|
+
declare module "zfb/config" {
|
|
27
|
+
/** JSX framework runtime. */
|
|
28
|
+
export type Framework = "preact" | "react";
|
|
29
|
+
|
|
30
|
+
/** A content collection registered with the zfb engine. */
|
|
31
|
+
export interface CollectionDef {
|
|
32
|
+
/** Identifier used at the call site (e.g. `"docs"`). */
|
|
33
|
+
name: string;
|
|
34
|
+
/** Directory (relative to the project root) holding the entries. */
|
|
35
|
+
path: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional schema. Reserved for v1.1 — accepted but not enforced
|
|
38
|
+
* today. Authored as zod and converted to JSON Schema via
|
|
39
|
+
* `z.toJSONSchema()` at the boundary.
|
|
40
|
+
*/
|
|
41
|
+
schema?: Record<string, unknown>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Tailwind options; absent = defaults. */
|
|
45
|
+
export interface TailwindConfig {
|
|
46
|
+
enabled?: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** User-supplied plugin configuration entry. */
|
|
50
|
+
export interface PluginConfig {
|
|
51
|
+
name: string;
|
|
52
|
+
options?: Record<string, unknown>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Output mode for zfb fenced-code highlighting. */
|
|
56
|
+
export type CodeHighlightMode = "inline" | "class";
|
|
57
|
+
|
|
58
|
+
/** Fixed semantic taxonomy accepted by class-mode `roleClasses`. */
|
|
59
|
+
export type CodeHighlightRole =
|
|
60
|
+
| "escape"
|
|
61
|
+
| "operator"
|
|
62
|
+
| "comment"
|
|
63
|
+
| "string"
|
|
64
|
+
| "number"
|
|
65
|
+
| "constant"
|
|
66
|
+
| "keyword"
|
|
67
|
+
| "function"
|
|
68
|
+
| "type"
|
|
69
|
+
| "namespace"
|
|
70
|
+
| "property"
|
|
71
|
+
| "variable"
|
|
72
|
+
| "tag"
|
|
73
|
+
| "attribute"
|
|
74
|
+
| "punctuation"
|
|
75
|
+
| "inserted"
|
|
76
|
+
| "deleted"
|
|
77
|
+
| "heading";
|
|
78
|
+
|
|
79
|
+
/** zfb inline-theme or semantic class-mode configuration. */
|
|
80
|
+
export type CodeHighlightConfig = {
|
|
81
|
+
theme?: string;
|
|
82
|
+
themesDir?: string;
|
|
83
|
+
themeLight?: string;
|
|
84
|
+
themeDark?: string;
|
|
85
|
+
mode?: CodeHighlightMode;
|
|
86
|
+
classPrefix?: string;
|
|
87
|
+
roleClasses?: Partial<Record<CodeHighlightRole, string>>;
|
|
88
|
+
defaultStylesheet?: boolean;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Bundler options. Mirrors `BundleConfig` in crates/zfb/src/config.rs
|
|
93
|
+
* and the published `@takazudo/zfb/config` (`dist/config.d.ts`). Added
|
|
94
|
+
* in next.22 (`bundle.exclude`, #664) and extended in next.23
|
|
95
|
+
* (`mainFields` / `external`, #676).
|
|
96
|
+
*/
|
|
97
|
+
export interface BundleConfig {
|
|
98
|
+
/**
|
|
99
|
+
* Project-relative, gitignore-style globs for source files the bundler
|
|
100
|
+
* must NOT pull into the esbuild graph (e.g. test fixtures or
|
|
101
|
+
* `*.stories.tsx`). Matched files are skipped from the shadow-tree walk
|
|
102
|
+
* and dropped from any eager `import.meta.glob(...)` expansion.
|
|
103
|
+
*/
|
|
104
|
+
exclude?: string[];
|
|
105
|
+
/**
|
|
106
|
+
* Explicit esbuild `main-fields` for the `--platform=neutral` page/SSR
|
|
107
|
+
* pass (empty by default under `neutral`), letting CJS-`main`-only deps
|
|
108
|
+
* resolve. Mirrors `BundleConfig::main_fields`.
|
|
109
|
+
*/
|
|
110
|
+
mainFields?: string[];
|
|
111
|
+
/**
|
|
112
|
+
* Bare specifiers to mark external in the `--platform=neutral` pass so
|
|
113
|
+
* esbuild leaves them unbundled. Mirrors `BundleConfig::external`.
|
|
114
|
+
*/
|
|
115
|
+
external?: string[];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Mirrors the Rust `Config` struct one-for-one. */
|
|
119
|
+
export interface ZfbConfig {
|
|
120
|
+
outDir?: string;
|
|
121
|
+
publicDir?: string;
|
|
122
|
+
host?: string;
|
|
123
|
+
port?: number;
|
|
124
|
+
framework?: Framework;
|
|
125
|
+
collections?: CollectionDef[];
|
|
126
|
+
tailwind?: TailwindConfig;
|
|
127
|
+
/**
|
|
128
|
+
* Bundler options. `bundle.exclude` keeps project-relative globs out of
|
|
129
|
+
* the esbuild graph — used e.g. to skip `e2e/fixtures/**` so the MDX link
|
|
130
|
+
* resolver doesn't walk committed test-fixture trees (silences spurious
|
|
131
|
+
* broken-link warnings). Mirrors `Config::bundle`.
|
|
132
|
+
*/
|
|
133
|
+
bundle?: BundleConfig;
|
|
134
|
+
plugins?: PluginConfig[];
|
|
135
|
+
adapter?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Strip `.md` / `.mdx` from in-page `<a href>` paths and append a
|
|
138
|
+
* trailing `/` so author-written `[label](other.mdx)` references
|
|
139
|
+
* resolve to the rendered route URL. Mirrors Config::strip_md_ext
|
|
140
|
+
* in crates/zfb/src/config.rs (zudolab/zfb#131).
|
|
141
|
+
*/
|
|
142
|
+
stripMdExt?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Site base path. Prefixed onto stable HTML asset URLs (CSS / JS
|
|
145
|
+
* `<link>` and `<script>` tags). Normalised to start AND end with
|
|
146
|
+
* `/`; `undefined` / `""` / `"/"` all behave identically (no
|
|
147
|
+
* prefix). Mirrors Config::base in crates/zfb/src/config.rs
|
|
148
|
+
* (Takazudo/zudo-front-builder#154).
|
|
149
|
+
*/
|
|
150
|
+
base?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Configures zfb's code highlighter. Class mode is mutually exclusive
|
|
153
|
+
* with every theme field and emits semantic role classes; inline mode
|
|
154
|
+
* retains the single/dual theme fields for general zfb consumers.
|
|
155
|
+
*/
|
|
156
|
+
codeHighlight?: CodeHighlightConfig;
|
|
157
|
+
/**
|
|
158
|
+
* Markdown link resolver (port of `remarkResolveMarkdownLinks`).
|
|
159
|
+
* Mirrors `Config::resolve_markdown_links` in crates/zfb/src/config.rs
|
|
160
|
+
* (Takazudo/zudo-front-builder PR #234 / zudolab/zudo-doc#1577).
|
|
161
|
+
* When `enabled: true`, the build appends `ResolveLinksPlugin` to the
|
|
162
|
+
* mdast pipeline so author-written `[label](./other.mdx)` links are
|
|
163
|
+
* rewritten to the corresponding rendered route URL — bypassing the
|
|
164
|
+
* file→directory transformation that breaks relative paths in dist
|
|
165
|
+
* HTML when `foo.mdx` becomes `foo/index.html`.
|
|
166
|
+
*/
|
|
167
|
+
resolveMarkdownLinks?: {
|
|
168
|
+
enabled?: boolean;
|
|
169
|
+
docsDir?: string;
|
|
170
|
+
dirs?: Array<{ dir: string; routePrefix: string }>;
|
|
171
|
+
onBrokenLinks?: "warn" | "error" | "ignore";
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Whether the basePath rewriter should append a trailing `/` to
|
|
175
|
+
* extensionless absolute hrefs. Mirrors `Config::trailing_slash` in
|
|
176
|
+
* crates/zfb/src/config.rs (Takazudo/zudo-front-builder PR #234 /
|
|
177
|
+
* zudolab/zudo-doc#1579). Off by default — preserves byte-for-byte
|
|
178
|
+
* parity with the pre-`trailingSlash` build for projects that
|
|
179
|
+
* haven't opted in.
|
|
180
|
+
*/
|
|
181
|
+
trailingSlash?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Minify production HTML output from `zfb build`.
|
|
184
|
+
* Mirrors `Config::minify_html` in crates/zfb/src/config.rs.
|
|
185
|
+
*/
|
|
186
|
+
minifyHtml?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Markdown / MDX pipeline options. Mirrors `Config::markdown` →
|
|
189
|
+
* `MarkdownConfig` in crates/zfb/src/config.rs. zfb next.12 moved the
|
|
190
|
+
* former-Core features under `markdown.features` and next.13 ships the
|
|
191
|
+
* rest as opt-in; zudo-doc uses `markdown.features` to opt back into the
|
|
192
|
+
* former-Core four plus the additional opt-in features (#1804). Each
|
|
193
|
+
* `features` value is per-feature: `true` for boolean-shorthand features,
|
|
194
|
+
* or an options object for object-typed features.
|
|
195
|
+
*/
|
|
196
|
+
markdown?: {
|
|
197
|
+
gfm?: boolean | Record<string, boolean>;
|
|
198
|
+
toc?: Record<string, unknown>;
|
|
199
|
+
externalLinks?: Record<string, unknown>;
|
|
200
|
+
cjkFriendly?: boolean;
|
|
201
|
+
features?: Record<string, boolean | Record<string, unknown>>;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Identity helper: returns the supplied config as-is, but typed
|
|
207
|
+
* against `ZfbConfig`. Use as the default export of `zfb.config.ts`.
|
|
208
|
+
*/
|
|
209
|
+
export function defineConfig(config: ZfbConfig): ZfbConfig;
|
|
210
|
+
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public entry for `@takazudo/zudo-doc/integrations/llms-txt`.
|
|
3
|
-
*
|
|
4
|
-
* Framework-agnostic build emitter that produces `dist/llms.txt` and
|
|
5
|
-
* `dist/llms-full.txt` (plus per-locale variants) with byte-identical
|
|
6
|
-
* format vs the legacy Astro integration in
|
|
7
|
-
* `src/integrations/llms-txt.ts`.
|
|
8
|
-
*
|
|
9
|
-
* Typical zfb registration (see ./README.md for the full snippet):
|
|
10
|
-
*
|
|
11
|
-
* import { emitLlmsTxt } from "@takazudo/zudo-doc/integrations/llms-txt";
|
|
12
|
-
*
|
|
13
|
-
* // inside a zfb plugin's onBuildDone hook
|
|
14
|
-
* emitLlmsTxt({
|
|
15
|
-
* outDir,
|
|
16
|
-
* siteName: "...",
|
|
17
|
-
* siteDescription: "...",
|
|
18
|
-
* base: "/",
|
|
19
|
-
* defaultLocaleDir: "src/content/docs",
|
|
20
|
-
* locales: [{ code: "ja", dir: "src/content/docs-ja" }],
|
|
21
|
-
* });
|
|
22
|
-
*
|
|
23
|
-
* The pure `generate*` and `loadDocEntries` helpers are exported as well
|
|
24
|
-
* so a zfb non-HTML page (`pages/llms.txt.tsx`) or a unit test can build
|
|
25
|
-
* the strings directly without touching the filesystem twice.
|
|
26
|
-
*/
|
|
27
|
-
export { createLlmsTxtDevMiddleware } from "./dev-middleware.js";
|
|
28
|
-
export type { LlmsTxtDevMiddlewareOptions, LlmsTxtMiddleware, LlmsTxtMiddlewareLogger, LlmsTxtNextFn, } from "./dev-middleware.js";
|
|
29
|
-
export { emitLlmsTxt } from "./emit.js";
|
|
30
|
-
export { generateLlmsFullTxt, generateLlmsTxt, } from "./generate.js";
|
|
31
|
-
export { collectMdFiles, isExcluded, loadDocEntries, parseMarkdownFile, slugToUrl, } from "./load.js";
|
|
32
|
-
export { stripImportsAndJsx, stripMarkdown } from "./strip.js";
|
|
33
|
-
export type { LlmsDocEntry, LlmsTxtEmitOptions, LlmsTxtEmitResult, LlmsTxtFrontmatter, LlmsTxtLoadOptions, LlmsTxtLocaleConfig, LlmsTxtLogger, LlmsTxtSiteMeta, } from "./types.js";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type DesignTokenManifest } from "./design-token-serde.js";
|
|
2
|
-
import { type ColorTweakState, type TweakState } from "./design-token-types.js";
|
|
3
|
-
interface DesignTokenExportModalProps {
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
/** Full unified tweak state — the modal serializes all four categories. */
|
|
6
|
-
state: TweakState;
|
|
7
|
-
/** Token manifest (spacing / font / size arrays) used by serialize() to
|
|
8
|
-
* compute diff-only output. The caller is expected to forward the same
|
|
9
|
-
* manifest the panel was configured with. */
|
|
10
|
-
manifest: DesignTokenManifest;
|
|
11
|
-
/** Color baseline used for diff-only output. Optional: callers without DOM
|
|
12
|
-
* access (tests) can omit and we'll treat the entire color block as changed. */
|
|
13
|
-
colorDefaults?: ColorTweakState;
|
|
14
|
-
}
|
|
15
|
-
export default function ColorTweakExportModal({ onClose, state, manifest, colorDefaults, }: DesignTokenExportModalProps): import("preact").JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
2
|
-
import { useState, useEffect, useMemo, useRef } from "preact/hooks";
|
|
3
|
-
import { serialize } from "./design-token-serde.js";
|
|
4
|
-
import {
|
|
5
|
-
} from "./design-token-types.js";
|
|
6
|
-
const EXPORT_FILENAME_HINT = "zudo-doc-tokens.json";
|
|
7
|
-
function resolveColorDefaults(fallback, explicit) {
|
|
8
|
-
return explicit ?? fallback;
|
|
9
|
-
}
|
|
10
|
-
function ColorTweakExportModal({
|
|
11
|
-
onClose,
|
|
12
|
-
state,
|
|
13
|
-
manifest,
|
|
14
|
-
colorDefaults
|
|
15
|
-
}) {
|
|
16
|
-
const [copyLabel, setCopyLabel] = useState("Copy");
|
|
17
|
-
const [includeDefaults, setIncludeDefaults] = useState(false);
|
|
18
|
-
const dialogRef = useRef(null);
|
|
19
|
-
const copyTimerRef = useRef(null);
|
|
20
|
-
const code = useMemo(() => {
|
|
21
|
-
const baseline = resolveColorDefaults(state.color, colorDefaults);
|
|
22
|
-
const json = serialize(state, {
|
|
23
|
-
manifest,
|
|
24
|
-
includeDefaults,
|
|
25
|
-
colorDefaults: baseline
|
|
26
|
-
});
|
|
27
|
-
return JSON.stringify(json, null, 2);
|
|
28
|
-
}, [state, manifest, colorDefaults, includeDefaults]);
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
const dialog = dialogRef.current;
|
|
31
|
-
if (!dialog) return;
|
|
32
|
-
dialog.showModal();
|
|
33
|
-
return () => {
|
|
34
|
-
if (dialog.open) dialog.close();
|
|
35
|
-
};
|
|
36
|
-
}, []);
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
const dialog = dialogRef.current;
|
|
39
|
-
if (!dialog) return;
|
|
40
|
-
function handleClose() {
|
|
41
|
-
onClose();
|
|
42
|
-
}
|
|
43
|
-
dialog.addEventListener("close", handleClose);
|
|
44
|
-
return () => dialog.removeEventListener("close", handleClose);
|
|
45
|
-
}, [onClose]);
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
return () => {
|
|
48
|
-
if (copyTimerRef.current) clearTimeout(copyTimerRef.current);
|
|
49
|
-
};
|
|
50
|
-
}, []);
|
|
51
|
-
function handleBackdropClick(e) {
|
|
52
|
-
const dialog = dialogRef.current;
|
|
53
|
-
if (!dialog) return;
|
|
54
|
-
const rect = dialog.getBoundingClientRect();
|
|
55
|
-
if (e.clientX < rect.left || e.clientX > rect.right || e.clientY < rect.top || e.clientY > rect.bottom) {
|
|
56
|
-
dialog.close();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
async function handleCopy() {
|
|
60
|
-
let ok = false;
|
|
61
|
-
const dialog = dialogRef.current;
|
|
62
|
-
if (dialog) {
|
|
63
|
-
try {
|
|
64
|
-
const textarea = document.createElement("textarea");
|
|
65
|
-
textarea.value = code;
|
|
66
|
-
textarea.style.cssText = "position:fixed;opacity:0;left:-9999px";
|
|
67
|
-
dialog.appendChild(textarea);
|
|
68
|
-
textarea.focus();
|
|
69
|
-
textarea.select();
|
|
70
|
-
ok = document.execCommand("copy");
|
|
71
|
-
dialog.removeChild(textarea);
|
|
72
|
-
} catch {
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (!ok) {
|
|
76
|
-
try {
|
|
77
|
-
await navigator.clipboard.writeText(code);
|
|
78
|
-
ok = true;
|
|
79
|
-
} catch {
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
setCopyLabel(ok ? "Copied!" : "Failed");
|
|
83
|
-
if (copyTimerRef.current) clearTimeout(copyTimerRef.current);
|
|
84
|
-
copyTimerRef.current = setTimeout(() => setCopyLabel("Copy"), 2e3);
|
|
85
|
-
}
|
|
86
|
-
return /* @__PURE__ */ jsxs(
|
|
87
|
-
"dialog",
|
|
88
|
-
{
|
|
89
|
-
ref: dialogRef,
|
|
90
|
-
onClick: handleBackdropClick,
|
|
91
|
-
className: "mx-auto max-h-[80vh] w-full max-w-[46rem] overflow-y-auto border border-muted bg-surface p-hsp-xl backdrop:bg-bg/80",
|
|
92
|
-
style: { color: "var(--color-fg)", position: "fixed", top: "50%", left: "50%", transform: "translate(-50%, -50%)", userSelect: "text" },
|
|
93
|
-
children: [
|
|
94
|
-
/* @__PURE__ */ jsx("h2", { className: "mb-vsp-sm text-title font-bold text-fg", children: "Export Design Tokens" }),
|
|
95
|
-
/* @__PURE__ */ jsxs("p", { className: "mb-vsp-xs text-small text-muted", children: [
|
|
96
|
-
"Save as ",
|
|
97
|
-
/* @__PURE__ */ jsx("code", { className: "text-fg", children: EXPORT_FILENAME_HINT }),
|
|
98
|
-
" to feed this blob back into the panel (or hand to an AI assistant)."
|
|
99
|
-
] }),
|
|
100
|
-
/* @__PURE__ */ jsxs("label", { className: "mb-vsp-xs flex items-center gap-x-hsp-sm text-small text-fg", children: [
|
|
101
|
-
/* @__PURE__ */ jsx(
|
|
102
|
-
"input",
|
|
103
|
-
{
|
|
104
|
-
type: "checkbox",
|
|
105
|
-
checked: includeDefaults,
|
|
106
|
-
onChange: (e) => setIncludeDefaults(e.currentTarget.checked)
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
"Show defaults too"
|
|
110
|
-
] }),
|
|
111
|
-
/* @__PURE__ */ jsx("pre", { className: "overflow-x-auto border border-muted bg-code-bg p-hsp-lg text-small text-code-fg", children: /* @__PURE__ */ jsx("code", { children: code }) }),
|
|
112
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-vsp-sm flex items-center gap-x-hsp-md", children: [
|
|
113
|
-
/* @__PURE__ */ jsx(
|
|
114
|
-
"button",
|
|
115
|
-
{
|
|
116
|
-
type: "button",
|
|
117
|
-
onClick: handleCopy,
|
|
118
|
-
className: "border border-muted bg-surface px-hsp-lg py-vsp-2xs text-small text-fg transition-colors hover:border-accent hover:text-accent",
|
|
119
|
-
children: copyLabel
|
|
120
|
-
}
|
|
121
|
-
),
|
|
122
|
-
/* @__PURE__ */ jsx(
|
|
123
|
-
"button",
|
|
124
|
-
{
|
|
125
|
-
type: "button",
|
|
126
|
-
onClick: () => dialogRef.current?.close(),
|
|
127
|
-
className: "border border-muted bg-surface px-hsp-lg py-vsp-2xs text-small text-muted transition-colors hover:border-fg hover:text-fg",
|
|
128
|
-
children: "Close"
|
|
129
|
-
}
|
|
130
|
-
)
|
|
131
|
-
] })
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
export {
|
|
137
|
-
ColorTweakExportModal as default
|
|
138
|
-
};
|