@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
|
type Props = JSX.IntrinsicElements["h4"];
|
|
5
|
-
export declare function HeadingH4({ id, children,
|
|
4
|
+
export declare function HeadingH4({ id, children, class: klass, ...rest }: Props): import("@takazudo/zfb").Description;
|
|
6
5
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx } from "
|
|
2
|
-
function HeadingH4({ id, children,
|
|
1
|
+
import { jsx } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
|
+
function HeadingH4({ id, children, class: klass, ...rest }) {
|
|
3
3
|
return /* @__PURE__ */ jsx(
|
|
4
4
|
"h4",
|
|
5
5
|
{
|
|
6
6
|
id,
|
|
7
|
-
|
|
7
|
+
class: `text-body font-semibold leading-snug pt-vsp-xs border-t border-transparent${klass ? ` ${klass}` : ""}`,
|
|
8
8
|
style: {
|
|
9
|
-
|
|
9
|
+
"border-image": "linear-gradient(to right, var(--color-muted), transparent) 1"
|
|
10
10
|
},
|
|
11
11
|
...rest,
|
|
12
12
|
children
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/** @jsxRuntime automatic */
|
|
2
|
-
|
|
3
|
-
import type { ComponentChildren, VNode } from "preact";
|
|
2
|
+
import type { Child } from "@takazudo/zfb/zudo-react";
|
|
4
3
|
export type AdmonitionVariant = "note" | "tip" | "info" | "warning" | "danger" | "caution" | "important";
|
|
5
4
|
export interface AdmonitionProps {
|
|
6
5
|
/** Custom title; falls back to the capitalized variant name (e.g. "Note"). */
|
|
7
6
|
title?: string;
|
|
8
|
-
children?:
|
|
7
|
+
children?: Child;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
10
|
* Build the admonition component for a single variant. The title row is always
|
|
12
11
|
* rendered — defaulting to the capitalized variant name when the author gives
|
|
13
12
|
* no `title` — matching the Astro reference where every callout shows a title.
|
|
14
13
|
*/
|
|
15
|
-
export declare function makeAdmonition(variant: AdmonitionVariant): ({ title, children }: AdmonitionProps) =>
|
|
14
|
+
export declare function makeAdmonition(variant: AdmonitionVariant): ({ title, children }: AdmonitionProps) => Child;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx, jsxs } from "
|
|
1
|
+
import { jsx, jsxs } from "@takazudo/zfb/zudo-react/jsx-runtime";
|
|
2
2
|
function makeAdmonition(variant) {
|
|
3
3
|
const defaultTitle = variant.charAt(0).toUpperCase() + variant.slice(1);
|
|
4
4
|
return function Admonition({ title, children }) {
|
|
5
5
|
const heading = title && title.length > 0 ? title : defaultTitle;
|
|
6
|
-
return /* @__PURE__ */ jsxs("div", { "data-admonition": variant, class: `admonition
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", { "data-admonition": variant, class: `admonition-${variant}`, children: [
|
|
7
7
|
/* @__PURE__ */ jsx("p", { class: "admonition-title", children: heading }),
|
|
8
8
|
/* @__PURE__ */ jsx("div", { class: "admonition-body", children })
|
|
9
9
|
] });
|
package/dist/content.css
CHANGED
|
@@ -10,32 +10,34 @@
|
|
|
10
10
|
* drift). See zudolab/zudo-doc#2188.
|
|
11
11
|
*
|
|
12
12
|
* Component-first split: the major elements (h2–h4, p, a, strong, blockquote,
|
|
13
|
-
* ul, ol, table) get their VISUALS from the package's `defaultComponents`
|
|
14
|
-
* components
|
|
15
|
-
*
|
|
16
|
-
* the flow-space vertical rhythm, heading
|
|
17
|
-
* minor/structural elements (li, code, pre,
|
|
18
|
-
* hash-links), and the admonitions + mermaid
|
|
13
|
+
* ul, ol, table) get their VISUALS from the package's `defaultComponents`
|
|
14
|
+
* zudo-react components, whose utilities are generated by zudo-wind from the
|
|
15
|
+
* public `@takazudo/zudo-doc/wind.json` manifest. This file owns only what
|
|
16
|
+
* those components do NOT emit: the flow-space vertical rhythm, heading
|
|
17
|
+
* `--flow-space` + tightening, the minor/structural elements (li, code, pre,
|
|
18
|
+
* th/td, hr, img, h5/h6, dt/dd, hash-links), and the admonitions + mermaid
|
|
19
|
+
* layout.
|
|
19
20
|
*
|
|
20
21
|
* ── Consumer contract ──────────────────────────────────────────────────────
|
|
21
|
-
* 1. LAYER ORDER — the consumer's stylesheet
|
|
22
|
-
* @layer
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* 2. DESIGN TOKENS —
|
|
29
|
-
*
|
|
22
|
+
* 1. LAYER ORDER — the consumer's stylesheet declares, before importing:
|
|
23
|
+
* @layer zw-reset, zd-flow;
|
|
24
|
+
* `zw-reset` is the zudo-wind reset layer (`reset: "owned-v1"`, supplied by
|
|
25
|
+
* `zudoDoc()`); `zd-flow` is the layer used below for the flow-space owl
|
|
26
|
+
* rule, so unlayered utilities (e.g. `mt-*`) win over it while it still
|
|
27
|
+
* beats the reset's `* { margin: 0 }`. Only that flow rule is layered.
|
|
28
|
+
* See zudolab/zudo-doc#2082 / #2109.
|
|
29
|
+
* 2. DESIGN TOKENS — no consumer `@theme`, Tailwind import or safelist is
|
|
30
|
+
* needed. `zudoDoc()` supplies var-backed token defaults, and the custom
|
|
31
|
+
* properties consumed below are authored as plain `:root` variables
|
|
32
|
+
* (default values from `@takazudo/zudo-doc/theme.css`; override them in a
|
|
33
|
+
* `:root` rule after the imports):
|
|
30
34
|
* --color-{fg,bg,muted,accent,accent-hover,code-bg,code-fg,info,success,
|
|
31
35
|
* warning,danger}
|
|
32
36
|
* --spacing-{vsp-2xs,vsp-xs,vsp-sm,vsp-md,vsp-lg,vsp-xl,vsp-2xl,
|
|
33
37
|
* hsp-2xs,hsp-xs,hsp-sm,hsp-md,hsp-lg,hsp-xl}
|
|
34
38
|
* --text-{body,small} --font-mono --font-weight-{medium,semibold}
|
|
35
39
|
* --leading-{relaxed,snug} --radius-DEFAULT
|
|
36
|
-
*
|
|
37
|
-
* so the component-emitted utility classes (text-title, border-t-[3px],
|
|
38
|
-
* text-accent, …) are generated.
|
|
40
|
+
* See packages/zudo-doc/CLAUDE.md, "Shipped CSS artifacts and Wind manifest".
|
|
39
41
|
* ========================================================================== */
|
|
40
42
|
|
|
41
43
|
/* ========================================
|
|
@@ -55,13 +57,13 @@
|
|
|
55
57
|
/* ── Flow spacing (vertical rhythm) ── */
|
|
56
58
|
|
|
57
59
|
/* In the `zd-flow` cascade layer (declared by the consumer at the top of its
|
|
58
|
-
* stylesheet) so
|
|
60
|
+
* stylesheet) so unlayered utilities win over it:
|
|
59
61
|
* unlayered declarations always beat layered ones regardless of specificity or
|
|
60
62
|
* source order. Both this rule and a `mt-*` utility have specificity (0,1,0);
|
|
61
63
|
* without the layer this rule comes later in source order and silently kills
|
|
62
64
|
* every `mt-*` on a `.zd-content` direct child (e.g. body-foot-util-area's
|
|
63
|
-
* `mt-vsp-xl`). zd-flow
|
|
64
|
-
*
|
|
65
|
+
* `mt-vsp-xl`). zd-flow is declared AFTER zw-reset so this rule still beats
|
|
66
|
+
* the reset's `* { margin: 0 }` reset and the .zd-content rhythm is preserved
|
|
65
67
|
* for plain content blocks. The layer is scoped to ONLY this flow rule — every
|
|
66
68
|
* other `.zd-content` author rule (links, code, lists, headings, the
|
|
67
69
|
* `:first-child` reset, etc.) stays unlayered so utilities do NOT flip those.
|
|
@@ -119,24 +121,20 @@
|
|
|
119
121
|
|
|
120
122
|
/* ── Heading auto-links ── */
|
|
121
123
|
|
|
124
|
+
/* Native heading links are empty, as in v2. Preserve their ordinary link
|
|
125
|
+
styling without adding a visible glyph or changing heading geometry. */
|
|
122
126
|
.zd-content :where(h2, h3, h4, h5, h6) .hash-link {
|
|
123
|
-
text-decoration: none;
|
|
124
|
-
margin-left: var(--spacing-hsp-sm);
|
|
125
|
-
opacity: 0;
|
|
126
|
-
transition: opacity var(--default-transition-duration);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.zd-content :where(h2, h3, h4, h5, h6) .hash-link::after {
|
|
130
|
-
content: "#";
|
|
131
127
|
color: var(--color-accent);
|
|
128
|
+
text-decoration: underline;
|
|
132
129
|
}
|
|
133
130
|
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
@media (hover: hover) {
|
|
132
|
+
.zd-content :where(h2, h3, h4, h5, h6) .hash-link:hover {
|
|
133
|
+
color: var(--color-accent-hover);
|
|
134
|
+
}
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
.zd-content :where(h2, h3, h4, h5, h6) .hash-link:focus-visible {
|
|
139
|
-
opacity: 1;
|
|
140
138
|
outline: 2px solid var(--color-accent);
|
|
141
139
|
outline-offset: 2px;
|
|
142
140
|
}
|
|
@@ -215,6 +213,10 @@
|
|
|
215
213
|
}
|
|
216
214
|
|
|
217
215
|
.zd-content :where(pre code) {
|
|
216
|
+
/* Preserve the measured v2 code-element stack independently of the pre
|
|
217
|
+
container and inline-code tokens; its fallback metrics set line boxes. */
|
|
218
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
219
|
+
"Liberation Mono", "Courier New", monospace;
|
|
218
220
|
background: transparent;
|
|
219
221
|
padding: 0;
|
|
220
222
|
border: none;
|
|
@@ -324,7 +326,7 @@
|
|
|
324
326
|
* nested blocks here had no inter-element gap (zudolab/zudo-doc#2417). The
|
|
325
327
|
* admonition is a narrower scope than the page flow, so a shorter gap
|
|
326
328
|
* (vsp-sm < the page's vsp-md) reads as natural. Layered in `zd-flow` for the
|
|
327
|
-
* same reason as the page owl: it must beat
|
|
329
|
+
* same reason as the page owl: it must beat the reset's `* { margin: 0 }` but
|
|
328
330
|
* lose to an unlayered `mt-*` utility on a nested block. */
|
|
329
331
|
@layer zd-flow {
|
|
330
332
|
.admonition-body > :where(* + *) {
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design-token panel (zdtp) WIRING MECHANISM (#2658, epic Minimal Scaffold
|
|
3
|
+
* #2651). zdtp itself is LAZY-LOADED (#3282, epic
|
|
4
|
+
* #3261): this module carries NO top-level value import of `@takazudo/zdtp`
|
|
5
|
+
* whatsoever. It used to eagerly import the side-effect-free `/constants` leaf;
|
|
6
|
+
* since #4018 those constants come from the in-package mirror
|
|
7
|
+
* `./design-token-panel-constants.js`, because that one static edge made an
|
|
8
|
+
* OPTIONAL peer a hard build-time requirement for every chrome consumer
|
|
9
|
+
* (#4009 — see that module's header).
|
|
10
|
+
* On activation, the controller binds handlers and probes persisted state. The
|
|
11
|
+
* root package is `import()`ed on the first dispatch on either resolved
|
|
12
|
+
* toggle channel (the shared `toggle-design-token-panel`, or this instance's own —
|
|
13
|
+
* see the public 0.5 {@link resolveToggleEventName}), or eagerly when the
|
|
14
|
+
* persisted-state probe finds saved tweaks / a previously-open panel, so zdtp's bundle stays
|
|
15
|
+
* out of the initial page load.
|
|
16
|
+
*
|
|
17
|
+
* `bootstrapDesignTokenPanel` is a callable that configures zdtp's panel and
|
|
18
|
+
* wires its lifecycle hooks to zfb's navigation events via
|
|
19
|
+
* `setLifecycleAdapter()`. It receives a mode-scoped PanelConfig builder —
|
|
20
|
+
* either a project override or the package default from
|
|
21
|
+
* `@takazudo/zudo-doc/design-token-panel-config`. The package island imports
|
|
22
|
+
* that builder statically; it is zdtp-runtime-free (type-only zdtp imports),
|
|
23
|
+
* so the probe can compute the active storage prefix before zdtp exists.
|
|
24
|
+
*
|
|
25
|
+
* The current call shape is a mode-scoped builder. It rebuilds the panel per
|
|
26
|
+
* light/dark mode on every `color-scheme-changed` toggle:
|
|
27
|
+
*
|
|
28
|
+
* import { bootstrapDesignTokenPanel } from "@takazudo/zudo-doc/design-token-panel-bootstrap";
|
|
29
|
+
* import { buildDesignTokenPanelConfig } from "@/config/design-token-panel-config";
|
|
30
|
+
* bootstrapDesignTokenPanel(buildDesignTokenPanelConfig);
|
|
31
|
+
*
|
|
32
|
+
* `design-token-panel-bootstrap-island.tsx` owns the PACKAGE-OWNED island
|
|
33
|
+
* component that wires the mode-scoped builder for every `createChrome`
|
|
34
|
+
* consumer with no host config file — the #2658 "Approach (a)" package default. Since #3396 it
|
|
35
|
+
* binds the package-default builder DIRECTLY
|
|
36
|
+
* (`./design-token-panel-config/index.js`), not the routes plugin's
|
|
37
|
+
* `virtual:zudo-doc-design-token-panel-config` module.
|
|
38
|
+
* `packages/zudo-doc/src/chrome/derive.tsx` statically imports it through the
|
|
39
|
+
* public facade so zfb's island scanner walks route → chrome → derive → facade
|
|
40
|
+
* → island entry (mirrors the DocHistory #2480 static-import contract). A host
|
|
41
|
+
* that ejects entirely can call
|
|
42
|
+
* `bootstrapDesignTokenPanel` with its own builder. Package-owned INJECTED
|
|
43
|
+
* routes do not render this component — they render the configured wrapper
|
|
44
|
+
* described below — but every other `createChrome` caller does.
|
|
45
|
+
*
|
|
46
|
+
* COUPLING REMOVED (#3396, epic #3394): this module no longer imports any
|
|
47
|
+
* `virtual:` specifier, so `@takazudo/zudo-doc/chrome` (which reaches here via
|
|
48
|
+
* `chrome/derive.tsx`) bundles OUTSIDE a zfb build with zero shims, and a
|
|
49
|
+
* `packageOwnedRoutes: false` host needs no alias for the config specifier.
|
|
50
|
+
*
|
|
51
|
+
* WHERE THE HOST OVERRIDE ENTERS NOW: `settings.designTokenPanelConfigModule`
|
|
52
|
+
* still travels through `virtual:zudo-doc-design-token-panel-config`, but the
|
|
53
|
+
* ONLY module that imports that specifier is the routes-only wrapper
|
|
54
|
+
* `routes/_design-token-panel-bootstrap.tsx`. It calls
|
|
55
|
+
* {@link runDesignTokenPanelBootstrapOnce} with the resolved builder and is
|
|
56
|
+
* threaded into `hostBindings.DesignTokenPanelBootstrap` by `routes/_chrome.tsx`,
|
|
57
|
+
* so `deriveBodyEndIslands` renders it instead of the package default on
|
|
58
|
+
* injected routes. The wrapper is a component-level seam INSIDE the client
|
|
59
|
+
* island bundle — deliberately NOT a module-level setter: the route/SSR graph
|
|
60
|
+
* and the hydrated island bundle are separate module graphs, so a setter called
|
|
61
|
+
* during route evaluation would configure only the server instance while the
|
|
62
|
+
* client re-evaluated this module and kept the default.
|
|
63
|
+
*
|
|
64
|
+
* SELF-CONTAINED `pages/` STUBS (was a KNOWN GAP in #3396; closed by #3414).
|
|
65
|
+
* A host that renders docs through a self-contained `pages/` stub (the
|
|
66
|
+
* locked-manifest shape, #2653 — it calls `createChrome` directly rather than
|
|
67
|
+
* going through `routes/_chrome.tsx`) reaches the package default here, so
|
|
68
|
+
* `designTokenPanelConfigModule` does not apply to those pages. Because
|
|
69
|
+
* {@link runDesignTokenPanelBootstrapOnce}'s latch is per SESSION, not per
|
|
70
|
+
* page, that used to make the whole SPA session's panel config depend on which
|
|
71
|
+
* page was hard-loaded first (#3406). Two things now bound it:
|
|
72
|
+
*
|
|
73
|
+
* - `chrome/derive.tsx` SKIPS this package default as the slot default when
|
|
74
|
+
* `settings.designTokenPanelConfigModule` is set and the host supplied no
|
|
75
|
+
* explicit `chromeBindings.DesignTokenPanelBootstrap` (and
|
|
76
|
+
* `packageOwnedRoutes` is on). Stub-rendered pages then mount NO panel island
|
|
77
|
+
* at all, so they can no longer win the latch with the wrong builder — the
|
|
78
|
+
* configured island is the genuine first caller whatever the entry page. The
|
|
79
|
+
* absence on stub pages is deliberate; such a host threads its own builder
|
|
80
|
+
* via `chromeBindings.DesignTokenPanelBootstrap` to get a panel there too.
|
|
81
|
+
* - Any residual default-then-configured race that skip does not close warns at
|
|
82
|
+
* runtime, naming both the setting and that workaround — see
|
|
83
|
+
* {@link runDesignTokenPanelBootstrapOnce}.
|
|
84
|
+
*
|
|
85
|
+
* Package-first wiring landed in S9a zudolab/zudo-doc#2333; mode-scoped rebuild
|
|
86
|
+
* wiring was added in zudolab/zudo-doc#2610 and the package-default island in
|
|
87
|
+
* #2658.
|
|
88
|
+
*
|
|
89
|
+
* CSS is pulled via `@import "@takazudo/zdtp/styles.css"` in the project's
|
|
90
|
+
* `src/styles/global.css` so the panel chrome lands in the main page CSS
|
|
91
|
+
* bundle (not a deferred chunk). Vite library mode strips the source CSS
|
|
92
|
+
* import from the emitted JS, so the explicit CSS-side import is the
|
|
93
|
+
* required pull point. See @takazudo/zdtp PORTABLE-CONTRACT.md §7.
|
|
94
|
+
*/
|
|
95
|
+
import type { PanelConfig } from "@takazudo/zdtp";
|
|
96
|
+
/** Active color-scheme mode, read from `<html data-theme>`. */
|
|
97
|
+
type ColorSchemeMode = "light" | "dark";
|
|
98
|
+
/**
|
|
99
|
+
* A per-mode PanelConfig factory. The package default and host overrides use
|
|
100
|
+
* this same shape so panel defaults follow the live light/dark mode.
|
|
101
|
+
*/
|
|
102
|
+
export type PanelConfigBuilder = (mode: ColorSchemeMode) => PanelConfig;
|
|
103
|
+
/**
|
|
104
|
+
* Theme-pack storage-prefix rule (ADR theme-packs.md Decision 4), enforced
|
|
105
|
+
* CENTRALLY here — never per-builder, so host builders supplied via
|
|
106
|
+
* `designTokenPanelConfigModule` cannot cross-contaminate namespaces even if
|
|
107
|
+
* unaware of packs:
|
|
108
|
+
*
|
|
109
|
+
* - active pack `default` → the builder's `storagePrefix` stays BYTE-UNCHANGED
|
|
110
|
+
* (the existing-user carry-over guarantee: `zudo-doc-tweak` keys keep
|
|
111
|
+
* working on the stock look).
|
|
112
|
+
* - any other pack → `${storagePrefix}--<slug>` (double hyphen avoids
|
|
113
|
+
* colliding with zdtp's own `-open`/version suffixes). zdtp derives every
|
|
114
|
+
* key — including the `${prefix}-open` open-state mirror — from the prefix,
|
|
115
|
+
* so tweaks saved under pack A are invisible under pack B and restored
|
|
116
|
+
* verbatim on switch-back.
|
|
117
|
+
*
|
|
118
|
+
* The `PanelConfigBuilder` signature stays `(mode) => PanelConfig` — this is a
|
|
119
|
+
* post-process of the RETURNED config, not a builder-contract change.
|
|
120
|
+
*/
|
|
121
|
+
export declare function withPackScopedStoragePrefix(config: PanelConfig, activePack: string): PanelConfig;
|
|
122
|
+
/**
|
|
123
|
+
* Bootstrap zdtp for a project — LAZILY (#3282). On activation this registers the
|
|
124
|
+
* interim toggle listener on both resolved channels (#3315), drains the
|
|
125
|
+
* pre-hydration click queue, and probes localStorage for persisted panel
|
|
126
|
+
* state; the actual
|
|
127
|
+
* `import("@takazudo/zudo-doc/zdtp-loader")` (zdtp's package-owned
|
|
128
|
+
* re-export, #4201) + configure happen on the first toggle (or
|
|
129
|
+
* immediately on a probe hit). The configure body then wires everything the
|
|
130
|
+
* pre-lazy version wired eagerly: `configurePanel` with the pack-scoped
|
|
131
|
+
* mode-config, the `color-scheme-changed` / `theme-pack-changed` rebuild
|
|
132
|
+
* listeners, `reapplyPersistedOverrides`, and the zfb lifecycle adapter via
|
|
133
|
+
* `setLifecycleAdapter`.
|
|
134
|
+
*
|
|
135
|
+
* @param buildConfig - The project's `(mode) => PanelConfig` builder for
|
|
136
|
+
* mode-scoped rebuilds.
|
|
137
|
+
*/
|
|
138
|
+
export declare function bootstrapDesignTokenPanel(buildConfig: PanelConfigBuilder): void;
|
|
139
|
+
/**
|
|
140
|
+
* Which island won the once-latch below (#3414).
|
|
141
|
+
*
|
|
142
|
+
* - `"default"` — the package-default island, bound
|
|
143
|
+
* to the package-default builder.
|
|
144
|
+
* - `"configured"` — the routes-only wrapper
|
|
145
|
+
* (`routes/_design-token-panel-bootstrap.tsx`), bound to whatever
|
|
146
|
+
* `virtual:zudo-doc-design-token-panel-config` resolved to (a host's
|
|
147
|
+
* `settings.designTokenPanelConfigModule` when set, the package default
|
|
148
|
+
* otherwise).
|
|
149
|
+
*/
|
|
150
|
+
export type DesignTokenPanelBootstrapOrigin = "default" | "configured";
|
|
151
|
+
/**
|
|
152
|
+
* Run {@link bootstrapDesignTokenPanel} at most once per module instance, with
|
|
153
|
+
* whichever mode-scoped builder the caller supplies.
|
|
154
|
+
*
|
|
155
|
+
* Exists so the routes-only configured wrapper
|
|
156
|
+
* (`routes/_design-token-panel-bootstrap.tsx`, #3396) gets the same one-shot
|
|
157
|
+
* semantics as {@link DesignTokenPanelBootstrap} while supplying the
|
|
158
|
+
* host-overridable builder from `virtual:zudo-doc-design-token-panel-config`.
|
|
159
|
+
* The guard is deliberately shared across both callers: `deriveBodyEndIslands`
|
|
160
|
+
* renders exactly ONE of them, and if a host ever mounted both, configuring the
|
|
161
|
+
* panel twice would re-mount it rather than layer the two configs.
|
|
162
|
+
*
|
|
163
|
+
* `origin` tags WHICH island is calling (#3414). It is optional, defaulting to
|
|
164
|
+
* `"default"`, because this function is reachable from the frozen
|
|
165
|
+
* `./design-token-panel-bootstrap` subpath (API.md) — an added required
|
|
166
|
+
* parameter would break an ejected host that calls it. Both in-package callers
|
|
167
|
+
* pass it explicitly.
|
|
168
|
+
*
|
|
169
|
+
* `activationSignal` is the optional owner scope's disposal signal. Disposal
|
|
170
|
+
* before configuration releases the pending once-claim; successful
|
|
171
|
+
* configuration detaches that scope and keeps the document-lifetime adapter.
|
|
172
|
+
*
|
|
173
|
+
* This is a CALL, not a module-level setter — the builder is passed by the
|
|
174
|
+
* island that activates in the client bundle, so it never has to cross the
|
|
175
|
+
* route-graph → island-bundle boundary.
|
|
176
|
+
*/
|
|
177
|
+
export declare function runDesignTokenPanelBootstrapOnce(build: PanelConfigBuilder, origin?: DesignTokenPanelBootstrapOrigin, activationSignal?: AbortSignal): void;
|
|
178
|
+
export {};
|