@takazudo/zudo-doc 5.28.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -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/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 +28 -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 +2933 -2943
- 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 +70 -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 +1 -2
- package/dist/header-with-defaults/index.js +18 -8
- 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/index.d.ts +1 -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-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/index.ts +1 -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,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
|
/** A single resolved doc card item. */
|
|
5
4
|
export interface DocCardItem {
|
|
6
5
|
/** Pre-resolved href (base-prefixed, locale-aware). */
|
|
@@ -19,7 +18,7 @@ export interface DocCardGridProps {
|
|
|
19
18
|
class?: string;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
|
-
* DocCardGrid —
|
|
21
|
+
* DocCardGrid — server renderer for a flat list of documentation cards.
|
|
23
22
|
*
|
|
24
23
|
* Renders a flat list of `{ href, title, description? }` items as a two-column
|
|
25
24
|
* card grid. Each card shows an arrow icon, the doc title, and an optional
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
1
|
+
import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
function ArrowIcon() {
|
|
3
3
|
return /* @__PURE__ */ jsx(
|
|
4
4
|
"svg",
|
|
5
5
|
{
|
|
6
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7
6
|
fill: "currentColor",
|
|
8
7
|
viewBox: "0 0 103.395 107.049",
|
|
9
8
|
"aria-hidden": "true",
|
|
@@ -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
|
import type { NavNode } from "./types.js";
|
|
5
4
|
export interface DocsSitemapProps {
|
|
6
5
|
/**
|
|
@@ -10,7 +9,7 @@ export interface DocsSitemapProps {
|
|
|
10
9
|
tree: NavNode[];
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
|
-
* DocsSitemap —
|
|
12
|
+
* DocsSitemap — server renderer for collapsible documentation sections.
|
|
14
13
|
*
|
|
15
14
|
* Renders the full documentation tree as a series of collapsible
|
|
16
15
|
* `<details>` sections. Each top-level node becomes one section; its
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
1
|
+
import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
function flattenTree(nodes) {
|
|
3
3
|
const result = [];
|
|
4
4
|
function collect(n) {
|
|
@@ -13,7 +13,7 @@ function flattenTree(nodes) {
|
|
|
13
13
|
function SitemapSection({ node, index }) {
|
|
14
14
|
const leaves = flattenTree(node.children);
|
|
15
15
|
return /* @__PURE__ */ jsxs("details", { class: "group border border-muted overflow-hidden", open: true, children: [
|
|
16
|
-
/* @__PURE__ */ jsxs("summary", { class: "flex items-center gap-x-hsp-md px-hsp-xl py-vsp-md text-title font-bold cursor-pointer select-none bg-surface list-none
|
|
16
|
+
/* @__PURE__ */ jsxs("summary", { class: "flex items-center gap-x-hsp-md px-hsp-xl py-vsp-md text-title font-bold cursor-pointer select-none bg-surface list-none zd-hide-details-marker", children: [
|
|
17
17
|
/* @__PURE__ */ jsx("span", { class: "inline-block text-caption text-muted transition-transform duration-200 group-open:rotate-90", children: "\u25B6" }),
|
|
18
18
|
node.href ? /* @__PURE__ */ jsx("a", { href: node.href, class: "hover:text-accent hover:underline focus:underline focus-visible:text-accent", children: node.label }) : /* @__PURE__ */ jsx("span", { children: node.label })
|
|
19
19
|
] }),
|
|
@@ -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
|
import type { NavNode } from "./types.js";
|
|
5
4
|
export interface NavCardGridProps {
|
|
6
5
|
/**
|
|
@@ -13,7 +12,7 @@ export interface NavCardGridProps {
|
|
|
13
12
|
class?: string;
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
|
-
* NavCardGrid —
|
|
15
|
+
* NavCardGrid — server renderer for category card links.
|
|
17
16
|
*
|
|
18
17
|
* Renders direct children of a category as a two-column grid of card links.
|
|
19
18
|
* Unlike `CategoryNav`, the arrow icon uses `text-muted` (accent on
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
1
|
+
import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
function ArrowIcon() {
|
|
3
3
|
return /* @__PURE__ */ jsx(
|
|
4
4
|
"svg",
|
|
5
5
|
{
|
|
6
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
7
6
|
fill: "currentColor",
|
|
8
7
|
viewBox: "0 0 103.395 107.049",
|
|
9
8
|
"aria-hidden": "true",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
|
-
|
|
3
|
-
import type { JSX } from "preact";
|
|
2
|
+
import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
4
3
|
import type { NoteTrayIndexProps } from "../note-tray-index.js";
|
|
5
4
|
export declare function CardList(props: NoteTrayIndexProps): JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "
|
|
1
|
+
import { Fragment, jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
import { formatMonthDayLabel, formatYear } from "../../format-date/index.js";
|
|
3
3
|
import { CategoryLinkIcon } from "../../tree-nav-shared/index.js";
|
|
4
4
|
import { TagNav } from "../tag-nav.js";
|
|
@@ -14,10 +14,10 @@ function CardBody({
|
|
|
14
14
|
return /* @__PURE__ */ jsxs("div", { class: "min-w-0", children: [
|
|
15
15
|
/* @__PURE__ */ jsxs("div", { class: "flex flex-wrap items-baseline gap-x-hsp-md gap-y-vsp-3xs", children: [
|
|
16
16
|
/* @__PURE__ */ jsx("h2", { class: "text-title font-medium leading-tight", children: /* @__PURE__ */ jsxs("span", { class: titleClass, children: [
|
|
17
|
-
/* @__PURE__ */ jsx("span", { class: "flex h-[1lh] items-center", children: /* @__PURE__ */ jsx(CategoryLinkIcon, {
|
|
17
|
+
/* @__PURE__ */ jsx("span", { class: "flex h-[1lh] items-center", children: /* @__PURE__ */ jsx(CategoryLinkIcon, { class: "w-icon-sm" }) }),
|
|
18
18
|
item.label
|
|
19
19
|
] }) }),
|
|
20
|
-
props.showDate && /* @__PURE__ */ jsx("span", {
|
|
20
|
+
props.showDate && /* @__PURE__ */ jsx("span", { ...hasStamp ? { class: "sm:hidden" } : {}, children: /* @__PURE__ */ jsx(
|
|
21
21
|
DateLine,
|
|
22
22
|
{
|
|
23
23
|
item,
|
|
@@ -111,7 +111,7 @@ function CardList(props) {
|
|
|
111
111
|
}
|
|
112
112
|
)
|
|
113
113
|
] }),
|
|
114
|
-
/* @__PURE__ */ jsx("div", { class: "col-start-1 row-start-2 relative pointer-events-none
|
|
114
|
+
/* @__PURE__ */ jsx("div", { class: "col-start-1 row-start-2 relative pointer-events-none zd-card-links-interactive ml-[calc(var(--spacing-hsp-xl)_+_1px)] mr-[calc(var(--spacing-hsp-xl)_+_1px)] sm:mr-0 mb-vsp-lg", children: /* @__PURE__ */ jsx(TagNav, { variant: "page", tagLinks: item.tagLinks, labels: props.tagLabels }) })
|
|
115
115
|
] }) : item.href ? /* @__PURE__ */ jsxs(
|
|
116
116
|
"a",
|
|
117
117
|
{
|
|
@@ -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
|
import type { ResolvedDateFormats } from "../../settings.js";
|
|
5
4
|
import type { NoteTrayIndexItem } from "../note-tray-index.js";
|
|
6
5
|
import type { TagNavLabels } from "../types.js";
|
|
@@ -13,4 +12,4 @@ export declare function DateLine({ item, locale, updatedLabel, dateFormats, }: {
|
|
|
13
12
|
export declare function ItemTags({ item, labels }: {
|
|
14
13
|
item: NoteTrayIndexItem;
|
|
15
14
|
labels?: TagNavLabels;
|
|
16
|
-
}):
|
|
15
|
+
}): import("@takazudo/zfb").Description | null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
|
-
|
|
3
|
-
import type { JSX } from "preact";
|
|
2
|
+
import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
4
3
|
import type { NoteTrayIndexProps } from "../note-tray-index.js";
|
|
5
4
|
export declare function IndexList(props: NoteTrayIndexProps): JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "
|
|
1
|
+
import { Fragment, jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
import { rankWidth } from "../../note-tray-model/index.js";
|
|
3
3
|
import { DateLine } from "./date-line.js";
|
|
4
4
|
function IndexList(props) {
|
|
5
5
|
const width = rankWidth(props.items);
|
|
6
|
-
return /* @__PURE__ */ jsx("ol", { class: "
|
|
6
|
+
return /* @__PURE__ */ jsx("ol", { class: "zd-list-items-no-margin", children: props.items.map((item) => {
|
|
7
7
|
const rowClass = item.href ? "relative -mt-px first:mt-0 border-y border-muted hover:z-local-1 hover:border-accent focus-within:z-local-1 focus-within:border-accent" : "relative -mt-px first:mt-0 border-y border-muted";
|
|
8
8
|
const rankClass = item.href ? "tabular-nums text-heading leading-none text-muted group-hover:text-fg group-focus-visible:text-fg" : "tabular-nums text-heading leading-none text-muted";
|
|
9
9
|
const labelClass = item.href ? "font-medium text-fg group-hover:text-accent group-hover:underline group-focus-visible:text-accent group-focus-visible:underline" : "font-medium text-fg";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
|
-
|
|
3
|
-
import type { JSX } from "preact";
|
|
2
|
+
import type { JSX } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
4
3
|
import type { NoteTrayIndexProps } from "../note-tray-index.js";
|
|
5
4
|
export declare function Timeline(props: NoteTrayIndexProps): JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
1
|
+
import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
import {
|
|
3
3
|
formatDate,
|
|
4
4
|
formatYearMonthLabel,
|
|
@@ -10,7 +10,7 @@ function Timeline(props) {
|
|
|
10
10
|
const groups = groupItems(props.items, "month", props.order ?? "asc");
|
|
11
11
|
return /* @__PURE__ */ jsx("div", { class: "space-y-vsp-lg", children: groups.map((group) => /* @__PURE__ */ jsxs("section", { children: [
|
|
12
12
|
/* @__PURE__ */ jsx("h2", { class: "mb-vsp-sm text-small font-medium text-fg", children: formatYearMonthLabel(group.key, props.locale, props.dateFormats?.yearMonth) }),
|
|
13
|
-
/* @__PURE__ */ jsx("ol", { class: "ml-hsp-md border-l border-muted
|
|
13
|
+
/* @__PURE__ */ jsx("ol", { class: "ml-hsp-md border-l border-muted zd-list-items-no-margin", children: group.items.map((item) => /* @__PURE__ */ jsxs("li", { class: "relative grid gap-vsp-2xs pl-hsp-xl pb-vsp-lg last:pb-0", children: [
|
|
14
14
|
item.href ? /* @__PURE__ */ jsx(
|
|
15
15
|
"a",
|
|
16
16
|
{
|
|
@@ -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
|
import type { TagLink, TagNavLabels } from "./types.js";
|
|
5
4
|
import type { NoteTrayOrder } from "../note-tray-model/index.js";
|
|
6
5
|
import type { ResolvedDateFormats } from "../settings.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
import { CardList } from "./note-tray-index-parts/card-list.js";
|
|
3
3
|
import { IndexList } from "./note-tray-index-parts/index-list.js";
|
|
4
4
|
import { Timeline } from "./note-tray-index-parts/timeline.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
|
import type { NavNode } from "./types.js";
|
|
5
4
|
export interface SiteTreeNavDemoProps {
|
|
6
5
|
/**
|
|
@@ -21,7 +20,7 @@ export interface SiteTreeNavDemoProps {
|
|
|
21
20
|
ariaLabel?: string;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
|
-
* SiteTreeNavDemo —
|
|
23
|
+
* SiteTreeNavDemo — static server renderer for the site navigation tree.
|
|
25
24
|
*
|
|
26
25
|
* Renders the full site tree as a static collapsible section-by-section view.
|
|
27
26
|
* Each top-level category becomes a `<details>` block; leaves within each
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
1
|
+
import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
function flattenTree(nodes) {
|
|
3
3
|
const result = [];
|
|
4
4
|
function collect(n) {
|
|
@@ -27,7 +27,7 @@ function reorder(nodes, order) {
|
|
|
27
27
|
function Section({ node }) {
|
|
28
28
|
const leaves = flattenTree(node.children);
|
|
29
29
|
return /* @__PURE__ */ jsxs("details", { class: "group border border-muted overflow-hidden", open: true, children: [
|
|
30
|
-
/* @__PURE__ */ jsxs("summary", { class: "flex items-center gap-x-hsp-md px-hsp-xl py-vsp-md text-title font-bold cursor-pointer select-none bg-surface list-none
|
|
30
|
+
/* @__PURE__ */ jsxs("summary", { class: "flex items-center gap-x-hsp-md px-hsp-xl py-vsp-md text-title font-bold cursor-pointer select-none bg-surface list-none zd-hide-details-marker", children: [
|
|
31
31
|
/* @__PURE__ */ jsx("span", { class: "inline-block text-caption text-muted transition-transform duration-200 group-open:rotate-90", children: "\u25B6" }),
|
|
32
32
|
node.href ? /* @__PURE__ */ jsx("a", { href: node.href, class: "hover:text-accent hover:underline focus:underline focus-visible:text-accent", children: node.label }) : /* @__PURE__ */ jsx("span", { children: node.label })
|
|
33
33
|
] }),
|
|
@@ -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
|
import type { TagItem, TagLink, TagNavLabels } from "./types.js";
|
|
5
4
|
export interface TagNavAllProps {
|
|
6
5
|
variant: "all";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared types for the
|
|
2
|
+
* Shared data types for the package-owned navigation components.
|
|
3
3
|
*
|
|
4
4
|
* All types are presentational: every value the components need to render
|
|
5
5
|
* arrives via props. No host-project imports, no Astro collection queries.
|
|
@@ -39,7 +39,7 @@ export interface TagLink {
|
|
|
39
39
|
href: string;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* i18n label bag for `TagNav`. Keeps
|
|
42
|
+
* i18n label bag for `TagNav`. Keeps the package decoupled from the host's `t()`
|
|
43
43
|
* function — the consumer resolves strings for the active locale and passes
|
|
44
44
|
* them in.
|
|
45
45
|
*/
|
|
@@ -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
|
import type { VersionPageEntry, VersionsPageLabels } from "./types.js";
|
|
5
4
|
export interface VersionsPageContentProps {
|
|
6
5
|
/** Pre-resolved href to the latest version's default docs page. */
|
|
@@ -11,7 +10,7 @@ export interface VersionsPageContentProps {
|
|
|
11
10
|
labels: VersionsPageLabels;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
* VersionsPageContent —
|
|
13
|
+
* VersionsPageContent — server renderer for the documentation versions page.
|
|
15
14
|
*
|
|
16
15
|
* Renders the full documentation versions page:
|
|
17
16
|
* - An `<h1>` heading (from `labels.pageTitle`).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "
|
|
1
|
+
import { Fragment, jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
import { ChevronRight } from "../icons/index.js";
|
|
3
3
|
function VersionsPageContent(props) {
|
|
4
4
|
const { latestHref, versions, labels } = props;
|
|
@@ -14,7 +14,7 @@ function VersionsPageContent(props) {
|
|
|
14
14
|
class: "inline-flex items-center gap-hsp-xs text-small text-fg hover:text-accent hover:underline focus-visible:text-accent focus-visible:underline",
|
|
15
15
|
children: [
|
|
16
16
|
labels.latestLink,
|
|
17
|
-
/* @__PURE__ */ jsx(ChevronRight, {
|
|
17
|
+
/* @__PURE__ */ jsx(ChevronRight, { class: "h-[0.875rem] w-[0.875rem]" })
|
|
18
18
|
]
|
|
19
19
|
}
|
|
20
20
|
)
|
|
@@ -24,21 +24,21 @@ function VersionsPageContent(props) {
|
|
|
24
24
|
/* @__PURE__ */ jsx("p", { class: "text-small text-muted mb-vsp-md", children: labels.pastDescription }),
|
|
25
25
|
/* @__PURE__ */ jsx("div", { class: "border border-muted rounded overflow-hidden", children: /* @__PURE__ */ jsxs("table", { class: "w-full text-small", children: [
|
|
26
26
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { class: "border-b border-muted bg-surface", children: [
|
|
27
|
-
/* @__PURE__ */ jsx("th", { class: "px-hsp-
|
|
28
|
-
/* @__PURE__ */ jsx("th", { class: "px-hsp-
|
|
29
|
-
/* @__PURE__ */ jsx("th", { class: "px-hsp-
|
|
27
|
+
/* @__PURE__ */ jsx("th", { class: "px-hsp-md py-vsp-xs text-left font-semibold text-muted", children: labels.versionCol }),
|
|
28
|
+
/* @__PURE__ */ jsx("th", { class: "px-hsp-md py-vsp-xs text-left font-semibold text-muted", children: labels.statusCol }),
|
|
29
|
+
/* @__PURE__ */ jsx("th", { class: "px-hsp-md py-vsp-xs text-left font-semibold text-muted", children: labels.docsCol })
|
|
30
30
|
] }) }),
|
|
31
31
|
/* @__PURE__ */ jsx("tbody", { children: versions.map((v) => /* @__PURE__ */ jsxs(
|
|
32
32
|
"tr",
|
|
33
33
|
{
|
|
34
34
|
class: "border-b border-muted last:border-b-0",
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */ jsx("td", { class: "px-hsp-
|
|
37
|
-
/* @__PURE__ */ jsxs("td", { class: "px-hsp-
|
|
36
|
+
/* @__PURE__ */ jsx("td", { class: "px-hsp-md py-vsp-xs font-medium text-fg", children: v.label }),
|
|
37
|
+
/* @__PURE__ */ jsxs("td", { class: "px-hsp-md py-vsp-xs", children: [
|
|
38
38
|
v.banner === "unmaintained" && /* @__PURE__ */ jsx("span", { class: "inline-block rounded px-hsp-xs py-vsp-3xs text-caption bg-warning/10 text-warning", children: labels.unmaintained }),
|
|
39
39
|
v.banner === "unreleased" && /* @__PURE__ */ jsx("span", { class: "inline-block rounded px-hsp-xs py-vsp-3xs text-caption bg-info/10 text-info", children: labels.unreleased })
|
|
40
40
|
] }),
|
|
41
|
-
/* @__PURE__ */ jsx("td", { class: "px-hsp-
|
|
41
|
+
/* @__PURE__ */ jsx("td", { class: "px-hsp-md py-vsp-xs", children: /* @__PURE__ */ jsx(
|
|
42
42
|
"a",
|
|
43
43
|
{
|
|
44
44
|
href: v.docsHref,
|
|
@@ -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
|
import { type NoteTrayIndexItem, type NoteTrayIndexStyle } from "../nav-indexing/index.js";
|
|
5
4
|
import type { DateFormatSetting } from "../settings.js";
|
|
6
5
|
export interface NoteTrayIndexNode extends NoteTrayIndexItem {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
|
-
/** @jsxImportSource preact */
|
|
3
2
|
/** Default `id` for the overlay element. Stable so test rigs can target it. */
|
|
4
3
|
export declare const PAGE_LOADING_OVERLAY_ID = "page-loading-overlay";
|
|
5
4
|
export interface PageLoadingOverlayProps {
|
|
@@ -28,4 +27,4 @@ export declare function buildPageLoadingOverlayBootstrap(overlayId: string): str
|
|
|
28
27
|
* element-permitted-content and fails html-validate (same fix applied to the
|
|
29
28
|
* version-switcher in zudolab/zudo-doc#1505; regression caught in W2A #1543).
|
|
30
29
|
*/
|
|
31
|
-
export default function PageLoadingOverlay({ id, }?: PageLoadingOverlayProps): import("
|
|
30
|
+
export default function PageLoadingOverlay({ id, }?: PageLoadingOverlayProps): import("@takazudo/zfb").Description;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "
|
|
1
|
+
import { Fragment, jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
import {
|
|
3
3
|
AFTER_NAVIGATE_EVENT,
|
|
4
4
|
BEFORE_NAVIGATE_EVENT
|
|
5
5
|
} from "../transitions/page-events.js";
|
|
6
6
|
const PAGE_LOADING_OVERLAY_ID = "page-loading-overlay";
|
|
7
7
|
function buildPageLoadingOverlayBootstrap(overlayId) {
|
|
8
|
-
const id = JSON.stringify(overlayId);
|
|
8
|
+
const id = JSON.stringify(overlayId).replaceAll("<", "\\u003c");
|
|
9
9
|
const before = JSON.stringify(BEFORE_NAVIGATE_EVENT);
|
|
10
10
|
const after = JSON.stringify(AFTER_NAVIGATE_EVENT);
|
|
11
11
|
return `(function(){
|
|
@@ -36,9 +36,7 @@ function PageLoadingOverlay({
|
|
|
36
36
|
/* @__PURE__ */ jsx(
|
|
37
37
|
"script",
|
|
38
38
|
{
|
|
39
|
-
|
|
40
|
-
__html: buildPageLoadingOverlayBootstrap(id)
|
|
41
|
-
}
|
|
39
|
+
rawHtml: buildPageLoadingOverlayBootstrap(id)
|
|
42
40
|
}
|
|
43
41
|
)
|
|
44
42
|
] });
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { emitAgentCorpus, projectAgentCorpus } from "./internal/agent-export/index.js";
|
|
2
|
+
import { getBasePrefix } from "./plugin-utils.js";
|
|
3
|
+
const plugin = {
|
|
4
|
+
name: "agent-export",
|
|
5
|
+
async postBuild(ctx) {
|
|
6
|
+
emitAgentCorpus({ ...ctx.options, outDir: ctx.outDir, copyPublicWithBase: ctx.config.copyPublicWithBase });
|
|
7
|
+
},
|
|
8
|
+
devMiddleware(ctx) {
|
|
9
|
+
const options = ctx.options;
|
|
10
|
+
const route = `${getBasePrefix(options.base)}/agent/v1/`;
|
|
11
|
+
const handler = async (req) => {
|
|
12
|
+
if (!req.url.split("?")[0]?.startsWith(route)) return void 0;
|
|
13
|
+
if (req.method !== "GET" && req.method !== "HEAD") return { status: 405, headers: { allow: "GET, HEAD" }, body: "Method Not Allowed" };
|
|
14
|
+
const path = req.url.split("?")[0].slice(route.length);
|
|
15
|
+
const corpus = projectAgentCorpus(options);
|
|
16
|
+
let body;
|
|
17
|
+
let type = "application/json; charset=utf-8";
|
|
18
|
+
if (path === "manifest.json") body = JSON.stringify(corpus.manifest);
|
|
19
|
+
else if (path === "search-index.json") body = JSON.stringify(corpus.index);
|
|
20
|
+
else if (/^items\/p-[a-f0-9]{16}-[0-9]{6}\.json$/.test(path)) body = corpus.items.get(path.slice(6, -5));
|
|
21
|
+
else if (/^pages\/p-[a-f0-9]{16}\.md$/.test(path)) {
|
|
22
|
+
body = corpus.pages.get(path.slice(6, -3));
|
|
23
|
+
type = "text/markdown; charset=utf-8";
|
|
24
|
+
}
|
|
25
|
+
if (body === void 0) return { status: 404, headers: { "content-type": "text/plain" }, body: "Not Found" };
|
|
26
|
+
return { status: 200, headers: { "content-type": type }, body: req.method === "HEAD" ? "" : body };
|
|
27
|
+
};
|
|
28
|
+
ctx.register(route.slice(0, -1), handler);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var agent_export_default = plugin;
|
|
32
|
+
export {
|
|
33
|
+
agent_export_default as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentItem } from "../../../agent-docs/types.js";
|
|
2
|
+
type AgentChunkMetadata = Pick<AgentItem["metadata"], "locale" | "pageId"> & Partial<Pick<AgentItem["metadata"], "description" | "section" | "unsupportedDynamicContent">>;
|
|
3
|
+
/** Exact, ordered slices. Boundaries prefer headings and paragraphs, then Unicode-safe cuts. */
|
|
4
|
+
export declare function chunkAgentText(text: string, title: string, url: string, metadata?: AgentChunkMetadata): string[];
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { AGENT_MAX_ITEM_TEXT_UNITS, AGENT_MAX_TOOL_RESPONSE_BYTES } from "../../../agent-docs/limits.js";
|
|
2
|
+
const RESPONSE_FRAMING_RESERVE_BYTES = 4096;
|
|
3
|
+
function isHighSurrogate(value) {
|
|
4
|
+
return value >= 55296 && value <= 56319;
|
|
5
|
+
}
|
|
6
|
+
function isLowSurrogate(value) {
|
|
7
|
+
return value >= 56320 && value <= 57343;
|
|
8
|
+
}
|
|
9
|
+
function firstCodePointUnits(text, start) {
|
|
10
|
+
return isHighSurrogate(text.charCodeAt(start)) && isLowSurrogate(text.charCodeAt(start + 1)) ? 2 : 1;
|
|
11
|
+
}
|
|
12
|
+
function safeCut(text, start, limit) {
|
|
13
|
+
let end = Math.min(start + limit, text.length);
|
|
14
|
+
if (end < text.length && end > start && isHighSurrogate(text.charCodeAt(end - 1)) && isLowSurrogate(text.charCodeAt(end))) {
|
|
15
|
+
end--;
|
|
16
|
+
}
|
|
17
|
+
return end;
|
|
18
|
+
}
|
|
19
|
+
function fitsResponseBudget(text, title, url, metadata) {
|
|
20
|
+
const item = {
|
|
21
|
+
// The real page IDs are 25 UTF-16 units at most; keep a larger fixed ID
|
|
22
|
+
// and the maximum part numbers while sizing before chunkCount is known.
|
|
23
|
+
id: "x".repeat(32),
|
|
24
|
+
title,
|
|
25
|
+
text,
|
|
26
|
+
url,
|
|
27
|
+
metadata: {
|
|
28
|
+
...metadata,
|
|
29
|
+
fingerprint: "f".repeat(64),
|
|
30
|
+
part: 999999,
|
|
31
|
+
partCount: 999999
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const serialized = JSON.stringify({
|
|
35
|
+
structuredContent: item,
|
|
36
|
+
content: [{ type: "text", text: JSON.stringify(item) }]
|
|
37
|
+
});
|
|
38
|
+
return Buffer.byteLength(serialized) <= AGENT_MAX_TOOL_RESPONSE_BYTES - RESPONSE_FRAMING_RESERVE_BYTES;
|
|
39
|
+
}
|
|
40
|
+
function failItemBudget() {
|
|
41
|
+
throw new Error(
|
|
42
|
+
"Agent item cannot fit within the MCP tool response byte limit, even with one Unicode code point."
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
function chunkAgentText(text, title, url, metadata = { locale: "x", pageId: "x".repeat(32) }) {
|
|
46
|
+
if (!text) {
|
|
47
|
+
if (!fitsResponseBudget("", title, url, metadata)) failItemBudget();
|
|
48
|
+
return [""];
|
|
49
|
+
}
|
|
50
|
+
const result = [];
|
|
51
|
+
let offset = 0;
|
|
52
|
+
while (offset < text.length) {
|
|
53
|
+
let end = safeCut(text, offset, AGENT_MAX_ITEM_TEXT_UNITS);
|
|
54
|
+
if (end < text.length) {
|
|
55
|
+
const slice = text.slice(offset, end);
|
|
56
|
+
const preferred = Math.max(slice.lastIndexOf("\n# "), slice.lastIndexOf("\n## "), slice.lastIndexOf("\n\n"));
|
|
57
|
+
if (preferred > Math.floor(slice.length / 3)) end = offset + preferred + 1;
|
|
58
|
+
const before = text.slice(offset, end);
|
|
59
|
+
const openings = [...before.matchAll(/^\s*(`{3,}|~{3,})/gm)];
|
|
60
|
+
if (openings.length % 2 === 1) {
|
|
61
|
+
const last = openings.at(-1);
|
|
62
|
+
const fenceStart = offset + last.index;
|
|
63
|
+
const close = text.indexOf(`
|
|
64
|
+
${last[1]}`, end);
|
|
65
|
+
if (close >= 0 && close + 1 + last[1].length - offset <= AGENT_MAX_ITEM_TEXT_UNITS) {
|
|
66
|
+
end = close + 1 + last[1].length;
|
|
67
|
+
} else if (fenceStart > offset) end = fenceStart;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (end <= offset) end = safeCut(text, offset, AGENT_MAX_ITEM_TEXT_UNITS);
|
|
71
|
+
let part = text.slice(offset, end);
|
|
72
|
+
while (!fitsResponseBudget(part, title, url, metadata)) {
|
|
73
|
+
const currentUnits = end - offset;
|
|
74
|
+
const minimumUnits = firstCodePointUnits(text, offset);
|
|
75
|
+
if (currentUnits <= minimumUnits) failItemBudget();
|
|
76
|
+
const nextUnits = Math.max(minimumUnits, Math.floor(currentUnits * 0.8));
|
|
77
|
+
let nextEnd = safeCut(text, offset, nextUnits);
|
|
78
|
+
if (nextEnd <= offset || nextEnd >= end) nextEnd = offset + minimumUnits;
|
|
79
|
+
if (nextEnd <= offset || nextEnd >= end) failItemBudget();
|
|
80
|
+
end = nextEnd;
|
|
81
|
+
part = text.slice(offset, end);
|
|
82
|
+
}
|
|
83
|
+
result.push(part);
|
|
84
|
+
offset = end;
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
chunkAgentText
|
|
90
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AgentManifest, AgentSearchIndex } from "../../../agent-docs/types.js";
|
|
2
|
+
export interface AgentExportOptions {
|
|
3
|
+
outDir?: string;
|
|
4
|
+
base: string;
|
|
5
|
+
siteUrl?: string;
|
|
6
|
+
siteName: string;
|
|
7
|
+
defaultLocale: string;
|
|
8
|
+
defaultLocaleDir: string;
|
|
9
|
+
locales?: Array<{
|
|
10
|
+
code: string;
|
|
11
|
+
dir: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
export declare function projectAgentCorpus(options: AgentExportOptions): {
|
|
15
|
+
manifest: AgentManifest;
|
|
16
|
+
index: AgentSearchIndex;
|
|
17
|
+
pages: Map<string, string>;
|
|
18
|
+
items: Map<string, string>;
|
|
19
|
+
};
|
|
20
|
+
/** Replace only the owned agent/v1 subtree, including on exclude/delete rebuilds. */
|
|
21
|
+
export declare function emitAgentCorpus(options: AgentExportOptions & {
|
|
22
|
+
outDir: string;
|
|
23
|
+
copyPublicWithBase?: boolean;
|
|
24
|
+
}): string[];
|