@takazudo/zudo-doc 5.28.2 → 6.0.1
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 +33 -0
- package/README.md +49 -16
- package/bin/gen-z-index.mjs +18 -18
- package/dist/agent-docs/identity.d.ts +4 -0
- package/dist/agent-docs/identity.js +24 -0
- package/dist/agent-docs/index.d.ts +5 -0
- package/dist/agent-docs/index.js +5 -0
- package/dist/agent-docs/limits.d.ts +11 -0
- package/dist/agent-docs/limits.js +24 -0
- package/dist/agent-docs/search.d.ts +14 -0
- package/dist/agent-docs/search.js +82 -0
- package/dist/agent-docs/tokenize.d.ts +2 -0
- package/dist/agent-docs/tokenize.js +22 -0
- package/dist/agent-docs/types.d.ts +68 -0
- package/dist/agent-docs/types.js +0 -0
- package/dist/ai-chat-modal/index.d.ts +1 -4
- package/dist/ai-chat-modal/index.js +183 -123
- package/dist/asset-components/asset-card.d.ts +1 -2
- package/dist/asset-components/asset-card.js +12 -12
- package/dist/asset-components/asset-code.d.ts +1 -2
- package/dist/asset-components/asset-code.js +10 -10
- package/dist/asset-components/shared.d.ts +3 -4
- package/dist/asset-components/shared.js +4 -4
- package/dist/asset-index-page/body.d.ts +5 -6
- package/dist/asset-index-page/body.js +6 -6
- package/dist/asset-index-page/index.d.ts +1 -2
- package/dist/asset-index-page/index.js +1 -1
- package/dist/asset-page/body.d.ts +5 -9
- package/dist/asset-page/body.js +3 -3
- package/dist/asset-page/components.d.ts +16 -17
- package/dist/asset-page/components.js +10 -9
- package/dist/asset-page/index.d.ts +1 -2
- package/dist/asset-page/index.js +1 -1
- package/dist/auto-logo/index.d.ts +1 -2
- package/dist/auto-logo/index.js +2 -2
- package/dist/body-foot-util/body-foot-util-area.d.ts +3 -4
- package/dist/body-foot-util/body-foot-util-area.js +1 -2
- package/dist/body-foot-util/edit-link.d.ts +2 -3
- package/dist/body-foot-util/edit-link.js +1 -2
- package/dist/breadcrumb/breadcrumb.d.ts +6 -6
- package/dist/breadcrumb/breadcrumb.js +3 -4
- package/dist/catalog.js +1 -1
- package/dist/category-nav/index.d.ts +1 -2
- package/dist/category-nav/index.js +11 -5
- package/dist/category-tree-nav/index.d.ts +1 -2
- package/dist/category-tree-nav/index.js +3 -3
- package/dist/chrome/derive.d.ts +18 -27
- package/dist/chrome/derive.js +47 -29
- package/dist/chrome/index.d.ts +5 -5
- package/dist/chrome/index.js +1 -1
- package/dist/chrome/island-data.d.ts +4 -0
- package/dist/chrome/island-data.js +52 -0
- package/dist/chrome/primary-slots.d.ts +2 -3
- package/dist/chrome-bindings.d.ts +30 -22
- package/dist/code-group/index.d.ts +3 -4
- package/dist/code-group/index.js +3 -7
- package/dist/code-syntax/code-block-enhancer.d.ts +1 -2
- package/dist/code-syntax/code-block-enhancer.js +2 -2
- package/dist/code-syntax/mermaid-init.d.ts +1 -2
- package/dist/code-syntax/mermaid-init.js +5 -2
- package/dist/code-syntax/tabs-init-script.js +1 -1
- package/dist/code-syntax/tabs-init.d.ts +1 -2
- package/dist/code-syntax/tabs-init.js +2 -2
- package/dist/code-syntax/tabs.d.ts +6 -6
- package/dist/code-syntax/tabs.js +8 -8
- package/dist/compiled.css +2937 -2942
- package/dist/config/component-tokens.d.ts +1 -1
- package/dist/config/component-tokens.js +22 -0
- package/dist/config-assertions/index.d.ts +13 -0
- package/dist/config-assertions/index.js +14 -0
- package/dist/config.d.ts +36 -17
- package/dist/config.js +23 -95
- package/dist/content/content-blockquote.d.ts +2 -3
- package/dist/content/content-blockquote.js +3 -3
- package/dist/content/content-code.d.ts +3 -4
- package/dist/content/content-code.js +5 -5
- package/dist/content/content-link.d.ts +3 -4
- package/dist/content/content-link.js +10 -10
- package/dist/content/content-ol.d.ts +2 -3
- package/dist/content/content-ol.js +5 -4
- package/dist/content/content-paragraph.d.ts +2 -3
- package/dist/content/content-paragraph.js +1 -1
- package/dist/content/content-strong.d.ts +2 -3
- package/dist/content/content-strong.js +3 -3
- package/dist/content/content-table.d.ts +2 -3
- package/dist/content/content-table.js +4 -4
- package/dist/content/content-ul.d.ts +2 -3
- package/dist/content/content-ul.js +4 -4
- package/dist/content/heading-h2.d.ts +2 -3
- package/dist/content/heading-h2.js +4 -4
- package/dist/content/heading-h3.d.ts +2 -3
- package/dist/content/heading-h3.js +4 -4
- package/dist/content/heading-h4.d.ts +2 -3
- package/dist/content/heading-h4.js +4 -4
- package/dist/content-admonition/index.d.ts +3 -4
- package/dist/content-admonition/index.js +2 -2
- package/dist/content.css +35 -33
- package/dist/design-token-panel-bootstrap-controller.d.ts +178 -0
- package/dist/design-token-panel-bootstrap-controller.js +359 -0
- package/dist/design-token-panel-bootstrap-island.d.ts +5 -0
- package/dist/design-token-panel-bootstrap-island.js +19 -0
- package/dist/design-token-panel-bootstrap.d.ts +5 -195
- package/dist/design-token-panel-bootstrap.js +3 -288
- package/dist/desktop-sidebar-toggle-island/index.d.ts +2 -7
- package/dist/desktop-sidebar-toggle-island/index.js +2 -58
- package/dist/desktop-sidebar-toggle-island/island.d.ts +4 -0
- package/dist/desktop-sidebar-toggle-island/island.js +43 -0
- package/dist/desktop-sidebar-toggle-island/storage.d.ts +4 -0
- package/dist/desktop-sidebar-toggle-island/storage.js +29 -0
- package/dist/desktop-toc-toggle-island/index.d.ts +2 -7
- package/dist/desktop-toc-toggle-island/index.js +2 -58
- package/dist/desktop-toc-toggle-island/island.d.ts +4 -0
- package/dist/desktop-toc-toggle-island/island.js +43 -0
- package/dist/desktop-toc-toggle-island/storage.d.ts +4 -0
- package/dist/desktop-toc-toggle-island/storage.js +29 -0
- package/dist/details/details.d.ts +3 -4
- package/dist/details/details.js +1 -1
- package/dist/doc-body-end/index.d.ts +1 -2
- package/dist/doc-body-end/index.js +1 -1
- package/dist/doc-body-end-islands/design-token-panel-island.d.ts +2 -2
- package/dist/doc-body-end-islands/design-token-panel-island.js +3 -7
- package/dist/doc-body-end-islands/index.d.ts +4 -21
- package/dist/doc-body-end-islands/index.js +5 -3
- package/dist/doc-body-end-islands/theme-pack-switcher-island.d.ts +3 -13
- package/dist/doc-body-end-islands/theme-pack-switcher-island.js +11 -13
- package/dist/doc-content-header/index.d.ts +1 -2
- package/dist/doc-content-header/index.js +1 -1
- package/dist/doc-history/index.d.ts +1 -1
- package/dist/doc-history/index.js +166 -141
- package/dist/doc-history-area/index.d.ts +6 -4
- package/dist/doc-history-area/index.js +17 -16
- package/dist/doc-metainfo-area/index.d.ts +2 -3
- package/dist/doc-metainfo-area/index.js +1 -1
- package/dist/doc-page-renderer/index.d.ts +13 -7
- package/dist/doc-page-renderer/index.js +10 -1
- package/dist/doc-page-shell/index.d.ts +20 -7
- package/dist/doc-page-shell/index.js +17 -6
- package/dist/doc-pager/index.d.ts +1 -2
- package/dist/doc-pager/index.js +3 -3
- package/dist/doc-tags-area/index.d.ts +2 -3
- package/dist/doc-tags-area/index.js +1 -1
- package/dist/doclayout/doc-layout-with-defaults.d.ts +9 -9
- package/dist/doclayout/doc-layout-with-defaults.js +5 -15
- package/dist/doclayout/doc-layout.d.ts +26 -27
- package/dist/doclayout/doc-layout.js +23 -14
- package/dist/docs-schema/index.d.ts +4 -0
- package/dist/docs-schema/index.js +1 -0
- package/dist/extract-headings/index.js +43 -12
- package/dist/factory-context/index.d.ts +22 -19
- package/dist/features.css +75 -8
- package/dist/find-in-page/find-bar.d.ts +4 -2
- package/dist/find-in-page/find-bar.js +58 -69
- package/dist/find-in-page/index.d.ts +2 -8
- package/dist/find-in-page/index.js +33 -30
- package/dist/footer/footer.d.ts +3 -4
- package/dist/footer/footer.js +3 -3
- package/dist/footer-with-defaults/index.d.ts +2 -3
- package/dist/footer-with-defaults/index.js +1 -1
- package/dist/frontmatter-preview-defaults/index.js +1 -0
- package/dist/head/doc-head.d.ts +1 -1
- package/dist/head/doc-head.js +24 -32
- package/dist/head/og-tags.d.ts +1 -1
- package/dist/head/og-tags.js +8 -7
- package/dist/head/twitter-card.d.ts +1 -1
- package/dist/head/twitter-card.js +1 -1
- package/dist/head-with-defaults/index.d.ts +7 -2
- package/dist/head-with-defaults/index.js +46 -32
- package/dist/header/header.d.ts +8 -8
- package/dist/header/header.js +9 -11
- package/dist/header/types.d.ts +7 -7
- package/dist/header-with-defaults/index.d.ts +3 -4
- package/dist/header-with-defaults/index.js +27 -14
- package/dist/home-intro/index.d.ts +2 -5
- package/dist/home-intro/index.js +7 -5
- package/dist/home-intro/prepare.js +4 -3
- package/dist/home-page/index.d.ts +3 -3
- package/dist/home-page/index.js +19 -17
- package/dist/html-preview-wrapper/highlighted-code.d.ts +3 -4
- package/dist/html-preview-wrapper/highlighted-code.js +19 -17
- package/dist/html-preview-wrapper/html-preview-wrapper.d.ts +4 -25
- package/dist/html-preview-wrapper/html-preview-wrapper.js +2 -87
- package/dist/html-preview-wrapper/html-preview.d.ts +3 -10
- package/dist/html-preview-wrapper/html-preview.js +13 -37
- package/dist/html-preview-wrapper/index.d.ts +2 -1
- package/dist/html-preview-wrapper/index.js +1 -1
- package/dist/html-preview-wrapper/preview-base.d.ts +3 -5
- package/dist/html-preview-wrapper/preview-base.js +56 -59
- package/dist/html-preview-wrapper/wrapper.d.ts +20 -0
- package/dist/html-preview-wrapper/wrapper.js +37 -0
- package/dist/hydration-pending.d.ts +3 -5
- package/dist/hydration-pending.js +7 -5
- package/dist/i18n-version/language-switcher.d.ts +5 -32
- package/dist/i18n-version/language-switcher.js +5 -106
- package/dist/i18n-version/switcher-generated-scripts.d.ts +2 -0
- package/dist/i18n-version/switcher-generated-scripts.js +107 -0
- package/dist/i18n-version/switcher-url-state.d.ts +76 -0
- package/dist/i18n-version/switcher-url-state.js +103 -0
- package/dist/i18n-version/version-banner.d.ts +2 -3
- package/dist/i18n-version/version-banner.js +1 -1
- package/dist/i18n-version/version-switcher.d.ts +5 -50
- package/dist/i18n-version/version-switcher.js +5 -157
- package/dist/icons/index.d.ts +18 -19
- package/dist/icons/index.js +17 -33
- package/dist/image-enlarge/index.d.ts +1 -10
- package/dist/image-enlarge/index.js +80 -55
- package/dist/image-enlarge/public.d.ts +2 -0
- package/dist/image-enlarge/public.js +6 -0
- package/dist/image-enlarge/ssr-fallback.d.ts +2 -0
- package/dist/image-enlarge/ssr-fallback.js +8 -0
- package/dist/index.d.ts +11 -4
- package/dist/inline-version-switcher/index.d.ts +1 -2
- package/dist/inline-version-switcher/index.js +1 -1
- package/dist/island-types/index.d.ts +2 -2
- package/dist/island-types/index.js +1 -5
- package/dist/math-block/index.d.ts +4 -7
- package/dist/math-block/index.js +5 -5
- package/dist/mcp/handler.d.ts +8 -0
- package/dist/mcp/handler.js +129 -0
- package/dist/mcp/index.d.ts +4 -0
- package/dist/mcp/index.js +7 -0
- package/dist/mcp/loader.d.ts +19 -0
- package/dist/mcp/loader.js +202 -0
- package/dist/mdx-components/index.js +40 -108
- package/dist/mermaid-enlarge/index.d.ts +1 -8
- package/dist/mermaid-enlarge/index.js +174 -158
- package/dist/mermaid-enlarge/public.d.ts +2 -0
- package/dist/mermaid-enlarge/public.js +6 -0
- package/dist/mermaid-enlarge/ssr-fallback.d.ts +2 -0
- package/dist/mermaid-enlarge/ssr-fallback.js +8 -0
- package/dist/metainfo/doc-metainfo.d.ts +2 -3
- package/dist/metainfo/doc-metainfo.js +1 -4
- package/dist/metainfo/doc-tags.d.ts +2 -3
- package/dist/metainfo/doc-tags.js +1 -1
- package/dist/metainfo/frontmatter-preview.d.ts +3 -4
- package/dist/metainfo/frontmatter-preview.js +1 -1
- package/dist/nav-data-prep/index.js +6 -4
- package/dist/nav-indexing/category-nav.d.ts +2 -3
- package/dist/nav-indexing/category-nav.js +1 -2
- package/dist/nav-indexing/category-tree-nav.d.ts +2 -3
- package/dist/nav-indexing/category-tree-nav.js +1 -1
- package/dist/nav-indexing/doc-card-grid.d.ts +2 -3
- package/dist/nav-indexing/doc-card-grid.js +1 -2
- package/dist/nav-indexing/docs-sitemap.d.ts +2 -3
- package/dist/nav-indexing/docs-sitemap.js +2 -2
- package/dist/nav-indexing/index.d.ts +1 -1
- package/dist/nav-indexing/nav-card-grid.d.ts +2 -3
- package/dist/nav-indexing/nav-card-grid.js +1 -2
- package/dist/nav-indexing/note-tray-index-parts/card-list.d.ts +1 -2
- package/dist/nav-indexing/note-tray-index-parts/card-list.js +4 -4
- package/dist/nav-indexing/note-tray-index-parts/date-line.d.ts +2 -3
- package/dist/nav-indexing/note-tray-index-parts/date-line.js +1 -1
- package/dist/nav-indexing/note-tray-index-parts/index-list.d.ts +1 -2
- package/dist/nav-indexing/note-tray-index-parts/index-list.js +2 -2
- package/dist/nav-indexing/note-tray-index-parts/timeline.d.ts +1 -2
- package/dist/nav-indexing/note-tray-index-parts/timeline.js +2 -2
- package/dist/nav-indexing/note-tray-index.d.ts +1 -2
- package/dist/nav-indexing/note-tray-index.js +1 -1
- package/dist/nav-indexing/site-tree-nav-demo.d.ts +2 -3
- package/dist/nav-indexing/site-tree-nav-demo.js +2 -2
- package/dist/nav-indexing/tag-nav.d.ts +1 -2
- package/dist/nav-indexing/tag-nav.js +1 -1
- package/dist/nav-indexing/types.d.ts +2 -2
- package/dist/nav-indexing/versions-page-content.d.ts +2 -3
- package/dist/nav-indexing/versions-page-content.js +8 -8
- package/dist/note-tray-index/index.d.ts +1 -2
- package/dist/note-tray-index/index.js +1 -1
- package/dist/page-loading/page-loading-overlay.d.ts +1 -2
- package/dist/page-loading/page-loading-overlay.js +3 -5
- package/dist/plugins/agent-export.d.ts +3 -0
- package/dist/plugins/agent-export.js +34 -0
- package/dist/plugins/internal/agent-export/chunk.d.ts +5 -0
- package/dist/plugins/internal/agent-export/chunk.js +90 -0
- package/dist/plugins/internal/agent-export/index.d.ts +24 -0
- package/dist/plugins/internal/agent-export/index.js +123 -0
- package/dist/plugins/internal/agent-export/normalize.d.ts +5 -0
- package/dist/plugins/internal/agent-export/normalize.js +73 -0
- package/dist/plugins/internal/llms-txt/dev-middleware.d.ts +6 -0
- package/dist/plugins/internal/llms-txt/dev-middleware.js +8 -3
- package/dist/plugins/internal/llms-txt/emit.js +23 -6
- package/dist/plugins/internal/llms-txt/generate.d.ts +7 -1
- package/dist/plugins/internal/llms-txt/generate.js +9 -2
- package/dist/plugins/internal/llms-txt/load.d.ts +2 -0
- package/dist/plugins/internal/llms-txt/load.js +20 -4
- package/dist/plugins/internal/llms-txt/types.d.ts +10 -0
- package/dist/plugins/routes.js +4 -0
- package/dist/preset.d.ts +19 -9
- package/dist/preset.js +20 -1
- package/dist/route-context-payload/index.js +1 -1
- package/dist/routes/404.d.ts +2 -3
- package/dist/routes/404.js +1 -1
- package/dist/routes/_chrome.d.ts +5 -5
- package/dist/routes/_chrome.js +7 -2
- package/dist/routes/_context.d.ts +4 -4
- package/dist/routes/_design-token-panel-bootstrap.d.ts +1 -4
- package/dist/routes/_design-token-panel-bootstrap.js +9 -1
- package/dist/routes/docs-slug.d.ts +2 -3
- package/dist/routes/docs-tags-index.d.ts +2 -3
- package/dist/routes/docs-tags-index.js +1 -1
- package/dist/routes/docs-tags-tag.d.ts +2 -3
- package/dist/routes/docs-tags-tag.js +1 -1
- package/dist/routes/docs-versions.d.ts +2 -3
- package/dist/routes/docs-versions.js +1 -1
- package/dist/routes/files-path.d.ts +2 -3
- package/dist/routes/files-path.js +1 -1
- package/dist/routes/index.d.ts +2 -3
- package/dist/routes/index.js +1 -1
- package/dist/routes/locale-docs-slug.d.ts +2 -3
- package/dist/routes/locale-docs-tags-index.d.ts +2 -3
- package/dist/routes/locale-docs-tags-index.js +1 -1
- package/dist/routes/locale-docs-tags-tag.d.ts +2 -3
- package/dist/routes/locale-docs-tags-tag.js +1 -1
- package/dist/routes/locale-docs-versions.d.ts +2 -3
- package/dist/routes/locale-docs-versions.js +1 -1
- package/dist/routes/locale-files-path.d.ts +2 -3
- package/dist/routes/locale-files-path.js +1 -1
- package/dist/routes/locale-index.d.ts +2 -3
- package/dist/routes/locale-index.js +1 -1
- package/dist/routes/mcp.d.ts +5 -0
- package/dist/routes/mcp.js +25 -0
- package/dist/routes/v-docs-slug.d.ts +2 -3
- package/dist/routes/v-locale-docs-slug.d.ts +2 -3
- package/dist/search-widget/index.d.ts +1 -2
- package/dist/search-widget/index.js +4 -7
- package/dist/search-widget-script/generated-script.js +12 -5
- package/dist/settings-defaults.d.ts +2 -0
- package/dist/settings-defaults.js +93 -0
- package/dist/settings.d.ts +8 -2
- package/dist/sidebar/client-data.d.ts +18 -0
- package/dist/sidebar/client-data.js +47 -0
- package/dist/sidebar/index.d.ts +3 -1
- package/dist/sidebar/index.js +3 -1
- package/dist/sidebar/sidebar.d.ts +12 -44
- package/dist/sidebar/sidebar.js +4 -3
- package/dist/sidebar/types.d.ts +14 -0
- package/dist/sidebar-prepaint/index.d.ts +1 -2
- package/dist/sidebar-prepaint/index.js +4 -6
- package/dist/sidebar-resizer/sidebar-resizer-init.d.ts +2 -3
- package/dist/sidebar-resizer/sidebar-resizer-init.js +3 -3
- package/dist/sidebar-toggle-island/index.d.ts +8 -11
- package/dist/sidebar-toggle-island/index.js +75 -62
- package/dist/sidebar-tree/build-tree.js +5 -6
- package/dist/sidebar-tree/types.d.ts +2 -0
- package/dist/sidebar-tree-island/index.d.ts +4 -19
- package/dist/sidebar-tree-island/index.js +782 -436
- package/dist/sidebar-tree-island/scope-state.d.ts +38 -0
- package/dist/sidebar-tree-island/scope-state.js +151 -0
- package/dist/sidebar-tree-island/sidebar-scroll-preserve.js +6 -2
- package/dist/sidebar-utils/index.d.ts +17 -19
- package/dist/sidebar-utils/index.js +100 -3
- package/dist/sidebar-utils/scope.d.ts +11 -0
- package/dist/sidebar-utils/scope.js +67 -0
- package/dist/sidebar-with-defaults/index.d.ts +1 -2
- package/dist/sidebar-with-defaults/index.js +19 -18
- package/dist/site-schema/nav-tree.js +15 -15
- package/dist/site-schema/types.d.ts +1 -0
- package/dist/site-tree-nav/index.d.ts +2 -3
- package/dist/site-tree-nav/index.js +11 -12
- package/dist/site-tree-nav/normalize-island-props.d.ts +16 -0
- package/dist/site-tree-nav/normalize-island-props.js +122 -0
- package/dist/site-tree-nav-island/index.d.ts +3 -3
- package/dist/site-tree-nav-island/index.js +243 -144
- package/dist/smart-break/index.d.ts +3 -4
- package/dist/smart-break/index.js +1 -1
- package/dist/tab-item/tab-item.d.ts +3 -4
- package/dist/tab-item/tab-item.js +1 -1
- package/dist/tag-pages/index.d.ts +3 -3
- package/dist/tag-pages/index.js +10 -10
- package/dist/theme/color-scheme-provider.d.ts +3 -3
- package/dist/theme/color-scheme-provider.js +3 -3
- package/dist/theme/theme-pack-provider.d.ts +1 -1
- package/dist/theme/theme-pack-provider.js +3 -3
- package/dist/theme/theme-toggle.d.ts +2 -3
- package/dist/theme/theme-toggle.js +1 -1
- package/dist/theme-pack-dialog/index.d.ts +1 -1
- package/dist/theme-pack-dialog/index.js +69 -75
- package/dist/theme-pack-dialog/theme-pack-card.d.ts +3 -4
- package/dist/theme-pack-dialog/theme-pack-card.js +19 -17
- package/dist/theme-pack-switcher/index.d.ts +4 -5
- package/dist/theme-pack-switcher/index.js +52 -49
- package/dist/theme-packs/academia/meta.json +1 -1
- package/dist/theme-packs/academia/pack.css +1 -1
- package/dist/theme-packs/bauhaus/meta.json +1 -1
- package/dist/theme-packs/bauhaus/pack.css +2 -2
- package/dist/theme-packs/blueprint/meta.json +1 -1
- package/dist/theme-packs/blueprint/pack.css +2 -2
- package/dist/theme-packs/botanica/meta.json +1 -1
- package/dist/theme-packs/botanica/pack.css +2 -2
- package/dist/theme-packs/broadsheet/meta.json +1 -1
- package/dist/theme-packs/broadsheet/pack.css +2 -2
- package/dist/theme-packs/brutalist/meta.json +1 -1
- package/dist/theme-packs/brutalist/pack.css +2 -2
- package/dist/theme-packs/eink/meta.json +1 -1
- package/dist/theme-packs/eink/pack.css +1 -1
- package/dist/theme-packs/futura-editorial/meta.json +1 -1
- package/dist/theme-packs/futura-editorial/pack.css +2 -2
- package/dist/theme-packs/hearth/meta.json +1 -1
- package/dist/theme-packs/hearth/pack.css +2 -2
- package/dist/theme-packs/ledger/meta.json +1 -1
- package/dist/theme-packs/ledger/pack.css +1 -1
- package/dist/theme-packs/manuscript/meta.json +1 -1
- package/dist/theme-packs/manuscript/pack.css +1 -1
- package/dist/theme-packs/matcha/meta.json +1 -1
- package/dist/theme-packs/matcha/pack.css +2 -2
- package/dist/theme-packs/nocturne/meta.json +1 -1
- package/dist/theme-packs/nocturne/pack.css +2 -2
- package/dist/theme-packs/observatory/meta.json +1 -1
- package/dist/theme-packs/observatory/pack.css +2 -2
- package/dist/theme-packs/onyx/meta.json +1 -1
- package/dist/theme-packs/onyx/pack.css +2 -2
- package/dist/theme-packs/phosphor/meta.json +1 -1
- package/dist/theme-packs/phosphor/pack.css +2 -2
- package/dist/theme-packs/riso/meta.json +1 -1
- package/dist/theme-packs/riso/pack.css +2 -2
- package/dist/theme-packs/sakura/meta.json +1 -1
- package/dist/theme-packs/sakura/pack.css +2 -2
- package/dist/theme-packs/scandi/meta.json +1 -1
- package/dist/theme-packs/scandi/pack.css +1 -1
- package/dist/theme-packs/solar/meta.json +1 -1
- package/dist/theme-packs/solar/pack.css +1 -1
- package/dist/theme-packs/sumi/meta.json +1 -1
- package/dist/theme-packs/sumi/pack.css +2 -2
- package/dist/theme-packs/swissgrid/meta.json +1 -1
- package/dist/theme-packs/swissgrid/pack.css +1 -1
- package/dist/theme-packs/timberline/meta.json +1 -1
- package/dist/theme-packs/timberline/pack.css +2 -2
- package/dist/theme-packs/washi/meta.json +1 -1
- package/dist/theme-packs/washi/pack.css +2 -2
- package/dist/theme-toggle/index.d.ts +1 -1
- package/dist/theme-toggle/index.js +154 -167
- package/dist/theme.css +47 -121
- package/dist/toc/mobile-toc.d.ts +3 -5
- package/dist/toc/mobile-toc.js +29 -27
- package/dist/toc/toc.d.ts +3 -4
- package/dist/toc/toc.js +18 -18
- package/dist/toc/use-active-heading.d.ts +5 -4
- package/dist/toc/use-active-heading.js +36 -30
- package/dist/toc-prepaint/index.d.ts +1 -2
- package/dist/toc-prepaint/index.js +4 -6
- package/dist/transitions/nested-island-props-refresh.d.ts +3 -16
- package/dist/transitions/nested-island-props-refresh.js +133 -151
- package/dist/transitions/page-events.d.ts +8 -13
- package/dist/tree-nav-shared/index.d.ts +4 -5
- package/dist/tree-nav-shared/index.js +6 -7
- package/dist/use-modal-dialog/index.d.ts +9 -63
- package/dist/use-modal-dialog/index.js +41 -59
- package/dist/versions-page/index.d.ts +3 -3
- package/dist/versions-page/index.js +5 -5
- package/dist/wind/index.d.ts +5 -0
- package/dist/wind/index.js +169 -0
- package/dist/wind.json +498 -0
- package/dist/z-index-defaults/index.d.ts +4 -4
- package/dist/zdtp-loader.d.ts +7 -0
- package/dist/zdtp-loader.js +8 -0
- package/eject/asset-components/asset-card.tsx +14 -16
- package/eject/asset-components/asset-code.tsx +10 -12
- package/eject/asset-components/shared.tsx +5 -7
- package/eject/breadcrumb/breadcrumb.tsx +15 -16
- package/eject/code-group/index.tsx +4 -10
- package/eject/content-admonition/index.tsx +5 -6
- package/eject/desktop-sidebar-toggle-island/index.ts +4 -0
- package/eject/desktop-sidebar-toggle-island/island.tsx +50 -0
- package/eject/desktop-sidebar-toggle-island/storage.ts +27 -0
- package/eject/details/details.tsx +3 -5
- package/eject/doc-history/index.tsx +193 -179
- package/eject/doc-pager/index.tsx +3 -4
- package/eject/footer/footer.tsx +7 -9
- package/eject/header/header.tsx +42 -54
- package/eject/header/nav-overflow-script.ts +1 -1
- package/eject/header/types.ts +12 -13
- package/eject/image-enlarge/index.tsx +84 -69
- package/eject/image-enlarge/public.ts +2 -0
- package/eject/image-enlarge/ssr-fallback.tsx +7 -0
- package/eject/page-loading/page-loading-overlay.tsx +8 -15
- package/eject/sidebar/client-data.ts +68 -0
- package/eject/sidebar/index.ts +3 -0
- package/eject/sidebar/sidebar.tsx +16 -97
- package/eject/sidebar/types.ts +15 -0
- package/eject/sidebar-toggle-island/index.tsx +103 -102
- package/eject/sidebar-tree-island/index.tsx +827 -615
- package/eject/sidebar-tree-island/scope-state.ts +154 -0
- package/eject/sidebar-tree-island/sidebar-scroll-preserve.ts +8 -2
- package/eject/site-tree-nav-island/index.tsx +349 -222
- package/eject/tab-item/tab-item.tsx +2 -4
- package/eject/theme-toggle/hydration-pending.ts +6 -10
- package/eject/theme-toggle/index.tsx +133 -173
- package/eject/toc/mobile-toc.tsx +27 -31
- package/eject/toc/toc.tsx +21 -24
- package/eject/toc/use-active-heading.ts +43 -38
- package/package.json +40 -22
- package/routes-src/404.tsx +2 -3
- package/routes-src/_chrome.tsx +7 -2
- package/routes-src/_design-token-panel-bootstrap.tsx +1 -63
- package/routes-src/docs-slug.tsx +2 -3
- package/routes-src/docs-tags-index.tsx +2 -3
- package/routes-src/docs-tags-tag.tsx +2 -3
- package/routes-src/docs-versions.tsx +2 -3
- package/routes-src/files-path.tsx +2 -4
- package/routes-src/index.tsx +2 -3
- package/routes-src/locale-docs-slug.tsx +2 -3
- package/routes-src/locale-docs-tags-index.tsx +2 -3
- package/routes-src/locale-docs-tags-tag.tsx +2 -3
- package/routes-src/locale-docs-versions.tsx +2 -3
- package/routes-src/locale-files-path.tsx +2 -4
- package/routes-src/locale-index.tsx +2 -3
- package/routes-src/mcp.tsx +25 -0
- package/routes-src/v-docs-slug.tsx +2 -3
- package/routes-src/v-locale-docs-slug.tsx +2 -3
- package/tsconfig.base.json +1 -1
- package/dist/safelist.css +0 -2
- package/dist/theme-no-reset.css +0 -379
- package/eject/desktop-sidebar-toggle-island/index.tsx +0 -110
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parseFragment } from "parse5";
|
|
1
2
|
const SLUGIFY_STRIPPED = new Set(
|
|
2
3
|
"!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~".split("")
|
|
3
4
|
);
|
|
@@ -84,7 +85,33 @@ function stripInlineMarkdown(raw) {
|
|
|
84
85
|
masked += raw[i];
|
|
85
86
|
i++;
|
|
86
87
|
}
|
|
87
|
-
return masked.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/(?<![A-Za-z0-9])__([^_]+)__(?![A-Za-z0-9])/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/(?<![A-Za-z0-9])_([^_]+)_(?![A-Za-z0-9])/g, "$1").replace(/\uE000(\d+)\uE001/g, (_match, index) => protectedText[Number(index)] ?? "").trim();
|
|
88
|
+
return masked.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/(?<![A-Za-z0-9])__([^_]+)__(?![A-Za-z0-9])/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/(?<![A-Za-z0-9])_([^_]+)_(?![A-Za-z0-9])/g, "$1").replace(/&#(?:[0-9]{1,7}|[xX][0-9a-fA-F]{1,6});|&[A-Za-z][A-Za-z0-9]{1,31};/g, decodeCharacterReference).replace(/\uE000(\d+)\uE001/g, (_match, index) => protectedText[Number(index)] ?? "").trim();
|
|
89
|
+
}
|
|
90
|
+
function decodeCharacterReference(reference) {
|
|
91
|
+
if (reference.startsWith("&#")) {
|
|
92
|
+
const hex = reference[2]?.toLowerCase() === "x";
|
|
93
|
+
const value = Number.parseInt(reference.slice(hex ? 3 : 2, -1), hex ? 16 : 10);
|
|
94
|
+
if (value === 0 || value > 1114111 || value >= 55296 && value <= 57343 || value < 32 && ![9, 10, 13].includes(value) || value >= 127 && value <= 159) {
|
|
95
|
+
return "\uFFFD";
|
|
96
|
+
}
|
|
97
|
+
return String.fromCodePoint(value);
|
|
98
|
+
}
|
|
99
|
+
let invalid = false;
|
|
100
|
+
const fragment = parseFragment(reference, { onParseError: () => {
|
|
101
|
+
invalid = true;
|
|
102
|
+
} });
|
|
103
|
+
if (invalid) return reference;
|
|
104
|
+
return fragment.childNodes.map((node) => node.nodeName === "#text" && "value" in node ? node.value : "").join("");
|
|
105
|
+
}
|
|
106
|
+
function openingFence(line) {
|
|
107
|
+
const match = /^ {0,3}(`{3,}|~{3,})(.*)$/.exec(line);
|
|
108
|
+
if (!match || match[1]?.startsWith("`") && match[2]?.includes("`")) return null;
|
|
109
|
+
return match[1] ?? null;
|
|
110
|
+
}
|
|
111
|
+
function closesFence(line, opener) {
|
|
112
|
+
const match = /^ {0,3}(`{3,}|~{3,})[ \t\r]*$/.exec(line);
|
|
113
|
+
const run = match?.[1];
|
|
114
|
+
return run !== void 0 && run[0] === opener[0] && run.length >= opener.length;
|
|
88
115
|
}
|
|
89
116
|
function resolveDepthWindow(rawMin, rawMax) {
|
|
90
117
|
const min = Math.trunc(Number(rawMin));
|
|
@@ -111,7 +138,7 @@ function collectHeadings(body, lo, hi) {
|
|
|
111
138
|
const candidate = classifyLines(lines);
|
|
112
139
|
for (const [index, line] of lines.entries()) {
|
|
113
140
|
if (candidate[index] !== true) continue;
|
|
114
|
-
const match = /^(#{2,6})[ \t]+(.+)$/.exec(line
|
|
141
|
+
const match = /^ {0,3}(#{2,6})[ \t]+(.+)$/.exec(line);
|
|
115
142
|
if (!match) continue;
|
|
116
143
|
const hashes = match[1];
|
|
117
144
|
const rawText = match[2];
|
|
@@ -133,7 +160,7 @@ function findCodeSpanEnd(lines, from, runLength) {
|
|
|
133
160
|
for (let lineIndex = from; lineIndex < lines.length; lineIndex++) {
|
|
134
161
|
const line = lines[lineIndex] ?? "";
|
|
135
162
|
const trimmed = line.trimStart();
|
|
136
|
-
if (trimmed.trim() === "" || ATX_HEADING.test(trimmed) ||
|
|
163
|
+
if (trimmed.trim() === "" || ATX_HEADING.test(trimmed) || openingFence(line) !== null) {
|
|
137
164
|
return null;
|
|
138
165
|
}
|
|
139
166
|
for (const match of line.matchAll(/`+/g)) {
|
|
@@ -176,18 +203,22 @@ function scanLines(lines, ignoredOpeners) {
|
|
|
176
203
|
} else if (exprDepth > 0 || tag !== null) {
|
|
177
204
|
candidate.push(false);
|
|
178
205
|
} else {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
206
|
+
if (codeFenceOpener !== null) {
|
|
207
|
+
if (closesFence(line, codeFenceOpener)) codeFenceOpener = null;
|
|
208
|
+
candidate.push(false);
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
const fence = openingFence(line);
|
|
212
|
+
if (fence !== null) {
|
|
213
|
+
codeFenceOpener = fence;
|
|
214
|
+
candidate.push(false);
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
if (/^(?: {4}| *\t)/.test(line)) {
|
|
186
218
|
candidate.push(false);
|
|
187
219
|
continue;
|
|
188
220
|
}
|
|
189
|
-
candidate.push(
|
|
190
|
-
if (codeFenceOpener !== null) continue;
|
|
221
|
+
candidate.push(true);
|
|
191
222
|
}
|
|
192
223
|
for (let i = start; i < line.length; i++) {
|
|
193
224
|
const ch = line[i] ?? "";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Child, Component } from "@takazudo/zfb/zudo-react";
|
|
1
2
|
import type { LocaleConfig, Settings } from "../settings.js";
|
|
2
3
|
import type { AssetManifest, ColorScheme, ThemePackRegistry } from "../route-context-payload/types.js";
|
|
3
4
|
import type { UrlHelpers } from "../url-helpers/index.js";
|
|
@@ -43,9 +44,10 @@ export interface FactoryI18n {
|
|
|
43
44
|
* reason and a CLAUDE.md entry. All slots are optional so a factory takes only
|
|
44
45
|
* the ones it needs.
|
|
45
46
|
*
|
|
46
|
-
* Components are typed as the structural `FactoryComponent` (a
|
|
47
|
-
*
|
|
48
|
-
* type stays node-free
|
|
47
|
+
* Components are typed as the structural `FactoryComponent` (a
|
|
48
|
+
* `Component<Record<string, unknown>>`) rather than a concrete signature, so
|
|
49
|
+
* the type stays node-free at the boundary while using zfb's component and
|
|
50
|
+
* child contract.
|
|
49
51
|
*/
|
|
50
52
|
export interface FactoryComponents {
|
|
51
53
|
/** Locale-aware category nav wrapper (reads the project's content collection). */
|
|
@@ -63,8 +65,8 @@ export interface FactoryComponents {
|
|
|
63
65
|
/** PresetGenerator SSR shell (showcase-only; downstream projects stub it). */
|
|
64
66
|
PresetGenerator?: FactoryComponent;
|
|
65
67
|
}
|
|
66
|
-
/**
|
|
67
|
-
export type FactoryComponent =
|
|
68
|
+
/** A component receiving the broad props shape used by chrome factories. */
|
|
69
|
+
export type FactoryComponent = Component<Record<string, unknown>>;
|
|
68
70
|
/**
|
|
69
71
|
* Opaque per-locale nav-source handle. The host owns the actual content-loader
|
|
70
72
|
* implementation (it reads project content collections, which cannot live in the
|
|
@@ -230,20 +232,21 @@ export interface ChromeHostBindings {
|
|
|
230
232
|
/** Body-end islands (bootstrap islands). Default: the package-island subset
|
|
231
233
|
* derived from `settings` (no host-only client-router / token-panel boots). */
|
|
232
234
|
BodyEndIslands?: FactoryComponent;
|
|
233
|
-
/** DocHistory
|
|
235
|
+
/** DocHistory server boundary. Default: a no-op stub rendering an empty fragment.
|
|
236
|
+
* Use DocHistoryBoundary from the doc-history-area entrypoint for the package
|
|
237
|
+
* client. Custom boundaries consume ssrFallback server-side and wrap their
|
|
238
|
+
* statically imported client target in a Fragment-wrapped Island. */
|
|
234
239
|
DocHistory?: FactoryComponent;
|
|
235
240
|
/**
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* bootstrap component. Mounting is still gated on
|
|
246
|
-
* `settings.designTokenPanel` inside `createBodyEndIslands` either way.
|
|
241
|
+
* Zero-prop server boundary for the design-token-panel bootstrap. Return a
|
|
242
|
+
* Fragment containing Island({ when: "load", children: <HostBootstrap /> })
|
|
243
|
+
* with a statically imported client target; a raw client component is not
|
|
244
|
+
* a boundary. The package default owns the same fixed-target shape.
|
|
245
|
+
* The package controls settings.designTokenPanel and the toggle shim; it
|
|
246
|
+
* renders this boundary unchanged and never wraps a dynamic Island target.
|
|
247
|
+
* An explicit host boundary wins over configured-route and package defaults,
|
|
248
|
+
* including when designTokenPanelConfigModule suppresses the package default.
|
|
249
|
+
* With designTokenPanel disabled neither this boundary nor the shim mounts.
|
|
247
250
|
*/
|
|
248
251
|
DesignTokenPanelBootstrap?: FactoryComponent;
|
|
249
252
|
/** MDX content-component overrides (Details / HtmlPreview / Island /
|
|
@@ -264,7 +267,7 @@ export interface ChromeHostBindings {
|
|
|
264
267
|
locale: string;
|
|
265
268
|
isFallback?: boolean;
|
|
266
269
|
version?: string;
|
|
267
|
-
}) =>
|
|
270
|
+
}) => Child;
|
|
268
271
|
/**
|
|
269
272
|
* Extra content rendered in the home hero. A RENDERER (not a component).
|
|
270
273
|
* Default: absent → renders nothing. The `/` home route is never injected
|
|
@@ -274,7 +277,7 @@ export interface ChromeHostBindings {
|
|
|
274
277
|
*/
|
|
275
278
|
homeExtras?: (args: {
|
|
276
279
|
locale: string;
|
|
277
|
-
}) =>
|
|
280
|
+
}) => Child;
|
|
278
281
|
}
|
|
279
282
|
/**
|
|
280
283
|
* The unified chrome context — the superset that fully wires the page chrome:
|
package/dist/features.css
CHANGED
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shipped to consumers as `@takazudo/zudo-doc/features.css` (copied to
|
|
5
5
|
* `dist/features.css` by scripts/copy-features-css.mjs on build). Provides
|
|
6
|
-
* feature CSS that is NOT coupled to a specific
|
|
6
|
+
* feature CSS that is NOT coupled to a specific island — it is shared
|
|
7
7
|
* across all projects that use @takazudo/zudo-doc regardless of which islands
|
|
8
8
|
* are active. See zudolab/zudo-doc#2331.
|
|
9
9
|
*
|
|
10
10
|
* ── Consumer contract ──────────────────────────────────────────────────────
|
|
11
|
-
* The
|
|
11
|
+
* The custom properties consumed below are plain `:root` variables supplied by
|
|
12
|
+
* the zudoDoc() token defaults (`@takazudo/zudo-doc/theme.css`); override them
|
|
13
|
+
* in a `:root` rule after the imports. No consumer `@theme` is involved:
|
|
12
14
|
* --color-{bg,fg,muted,accent,surface,code-bg,code-fg,success,warning,
|
|
13
15
|
* matched-keyword-bg,matched-keyword-fg}
|
|
14
|
-
* --spacing-{hsp-sm,hsp-2xs,hsp-lg,hsp-md,hsp-xl,vsp-xs,vsp-2xs,vsp-md,vsp-lg,
|
|
16
|
+
* --spacing-{hsp-sm,hsp-2xs,hsp-lg,hsp-md,hsp-xl,vsp-xs,vsp-2xs,vsp-sm,vsp-md,vsp-lg,
|
|
15
17
|
* icon-sm}
|
|
16
18
|
* --z-index-{local-1,local-2}
|
|
17
19
|
* --z-index-toolbar
|
|
@@ -27,8 +29,7 @@
|
|
|
27
29
|
* --zd-transition-slow
|
|
28
30
|
* --zd-transition-slower
|
|
29
31
|
* --default-transition-duration
|
|
30
|
-
*
|
|
31
|
-
* pre-condition before @importing this file).
|
|
32
|
+
* Import `theme.css` before this file so the defaults are defined.
|
|
32
33
|
* ─────────────────────────────────────────────────────────────────────────── */
|
|
33
34
|
|
|
34
35
|
/* ========================================
|
|
@@ -1001,11 +1002,11 @@ dialog.zd-mermaid-dialog::backdrop {
|
|
|
1001
1002
|
*
|
|
1002
1003
|
* The `body { font-family }` rule below is the CHROME FONT SEAM (#2887): it is
|
|
1003
1004
|
* why a theme pack's `--font-sans` reaches the header/sidebar/TOC/footer at all.
|
|
1004
|
-
* Those surfaces set no font-family of their own, and
|
|
1005
|
+
* Those surfaces set no font-family of their own, and the reset's `html, :host`
|
|
1005
1006
|
* rule compiles to a hardcoded literal stack here (no `--default-font-family` is
|
|
1006
1007
|
* ever defined), so without this rule the token could only ever reach `.zd-content`
|
|
1007
|
-
* prose. It works because this block is UNLAYERED and
|
|
1008
|
-
*
|
|
1008
|
+
* prose. It works because this block is UNLAYERED and the reset lives in
|
|
1009
|
+
* `@layer zw-reset` — see component-tokens.ts for the full rationale.
|
|
1009
1010
|
* ========================================================================== */
|
|
1010
1011
|
|
|
1011
1012
|
/* BEGIN --zdc-* chrome component tokens (generated by gen-component-tokens; do not edit by hand) */
|
|
@@ -1035,6 +1036,11 @@ header[data-header] {
|
|
|
1035
1036
|
font-family: var(--zdc-header-font, var(--zdc-chrome-font, var(--font-sans)));
|
|
1036
1037
|
}
|
|
1037
1038
|
|
|
1039
|
+
a[data-header-logo] {
|
|
1040
|
+
font-family: var(--zdc-header-logo-font, inherit);
|
|
1041
|
+
font-weight: var(--zdc-header-logo-weight, var(--font-weight-bold));
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1038
1044
|
#desktop-sidebar, aside[data-zd-mobile-sidebar] {
|
|
1039
1045
|
font-family: var(--zdc-sidebar-font, var(--zdc-chrome-font, var(--font-sans)));
|
|
1040
1046
|
}
|
|
@@ -1284,3 +1290,64 @@ html[data-asset-details-hidden]
|
|
|
1284
1290
|
[data-zd-asset-tree] details[open] > summary > svg:nth-child(2) {
|
|
1285
1291
|
display: none;
|
|
1286
1292
|
}
|
|
1293
|
+
|
|
1294
|
+
/* zfb 3 wind does not compile these relation selectors or effect families.
|
|
1295
|
+
* Keep the component-owned rules unlayered, alongside Tailwind v4 utilities. */
|
|
1296
|
+
.zd-footer-copyright-links a {
|
|
1297
|
+
text-decoration-line: underline;
|
|
1298
|
+
}
|
|
1299
|
+
.zd-footer-copyright-links a:hover,
|
|
1300
|
+
.zd-footer-copyright-links a:focus-visible {
|
|
1301
|
+
color: var(--color-accent);
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
.zd-hide-details-marker::-webkit-details-marker {
|
|
1305
|
+
display: none;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
.zd-list-items-no-margin li,
|
|
1309
|
+
.zd-breadcrumb-nav-no-margin nav {
|
|
1310
|
+
margin-bottom: 0;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
.zd-card-links-interactive a {
|
|
1314
|
+
pointer-events: auto;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
.zd-wrap-anywhere {
|
|
1318
|
+
overflow-wrap: anywhere;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
/* Search rows own their padding; idle and status content need the same inset. */
|
|
1322
|
+
site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
1323
|
+
padding-top: var(--spacing-vsp-sm);
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
.zd-search-excerpt-decoration {
|
|
1327
|
+
text-decoration-color: var(--color-muted);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
.zd-preview-shadow {
|
|
1331
|
+
/* Preserve Tailwind's four transparent shadow layers in computed styles. */
|
|
1332
|
+
box-shadow:
|
|
1333
|
+
0 0 #0000,
|
|
1334
|
+
0 0 #0000,
|
|
1335
|
+
0 0 #0000,
|
|
1336
|
+
0 0 #0000,
|
|
1337
|
+
0 1px 3px var(--color-fg);
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1341
|
+
.zd-preview-shadow {
|
|
1342
|
+
box-shadow:
|
|
1343
|
+
0 0 #0000,
|
|
1344
|
+
0 0 #0000,
|
|
1345
|
+
0 0 #0000,
|
|
1346
|
+
0 0 #0000,
|
|
1347
|
+
0 1px 3px color-mix(in srgb, var(--color-fg) 8%, transparent);
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.zd-theme-pack-active-ring {
|
|
1352
|
+
box-shadow: 0 0 0 2px var(--color-accent);
|
|
1353
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/** @jsxRuntime automatic */
|
|
2
|
+
import { type ReadonlySignal } from "@takazudo/zfb/zudo-react";
|
|
1
3
|
import type { FindInPage } from "./find-in-page.js";
|
|
2
4
|
interface FindBarProps {
|
|
3
|
-
visible: boolean
|
|
5
|
+
visible: ReadonlySignal<boolean>;
|
|
4
6
|
onClose: () => void;
|
|
5
7
|
findInPage: FindInPage;
|
|
6
8
|
containerSelector: string;
|
|
7
9
|
}
|
|
8
|
-
export declare function FindBar({ visible, onClose, findInPage, containerSelector }: FindBarProps): import("
|
|
10
|
+
export declare function FindBar({ visible, onClose, findInPage, containerSelector }: FindBarProps): import("@takazudo/zfb").Description;
|
|
9
11
|
export {};
|
|
@@ -1,84 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
computed,
|
|
4
|
+
getScope,
|
|
5
|
+
Show,
|
|
6
|
+
signal
|
|
7
|
+
} from "@takazudo/zfb/zudo-react";
|
|
4
8
|
function toMatchInfo(result) {
|
|
5
9
|
return result.matches > 0 ? result : null;
|
|
6
10
|
}
|
|
7
11
|
function FindBar({ visible, onClose, findInPage, containerSelector }) {
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const inputRef =
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
inputRef.current?.select();
|
|
12
|
+
const query = signal("");
|
|
13
|
+
const matchInfo = signal(null);
|
|
14
|
+
const inputRef = { current: null };
|
|
15
|
+
const scope = getScope();
|
|
16
|
+
scope.effect(() => {
|
|
17
|
+
if (!visible.value) {
|
|
18
|
+
query.value = "";
|
|
19
|
+
matchInfo.value = null;
|
|
20
|
+
findInPage.stop();
|
|
21
|
+
return;
|
|
19
22
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (!
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const text = query.value;
|
|
24
|
+
const container = document.querySelector(containerSelector);
|
|
25
|
+
if (!text || !(container instanceof HTMLElement)) {
|
|
26
|
+
matchInfo.value = null;
|
|
27
|
+
findInPage.stop();
|
|
28
|
+
return;
|
|
26
29
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (e.key === "Escape") {
|
|
47
|
-
onClose();
|
|
48
|
-
} else if (e.key === "Enter") {
|
|
49
|
-
const result = e.shiftKey ? findInPage.prev() : findInPage.next();
|
|
50
|
-
setMatchInfo(toMatchInfo(result));
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
[onClose, findInPage]
|
|
54
|
-
);
|
|
55
|
-
if (!visible) return null;
|
|
56
|
-
return /* @__PURE__ */ jsxs("div", { className: "fixed top-[3.5rem] right-0 z-dropdown flex items-center gap-hsp-sm py-hsp-xs px-hsp-md bg-surface border-b border-l border-muted rounded-bl-lg shadow-md", children: [
|
|
30
|
+
matchInfo.value = toMatchInfo(findInPage.find(container, text));
|
|
31
|
+
});
|
|
32
|
+
scope.effect(() => {
|
|
33
|
+
if (!visible.value) return;
|
|
34
|
+
inputRef.current?.focus();
|
|
35
|
+
inputRef.current?.select();
|
|
36
|
+
});
|
|
37
|
+
scope.onCleanup(() => findInPage.stop());
|
|
38
|
+
const handleKeyDown = (event) => {
|
|
39
|
+
const keyboard = event;
|
|
40
|
+
if (keyboard.isComposing || event.defaultPrevented) return;
|
|
41
|
+
if (keyboard.key === "Escape") {
|
|
42
|
+
onClose();
|
|
43
|
+
} else if (keyboard.key === "Enter") {
|
|
44
|
+
const result = keyboard.shiftKey ? findInPage.prev() : findInPage.next();
|
|
45
|
+
matchInfo.value = toMatchInfo(result);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ jsx(Show, { when: computed(() => visible.value), children: () => /* @__PURE__ */ jsxs("div", { class: "fixed top-[3.5rem] right-0 z-dropdown flex items-center gap-hsp-sm py-hsp-xs px-hsp-md bg-surface border-b border-l border-muted rounded-bl-lg", children: [
|
|
57
49
|
/* @__PURE__ */ jsx(
|
|
58
50
|
"input",
|
|
59
51
|
{
|
|
60
52
|
ref: inputRef,
|
|
61
|
-
|
|
53
|
+
class: "w-[12rem] py-[4px] px-hsp-sm rounded text-small bg-bg border border-muted text-fg outline-none focus:border-accent",
|
|
62
54
|
type: "text",
|
|
63
|
-
|
|
55
|
+
modelValue: query,
|
|
64
56
|
placeholder: "Find in page...",
|
|
65
57
|
"aria-label": "Find in page",
|
|
66
|
-
|
|
67
|
-
setQuery(e.currentTarget.value);
|
|
68
|
-
handleFind(e.currentTarget.value);
|
|
69
|
-
},
|
|
70
|
-
onKeyDown: handleKeyDown
|
|
58
|
+
"on:keydown": handleKeyDown
|
|
71
59
|
}
|
|
72
60
|
),
|
|
73
|
-
/* @__PURE__ */ jsx("span", {
|
|
61
|
+
/* @__PURE__ */ jsx("span", { class: "text-caption whitespace-nowrap min-w-[3rem] text-center text-fg/60", children: computed(() => {
|
|
62
|
+
const result = matchInfo.value;
|
|
63
|
+
return result ? `${result.activeMatchOrdinal}/${result.matches}` : "";
|
|
64
|
+
}) }),
|
|
74
65
|
/* @__PURE__ */ jsx(
|
|
75
66
|
"button",
|
|
76
67
|
{
|
|
77
68
|
type: "button",
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
setMatchInfo(toMatchInfo(result));
|
|
69
|
+
class: "py-hsp-2xs px-hsp-sm rounded text-caption bg-bg border border-muted text-fg hover:bg-surface",
|
|
70
|
+
"on:click": () => {
|
|
71
|
+
matchInfo.value = toMatchInfo(findInPage.prev());
|
|
82
72
|
},
|
|
83
73
|
title: "Previous (Shift+Enter)",
|
|
84
74
|
children: "Prev"
|
|
@@ -88,10 +78,9 @@ function FindBar({ visible, onClose, findInPage, containerSelector }) {
|
|
|
88
78
|
"button",
|
|
89
79
|
{
|
|
90
80
|
type: "button",
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
setMatchInfo(toMatchInfo(result));
|
|
81
|
+
class: "py-hsp-2xs px-hsp-sm rounded text-caption bg-bg border border-muted text-fg hover:bg-surface",
|
|
82
|
+
"on:click": () => {
|
|
83
|
+
matchInfo.value = toMatchInfo(findInPage.next());
|
|
95
84
|
},
|
|
96
85
|
title: "Next (Enter)",
|
|
97
86
|
children: "Next"
|
|
@@ -101,13 +90,13 @@ function FindBar({ visible, onClose, findInPage, containerSelector }) {
|
|
|
101
90
|
"button",
|
|
102
91
|
{
|
|
103
92
|
type: "button",
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
class: "py-hsp-2xs px-hsp-sm rounded text-caption bg-bg border border-muted text-fg hover:bg-surface",
|
|
94
|
+
"on:click": onClose,
|
|
106
95
|
title: "Close (Esc)",
|
|
107
96
|
children: "Close"
|
|
108
97
|
}
|
|
109
98
|
)
|
|
110
|
-
] });
|
|
99
|
+
] }) });
|
|
111
100
|
}
|
|
112
101
|
export {
|
|
113
102
|
FindBar
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import type { JSX } from "
|
|
2
|
-
|
|
3
|
-
* `displayName` pinned explicitly (matching
|
|
4
|
-
* `AiChatModal`/`ImageEnlarge`/`MermaidEnlarge`/`DesignTokenPanelBootstrap`)
|
|
5
|
-
* so zfb's `captureComponentName` emits a stable
|
|
6
|
-
* `data-zfb-island="FindInPageInit"` marker independent of minification.
|
|
7
|
-
*/
|
|
8
|
-
export declare function FindInPageInit(): JSX.Element | null;
|
|
1
|
+
import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
|
+
export declare function FindInPageInit(): JSX.Element;
|
|
9
3
|
export declare namespace FindInPageInit {
|
|
10
4
|
var displayName: string;
|
|
11
5
|
}
|
|
@@ -1,47 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
3
|
-
import {
|
|
2
|
+
import { jsx } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
3
|
+
import { computed, getScope, Show, signal } from "@takazudo/zfb/zudo-react";
|
|
4
4
|
import { FindBar } from "./find-bar.js";
|
|
5
5
|
import { createFindInPage } from "./find-in-page.js";
|
|
6
6
|
const CONTENT_SELECTOR = "article.zd-content";
|
|
7
|
+
const BEFORE_PREPARATION_EVENT = "zfb:before-preparation";
|
|
7
8
|
function FindInPageInit() {
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const isTauri = signal(false);
|
|
10
|
+
const visible = signal(false);
|
|
11
|
+
const findInPage = createFindInPage();
|
|
12
|
+
const scope = getScope();
|
|
13
|
+
scope.onActivate(() => {
|
|
14
|
+
if (typeof window === "undefined" || !("__TAURI_INTERNALS__" in window)) {
|
|
15
|
+
return;
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
e.preventDefault();
|
|
21
|
-
setVisible((prev) => !prev);
|
|
17
|
+
isTauri.value = true;
|
|
18
|
+
const handleKeyDown = (event) => {
|
|
19
|
+
const keyboard = event;
|
|
20
|
+
if (keyboard.isComposing || event.defaultPrevented || !(keyboard.metaKey || keyboard.ctrlKey) || keyboard.key !== "f") {
|
|
21
|
+
return;
|
|
22
22
|
}
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
visible.value = !visible.value;
|
|
23
25
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
const handler = () => {
|
|
29
|
-
findInPageRef.current.stop();
|
|
30
|
-
setVisible(false);
|
|
26
|
+
const handleBeforePreparation = () => {
|
|
27
|
+
findInPage.stop();
|
|
28
|
+
visible.value = false;
|
|
31
29
|
};
|
|
32
|
-
document.addEventListener("
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
31
|
+
document.addEventListener(BEFORE_PREPARATION_EVENT, handleBeforePreparation);
|
|
32
|
+
return () => {
|
|
33
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
34
|
+
document.removeEventListener(BEFORE_PREPARATION_EVENT, handleBeforePreparation);
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
return /* @__PURE__ */ jsx(Show, { when: computed(() => isTauri.value), children: () => /* @__PURE__ */ jsx(
|
|
37
38
|
FindBar,
|
|
38
39
|
{
|
|
39
40
|
visible,
|
|
40
|
-
onClose: () =>
|
|
41
|
-
|
|
41
|
+
onClose: () => {
|
|
42
|
+
visible.value = false;
|
|
43
|
+
},
|
|
44
|
+
findInPage,
|
|
42
45
|
containerSelector: CONTENT_SELECTOR
|
|
43
46
|
}
|
|
44
|
-
);
|
|
47
|
+
) });
|
|
45
48
|
}
|
|
46
49
|
FindInPageInit.displayName = "FindInPageInit";
|
|
47
50
|
export {
|
package/dist/footer/footer.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
|
-
|
|
3
|
-
import type { VNode } from "preact";
|
|
2
|
+
import type { Child } from "@takazudo/zfb/zudo-react";
|
|
4
3
|
import type { FooterLinkColumn, FooterTagColumn } from "./types.js";
|
|
5
4
|
export interface FooterProps {
|
|
6
5
|
/**
|
|
@@ -15,7 +14,7 @@ export interface FooterProps {
|
|
|
15
14
|
*/
|
|
16
15
|
tagColumns?: FooterTagColumn[];
|
|
17
16
|
/**
|
|
18
|
-
* Copyright HTML. Rendered via `
|
|
17
|
+
* Copyright HTML. Rendered via `rawHtml` so embedded
|
|
19
18
|
* anchors work. The caller is responsible for the contents.
|
|
20
19
|
*/
|
|
21
20
|
copyright?: string;
|
|
@@ -35,4 +34,4 @@ export interface FooterProps {
|
|
|
35
34
|
* configured. The inner content (link grid, copyright) is only emitted
|
|
36
35
|
* when the respective slots carry data.
|
|
37
36
|
*/
|
|
38
|
-
export declare function Footer(props: FooterProps):
|
|
37
|
+
export declare function Footer(props: FooterProps): Child;
|
package/dist/footer/footer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
1
|
+
import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
function Footer(props) {
|
|
3
3
|
const linkColumns = props.linkColumns ?? [];
|
|
4
4
|
const tagColumns = props.tagColumns ?? [];
|
|
@@ -6,7 +6,7 @@ function Footer(props) {
|
|
|
6
6
|
const persistKey = props.persistKey;
|
|
7
7
|
const hasColumns = linkColumns.length > 0 || tagColumns.length > 0;
|
|
8
8
|
const hasCopyright = copyright.length > 0;
|
|
9
|
-
const copyrightClass = hasColumns ? "text-center text-caption text-muted
|
|
9
|
+
const copyrightClass = hasColumns ? "text-center text-caption text-muted zd-footer-copyright-links mt-vsp-lg border-t border-muted pt-vsp-md" : "text-center text-caption text-muted zd-footer-copyright-links";
|
|
10
10
|
return /* @__PURE__ */ jsx(
|
|
11
11
|
"footer",
|
|
12
12
|
{
|
|
@@ -68,7 +68,7 @@ function Footer(props) {
|
|
|
68
68
|
"div",
|
|
69
69
|
{
|
|
70
70
|
class: copyrightClass,
|
|
71
|
-
|
|
71
|
+
rawHtml: copyright
|
|
72
72
|
}
|
|
73
73
|
)
|
|
74
74
|
] })
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
|
-
|
|
3
|
-
import type { VNode } from "preact";
|
|
2
|
+
import type { Child } from "@takazudo/zfb/zudo-react";
|
|
4
3
|
import type { ChromeContext } from "../factory-context/index.js";
|
|
5
4
|
import type { Settings } from "../settings.js";
|
|
6
5
|
/** Tag info returned by the host's `collectTags` (what the factory sees). */
|
|
@@ -59,4 +58,4 @@ export interface FooterWithDefaultsSettings {
|
|
|
59
58
|
*/
|
|
60
59
|
export declare function createFooterWithDefaults<S extends Settings = Settings>(ctx: ChromeContext<S>): (props: {
|
|
61
60
|
lang?: string;
|
|
62
|
-
}) =>
|
|
61
|
+
}) => Child;
|