@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
package/dist/icons/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
2
|
-
function ChevronRight({ className }) {
|
|
1
|
+
import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
|
+
function ChevronRight({ class: className }) {
|
|
3
3
|
return /* @__PURE__ */ jsx(
|
|
4
4
|
"svg",
|
|
5
5
|
{
|
|
6
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7
6
|
class: className || void 0,
|
|
8
7
|
fill: "none",
|
|
9
8
|
viewBox: "0 0 24 24",
|
|
@@ -14,11 +13,10 @@ function ChevronRight({ className }) {
|
|
|
14
13
|
}
|
|
15
14
|
);
|
|
16
15
|
}
|
|
17
|
-
function ChevronLeft({ className }) {
|
|
16
|
+
function ChevronLeft({ class: className }) {
|
|
18
17
|
return /* @__PURE__ */ jsx(
|
|
19
18
|
"svg",
|
|
20
19
|
{
|
|
21
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
22
20
|
class: className || void 0,
|
|
23
21
|
fill: "none",
|
|
24
22
|
viewBox: "0 0 24 24",
|
|
@@ -29,11 +27,10 @@ function ChevronLeft({ className }) {
|
|
|
29
27
|
}
|
|
30
28
|
);
|
|
31
29
|
}
|
|
32
|
-
function Search({ className }) {
|
|
30
|
+
function Search({ class: className }) {
|
|
33
31
|
return /* @__PURE__ */ jsx(
|
|
34
32
|
"svg",
|
|
35
33
|
{
|
|
36
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
37
34
|
class: className || void 0,
|
|
38
35
|
fill: "none",
|
|
39
36
|
viewBox: "0 0 24 24",
|
|
@@ -44,11 +41,10 @@ function Search({ className }) {
|
|
|
44
41
|
}
|
|
45
42
|
);
|
|
46
43
|
}
|
|
47
|
-
function History({ className }) {
|
|
44
|
+
function History({ class: className }) {
|
|
48
45
|
return /* @__PURE__ */ jsxs(
|
|
49
46
|
"svg",
|
|
50
47
|
{
|
|
51
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
52
48
|
class: className || void 0,
|
|
53
49
|
viewBox: "0 0 24 24",
|
|
54
50
|
fill: "none",
|
|
@@ -64,11 +60,10 @@ function History({ className }) {
|
|
|
64
60
|
}
|
|
65
61
|
);
|
|
66
62
|
}
|
|
67
|
-
function Close({ className }) {
|
|
63
|
+
function Close({ class: className }) {
|
|
68
64
|
return /* @__PURE__ */ jsx(
|
|
69
65
|
"svg",
|
|
70
66
|
{
|
|
71
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
72
67
|
class: className || void 0,
|
|
73
68
|
viewBox: "0 0 24 24",
|
|
74
69
|
fill: "none",
|
|
@@ -81,11 +76,10 @@ function Close({ className }) {
|
|
|
81
76
|
}
|
|
82
77
|
);
|
|
83
78
|
}
|
|
84
|
-
function ArrowLeft({ className }) {
|
|
79
|
+
function ArrowLeft({ class: className }) {
|
|
85
80
|
return /* @__PURE__ */ jsx(
|
|
86
81
|
"svg",
|
|
87
82
|
{
|
|
88
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
89
83
|
class: className || void 0,
|
|
90
84
|
viewBox: "0 0 24 24",
|
|
91
85
|
fill: "none",
|
|
@@ -98,11 +92,10 @@ function ArrowLeft({ className }) {
|
|
|
98
92
|
}
|
|
99
93
|
);
|
|
100
94
|
}
|
|
101
|
-
function GitHub({ className }) {
|
|
95
|
+
function GitHub({ class: className }) {
|
|
102
96
|
return /* @__PURE__ */ jsx(
|
|
103
97
|
"svg",
|
|
104
98
|
{
|
|
105
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
106
99
|
width: "20",
|
|
107
100
|
height: "20",
|
|
108
101
|
viewBox: "0 0 24 24",
|
|
@@ -113,11 +106,10 @@ function GitHub({ className }) {
|
|
|
113
106
|
}
|
|
114
107
|
);
|
|
115
108
|
}
|
|
116
|
-
function Folder({ className }) {
|
|
109
|
+
function Folder({ class: className }) {
|
|
117
110
|
return /* @__PURE__ */ jsx(
|
|
118
111
|
"svg",
|
|
119
112
|
{
|
|
120
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
121
113
|
class: className || void 0,
|
|
122
114
|
fill: "none",
|
|
123
115
|
viewBox: "0 0 24 24",
|
|
@@ -135,11 +127,10 @@ function Folder({ className }) {
|
|
|
135
127
|
}
|
|
136
128
|
);
|
|
137
129
|
}
|
|
138
|
-
function FolderOpen({ className }) {
|
|
130
|
+
function FolderOpen({ class: className }) {
|
|
139
131
|
return /* @__PURE__ */ jsxs(
|
|
140
132
|
"svg",
|
|
141
133
|
{
|
|
142
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
143
134
|
class: className || void 0,
|
|
144
135
|
fill: "none",
|
|
145
136
|
viewBox: "0 0 24 24",
|
|
@@ -167,11 +158,10 @@ function FolderOpen({ className }) {
|
|
|
167
158
|
}
|
|
168
159
|
);
|
|
169
160
|
}
|
|
170
|
-
function FileGeneric({ className }) {
|
|
161
|
+
function FileGeneric({ class: className }) {
|
|
171
162
|
return /* @__PURE__ */ jsxs(
|
|
172
163
|
"svg",
|
|
173
164
|
{
|
|
174
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
175
165
|
class: className || void 0,
|
|
176
166
|
fill: "none",
|
|
177
167
|
viewBox: "0 0 24 24",
|
|
@@ -192,11 +182,10 @@ function FileGeneric({ className }) {
|
|
|
192
182
|
}
|
|
193
183
|
);
|
|
194
184
|
}
|
|
195
|
-
function FileCode({ className }) {
|
|
185
|
+
function FileCode({ class: className }) {
|
|
196
186
|
return /* @__PURE__ */ jsxs(
|
|
197
187
|
"svg",
|
|
198
188
|
{
|
|
199
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
200
189
|
class: className || void 0,
|
|
201
190
|
fill: "none",
|
|
202
191
|
viewBox: "0 0 24 24",
|
|
@@ -219,11 +208,10 @@ function FileCode({ className }) {
|
|
|
219
208
|
}
|
|
220
209
|
);
|
|
221
210
|
}
|
|
222
|
-
function FileText({ className }) {
|
|
211
|
+
function FileText({ class: className }) {
|
|
223
212
|
return /* @__PURE__ */ jsxs(
|
|
224
213
|
"svg",
|
|
225
214
|
{
|
|
226
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
227
215
|
class: className || void 0,
|
|
228
216
|
fill: "none",
|
|
229
217
|
viewBox: "0 0 24 24",
|
|
@@ -246,11 +234,10 @@ function FileText({ className }) {
|
|
|
246
234
|
}
|
|
247
235
|
);
|
|
248
236
|
}
|
|
249
|
-
function FileImage({ className }) {
|
|
237
|
+
function FileImage({ class: className }) {
|
|
250
238
|
return /* @__PURE__ */ jsxs(
|
|
251
239
|
"svg",
|
|
252
240
|
{
|
|
253
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
254
241
|
class: className || void 0,
|
|
255
242
|
fill: "none",
|
|
256
243
|
viewBox: "0 0 24 24",
|
|
@@ -265,11 +252,10 @@ function FileImage({ className }) {
|
|
|
265
252
|
}
|
|
266
253
|
);
|
|
267
254
|
}
|
|
268
|
-
function FileVideo({ className }) {
|
|
255
|
+
function FileVideo({ class: className }) {
|
|
269
256
|
return /* @__PURE__ */ jsxs(
|
|
270
257
|
"svg",
|
|
271
258
|
{
|
|
272
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
273
259
|
class: className || void 0,
|
|
274
260
|
fill: "none",
|
|
275
261
|
viewBox: "0 0 24 24",
|
|
@@ -283,11 +269,10 @@ function FileVideo({ className }) {
|
|
|
283
269
|
}
|
|
284
270
|
);
|
|
285
271
|
}
|
|
286
|
-
function FilePdf({ className }) {
|
|
272
|
+
function FilePdf({ class: className }) {
|
|
287
273
|
return /* @__PURE__ */ jsxs(
|
|
288
274
|
"svg",
|
|
289
275
|
{
|
|
290
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
291
276
|
class: className || void 0,
|
|
292
277
|
fill: "none",
|
|
293
278
|
viewBox: "0 0 24 24",
|
|
@@ -324,11 +309,10 @@ function FilePdf({ className }) {
|
|
|
324
309
|
}
|
|
325
310
|
);
|
|
326
311
|
}
|
|
327
|
-
function FileArchive({ className }) {
|
|
312
|
+
function FileArchive({ class: className }) {
|
|
328
313
|
return /* @__PURE__ */ jsxs(
|
|
329
314
|
"svg",
|
|
330
315
|
{
|
|
331
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
332
316
|
class: className || void 0,
|
|
333
317
|
fill: "none",
|
|
334
318
|
viewBox: "0 0 24 24",
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
export declare function ImageEnlarge(): import("
|
|
1
|
+
export declare function ImageEnlarge(): import("@takazudo/zfb").Description;
|
|
2
2
|
export declare namespace ImageEnlarge {
|
|
3
3
|
var displayName: string;
|
|
4
4
|
}
|
|
5
|
-
/**
|
|
6
|
-
* Static SSR fallback for the {@link ImageEnlarge} island.
|
|
7
|
-
*
|
|
8
|
-
* Renders an empty, closed `<dialog class="zd-enlarge-dialog ...">` so the
|
|
9
|
-
* dist HTML carries the dialog shell even before hydration. Sources its
|
|
10
|
-
* class and inline style from the shared constants in island-types so the
|
|
11
|
-
* SSR fallback cannot drift from the hydrated dialog above.
|
|
12
|
-
*/
|
|
13
|
-
export declare function ImageEnlargeSsrFallback(): import("preact").JSX.Element;
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Fragment, jsx, jsxs } from "
|
|
3
|
-
import {
|
|
2
|
+
import { Fragment, jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
3
|
+
import { computed, getScope, Show, signal } from "@takazudo/zfb/zudo-react";
|
|
4
4
|
import { AFTER_NAVIGATE_EVENT } from "../transitions/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { modalDialog } from "../use-modal-dialog/index.js";
|
|
6
6
|
import {
|
|
7
7
|
IMAGE_ENLARGE_DIALOG_CLASS,
|
|
8
8
|
ENLARGE_DIALOG_STYLE
|
|
9
9
|
} from "../island-types/index.js";
|
|
10
10
|
function ImageEnlarge() {
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const scope = getScope();
|
|
12
|
+
const imgData = signal(null);
|
|
13
|
+
const isOpen = computed(() => imgData.value !== null);
|
|
14
|
+
const imageSrc = computed(() => {
|
|
15
|
+
const current = imgData.value;
|
|
16
|
+
return current ? current.currentSrc || current.src : "";
|
|
17
|
+
});
|
|
18
|
+
const imageSrcset = computed(() => imgData.value?.srcset ?? "");
|
|
19
|
+
const imageHasSrcset = computed(() => Boolean(imgData.value?.srcset));
|
|
20
|
+
const imageAlt = computed(() => imgData.value?.alt ?? "");
|
|
21
|
+
scope.onActivate(() => {
|
|
22
|
+
let active = true;
|
|
13
23
|
const observedImages = /* @__PURE__ */ new Set();
|
|
14
24
|
const sharedResizeObserver = new ResizeObserver((entries) => {
|
|
25
|
+
if (!active) return;
|
|
15
26
|
for (const entry of entries) {
|
|
16
27
|
evaluateEligibility(entry.target);
|
|
17
28
|
}
|
|
@@ -46,35 +57,41 @@ function ImageEnlarge() {
|
|
|
46
57
|
}
|
|
47
58
|
}
|
|
48
59
|
function scanContent() {
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
51
|
-
|
|
60
|
+
const content = document.querySelector("main .zd-content");
|
|
61
|
+
if (!content) return;
|
|
62
|
+
content.querySelectorAll(".zd-enlargeable img").forEach(observeImage);
|
|
52
63
|
}
|
|
53
64
|
function startObserving() {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
65
|
+
const content = document.querySelector("main .zd-content");
|
|
66
|
+
if (content) {
|
|
56
67
|
mutationObserver = new MutationObserver((mutations) => {
|
|
68
|
+
if (!active) return;
|
|
57
69
|
for (const mutation of mutations) {
|
|
58
70
|
for (const node of mutation.addedNodes) {
|
|
59
71
|
if (!(node instanceof Element)) continue;
|
|
60
72
|
if (node.matches(".zd-enlargeable")) {
|
|
61
73
|
node.querySelectorAll("img").forEach(observeImage);
|
|
62
74
|
}
|
|
75
|
+
if (node instanceof HTMLImageElement && node.closest(".zd-enlargeable")) {
|
|
76
|
+
observeImage(node);
|
|
77
|
+
}
|
|
63
78
|
node.querySelectorAll(".zd-enlargeable img").forEach(observeImage);
|
|
64
79
|
}
|
|
65
80
|
}
|
|
66
81
|
});
|
|
67
|
-
mutationObserver.observe(
|
|
82
|
+
mutationObserver.observe(content, { childList: true, subtree: true });
|
|
68
83
|
}
|
|
69
84
|
scanContent();
|
|
70
85
|
}
|
|
71
86
|
function handleWindowResize() {
|
|
72
87
|
clearTimeout(resizeTimer);
|
|
73
88
|
resizeTimer = window.setTimeout(() => {
|
|
89
|
+
if (!active) return;
|
|
74
90
|
observedImages.forEach((img) => evaluateEligibility(img));
|
|
75
91
|
}, 150);
|
|
76
92
|
}
|
|
77
|
-
function
|
|
93
|
+
function handleAfterNavigate() {
|
|
94
|
+
if (!active) return;
|
|
78
95
|
sharedResizeObserver.disconnect();
|
|
79
96
|
observedImages.clear();
|
|
80
97
|
mutationObserver?.disconnect();
|
|
@@ -85,22 +102,25 @@ function ImageEnlarge() {
|
|
|
85
102
|
}
|
|
86
103
|
startObserving();
|
|
87
104
|
window.addEventListener("resize", handleWindowResize);
|
|
88
|
-
document.addEventListener(AFTER_NAVIGATE_EVENT,
|
|
105
|
+
document.addEventListener(AFTER_NAVIGATE_EVENT, handleAfterNavigate);
|
|
89
106
|
return () => {
|
|
107
|
+
active = false;
|
|
90
108
|
sharedResizeObserver.disconnect();
|
|
91
109
|
observedImages.clear();
|
|
92
110
|
mutationObserver?.disconnect();
|
|
93
111
|
loadAbortController.abort();
|
|
94
112
|
window.removeEventListener("resize", handleWindowResize);
|
|
95
|
-
document.removeEventListener(AFTER_NAVIGATE_EVENT,
|
|
113
|
+
document.removeEventListener(AFTER_NAVIGATE_EVENT, handleAfterNavigate);
|
|
96
114
|
clearTimeout(resizeTimer);
|
|
97
115
|
};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (
|
|
103
|
-
const target =
|
|
116
|
+
});
|
|
117
|
+
scope.onActivate(() => {
|
|
118
|
+
let active = true;
|
|
119
|
+
function handleDocumentClick(event) {
|
|
120
|
+
if (!active || !(event.target instanceof Element)) return;
|
|
121
|
+
const target = event.target;
|
|
122
|
+
const selection = window.getSelection();
|
|
123
|
+
if (selection && !selection.isCollapsed) return;
|
|
104
124
|
const container = target.closest(".zd-enlargeable");
|
|
105
125
|
if (!container) return;
|
|
106
126
|
if (!target.closest(".zd-enlarge-btn") && !target.closest("img")) return;
|
|
@@ -108,7 +128,7 @@ function ImageEnlarge() {
|
|
|
108
128
|
if (!btn || btn.hasAttribute("hidden")) return;
|
|
109
129
|
const img = container.querySelector("img");
|
|
110
130
|
if (!img) return;
|
|
111
|
-
|
|
131
|
+
imgData.value = {
|
|
112
132
|
src: img.src,
|
|
113
133
|
currentSrc: img.currentSrc,
|
|
114
134
|
srcset: img.srcset || void 0,
|
|
@@ -116,14 +136,19 @@ function ImageEnlarge() {
|
|
|
116
136
|
alt: img.alt,
|
|
117
137
|
naturalWidth: img.naturalWidth,
|
|
118
138
|
naturalHeight: img.naturalHeight
|
|
119
|
-
}
|
|
139
|
+
};
|
|
120
140
|
}
|
|
121
141
|
document.addEventListener("click", handleDocumentClick);
|
|
122
|
-
return () =>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
142
|
+
return () => {
|
|
143
|
+
active = false;
|
|
144
|
+
document.removeEventListener("click", handleDocumentClick);
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
const handleClose = () => {
|
|
148
|
+
imgData.value = null;
|
|
149
|
+
};
|
|
150
|
+
const { dialogRef, handleBackdropClick } = modalDialog(scope, {
|
|
151
|
+
isOpen,
|
|
127
152
|
onClose: handleClose,
|
|
128
153
|
navigateEvent: AFTER_NAVIGATE_EVENT,
|
|
129
154
|
backdropClickClose: true
|
|
@@ -132,45 +157,45 @@ function ImageEnlarge() {
|
|
|
132
157
|
"dialog",
|
|
133
158
|
{
|
|
134
159
|
ref: dialogRef,
|
|
135
|
-
|
|
136
|
-
|
|
160
|
+
"on:click": handleBackdropClick,
|
|
161
|
+
class: IMAGE_ENLARGE_DIALOG_CLASS,
|
|
137
162
|
style: ENLARGE_DIALOG_STYLE,
|
|
138
|
-
children:
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
163
|
+
children: /* @__PURE__ */ jsx(Show, { when: isOpen, children: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
164
|
+
/* @__PURE__ */ jsxs("div", { class: "relative", children: [
|
|
165
|
+
/* @__PURE__ */ jsx(Show, { when: imageHasSrcset, children: () => /* @__PURE__ */ jsx(
|
|
166
|
+
"img",
|
|
167
|
+
{
|
|
168
|
+
src: imageSrc,
|
|
169
|
+
srcset: imageSrcset,
|
|
170
|
+
sizes: "85vw",
|
|
171
|
+
alt: imageAlt,
|
|
172
|
+
class: "block max-h-[85vh] max-w-[85vw] object-contain"
|
|
173
|
+
}
|
|
174
|
+
) }),
|
|
175
|
+
/* @__PURE__ */ jsx(Show, { when: computed(() => !imageHasSrcset.value), children: () => /* @__PURE__ */ jsx(
|
|
176
|
+
"img",
|
|
177
|
+
{
|
|
178
|
+
src: imageSrc,
|
|
179
|
+
alt: imageAlt,
|
|
180
|
+
class: "block max-h-[85vh] max-w-[85vw] object-contain"
|
|
181
|
+
}
|
|
182
|
+
) })
|
|
183
|
+
] }),
|
|
149
184
|
/* @__PURE__ */ jsx(
|
|
150
185
|
"button",
|
|
151
186
|
{
|
|
152
187
|
type: "button",
|
|
153
|
-
|
|
154
|
-
|
|
188
|
+
"on:click": () => dialogRef.current?.close(),
|
|
189
|
+
class: "zd-enlarge-dialog-close",
|
|
155
190
|
"aria-label": "Close enlarged image",
|
|
156
|
-
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 161.03 161.03", fill: "currentColor", "aria-hidden": "true",
|
|
191
|
+
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 161.03 161.03", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("polygon", { points: "161.03 10.27 150.76 0 80.51 70.24 10.27 0 0 10.27 70.24 80.51 0 150.76 10.27 161.03 80.51 90.78 150.76 161.03 161.03 150.76 90.78 80.51 161.03 10.27" }) })
|
|
157
192
|
}
|
|
158
193
|
)
|
|
159
|
-
] })
|
|
194
|
+
] }) })
|
|
160
195
|
}
|
|
161
196
|
);
|
|
162
197
|
}
|
|
163
198
|
ImageEnlarge.displayName = "ImageEnlarge";
|
|
164
|
-
function ImageEnlargeSsrFallback() {
|
|
165
|
-
return /* @__PURE__ */ jsx(
|
|
166
|
-
"dialog",
|
|
167
|
-
{
|
|
168
|
-
className: IMAGE_ENLARGE_DIALOG_CLASS,
|
|
169
|
-
style: ENLARGE_DIALOG_STYLE
|
|
170
|
-
}
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
199
|
export {
|
|
174
|
-
ImageEnlarge
|
|
175
|
-
ImageEnlargeSsrFallback
|
|
200
|
+
ImageEnlarge
|
|
176
201
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
|
+
import { IMAGE_ENLARGE_DIALOG_CLASS, ENLARGE_DIALOG_STYLE } from "../island-types/index.js";
|
|
3
|
+
function ImageEnlargeSsrFallback() {
|
|
4
|
+
return /* @__PURE__ */ jsx("dialog", { class: IMAGE_ENLARGE_DIALOG_CLASS, style: ENLARGE_DIALOG_STYLE });
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
ImageEnlargeSsrFallback
|
|
8
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @takazudo/zudo-doc — framework primitives that sit on top of zfb's engine.
|
|
3
3
|
*
|
|
4
|
-
* **Use the subpath exports for
|
|
5
|
-
*
|
|
6
|
-
* need
|
|
4
|
+
* **Use the subpath exports for runtime imports.** This root barrel exposes
|
|
5
|
+
* shared public types only, so consumers do not drag in runtime code when they
|
|
6
|
+
* need type contracts. Each topic area publishes its own subpath (declared in
|
|
7
7
|
* `package.json#exports`):
|
|
8
8
|
*
|
|
9
9
|
* import { buildSidebarTree, type SidebarNode } from "@takazudo/zudo-doc/sidebar-tree";
|
|
@@ -23,4 +23,11 @@
|
|
|
23
23
|
*
|
|
24
24
|
* See packages/zudo-doc/README.md for the topic map.
|
|
25
25
|
*/
|
|
26
|
-
export {};
|
|
26
|
+
export type { ChromeContext, ChromeHostBindings, FactoryComponent, FactoryComponents, FactoryContext, FactoryI18n, NavSource, RouteContext, RouteContextPayload, RouteHrefBuilder, TagInfo, } from "./factory-context/index.js";
|
|
27
|
+
export type { BodyEndIslandsSlotProps, BreadcrumbSlotProps, ChromeBindingsInput, DesignTokenPanelBootstrapSlotProps, DocHistorySlotProps, DocPagerSlotProps, FooterSlotProps, FooterTagEntry, FrontmatterRendererSlotProps, HeaderSlotProps, SearchWidgetSlotProps, SidebarSlotProps, TocSlotProps, } from "./chrome-bindings.js";
|
|
28
|
+
export type { HeaderNavChildItem, HeaderNavItem, HeaderRightBuiltinComponentName, HeaderRightComponentItem, HeaderRightComponentName, HeaderRightComponentProps, HeaderRightComponentRegistry, HeaderRightHtmlItem, HeaderRightItem, HeaderRightLinkItem, HeaderRightTriggerItem, HeaderRightTriggerName, Locale, } from "./header/types.js";
|
|
29
|
+
export type { HeaderRightItemFlags } from "./header/right-items.js";
|
|
30
|
+
export type { FrontmatterCellRenderer, FrontmatterCellRendererProps, } from "./metainfo/frontmatter-preview.js";
|
|
31
|
+
export type { ThemePackDialogComponent, ThemePackDialogProps, } from "./theme-pack-switcher/index.js";
|
|
32
|
+
export type { ModalDialogOptions, ModalDialogResult } from "./use-modal-dialog/index.js";
|
|
33
|
+
export type { ChatMessage, DocHistoryData, DocHistoryEntry, EnlargeDialogProps, } from "./island-types/index.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
|
-
|
|
3
|
-
import type { JSX } from "preact";
|
|
2
|
+
import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
4
3
|
/** Minimal version config entry needed by the inline version switcher. */
|
|
5
4
|
export interface InlineVersionSwitcherVersionEntry {
|
|
6
5
|
slug: string;
|
|
@@ -28,7 +28,7 @@ export interface DocHistoryData {
|
|
|
28
28
|
/** Shared inline style centering an enlarge `<dialog>` transform-free. */
|
|
29
29
|
export declare const ENLARGE_DIALOG_STYLE: {
|
|
30
30
|
readonly position: "fixed";
|
|
31
|
-
readonly inset:
|
|
31
|
+
readonly inset: 0;
|
|
32
32
|
readonly margin: "auto";
|
|
33
33
|
};
|
|
34
34
|
/** Class string for the image-enlarge `<dialog>` (hydrated + SSR fallback). */
|
|
@@ -38,7 +38,7 @@ export declare const MERMAID_ENLARGE_DIALOG_CLASS = "zd-mermaid-dialog z-modal m
|
|
|
38
38
|
/** Shared shape an enlarge `<dialog>` is rendered with. */
|
|
39
39
|
export interface EnlargeDialogProps {
|
|
40
40
|
/** Tailwind class string for the `<dialog>`. */
|
|
41
|
-
|
|
41
|
+
class: string;
|
|
42
42
|
/** Inline style centering the dialog transform-free. */
|
|
43
43
|
style: typeof ENLARGE_DIALOG_STYLE;
|
|
44
44
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
const ENLARGE_DIALOG_STYLE = {
|
|
2
|
-
position: "fixed",
|
|
3
|
-
inset: "0",
|
|
4
|
-
margin: "auto"
|
|
5
|
-
};
|
|
1
|
+
const ENLARGE_DIALOG_STYLE = { position: "fixed", inset: 0, margin: "auto" };
|
|
6
2
|
const IMAGE_ENLARGE_DIALOG_CLASS = "zd-enlarge-dialog z-modal mx-auto max-h-[90vh] max-w-[90vw] overflow-hidden border border-muted bg-surface p-0 backdrop:z-modal-backdrop";
|
|
7
3
|
const MERMAID_ENLARGE_DIALOG_CLASS = "zd-mermaid-dialog z-modal mx-auto h-[90vh] max-h-[90vh] w-[90vw] max-w-[90vw] overflow-hidden border border-muted bg-surface p-0 backdrop:z-modal-backdrop";
|
|
8
4
|
export {
|
|
@@ -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
|
export interface MathBlockProps {
|
|
5
4
|
/** Raw LaTeX source string. */
|
|
6
5
|
latex: string;
|
|
@@ -10,9 +9,7 @@ export interface MathBlockProps {
|
|
|
10
9
|
/**
|
|
11
10
|
* Server-rendered KaTeX math component.
|
|
12
11
|
*
|
|
13
|
-
* Block mode wraps the output in `<div
|
|
14
|
-
*
|
|
15
|
-
* match the standard rehype-katex output so existing CSS (e.g. the
|
|
16
|
-
* KaTeX stylesheet) still applies.
|
|
12
|
+
* Block mode wraps the output in `<div data-math="display">`; inline mode
|
|
13
|
+
* uses `<span data-math="inline">`. KaTeX owns the styled inner classes.
|
|
17
14
|
*/
|
|
18
|
-
export declare function MathBlock({ latex, block }: MathBlockProps):
|
|
15
|
+
export declare function MathBlock({ latex, block }: MathBlockProps): Child;
|
package/dist/math-block/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
function pickKatex(m) {
|
|
3
3
|
let cur = m;
|
|
4
4
|
for (let i = 0; i < 3 && cur && typeof cur === "object"; i++) {
|
|
@@ -21,16 +21,16 @@ function MathBlock({ latex, block = false }) {
|
|
|
21
21
|
return /* @__PURE__ */ jsx(
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
"data-math": "display",
|
|
25
|
+
rawHtml: html
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
return /* @__PURE__ */ jsx(
|
|
30
30
|
"span",
|
|
31
31
|
{
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
"data-math": "inline",
|
|
33
|
+
rawHtml: html
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReadAsset } from "./loader.js";
|
|
2
|
+
export interface McpHandlerOptions {
|
|
3
|
+
read: ReadAsset;
|
|
4
|
+
base: string;
|
|
5
|
+
siteUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
/** A deployment-scoped loader is safe to reuse; every operation re-reads the current manifest. */
|
|
8
|
+
export declare function createMcpHandler(options: McpHandlerOptions): (request: Request) => Promise<Response>;
|