@takazudo/zudo-doc 0.2.21 → 1.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/bin/gen-z-index.mjs +164 -0
- package/bin/tags-audit-runner.ts +126 -0
- package/bin/tags-audit.mjs +64 -0
- package/bin/zudo-doc.mjs +83 -0
- package/dist/ai-chat-modal/index.d.ts +8 -0
- package/dist/ai-chat-modal/index.js +243 -0
- package/dist/body-foot-util/body-foot-util-area.d.ts +4 -8
- package/dist/body-foot-util/edit-link.d.ts +4 -8
- package/dist/body-foot-util/index.d.ts +4 -3
- package/dist/breadcrumb/breadcrumb.d.ts +5 -9
- package/dist/breadcrumb/find-path.d.ts +2 -5
- package/dist/breadcrumb/index.d.ts +4 -4
- package/dist/breadcrumb/types.d.ts +3 -5
- package/dist/category-nav/index.d.ts +86 -0
- package/dist/category-nav/index.js +44 -0
- package/dist/category-tree-nav/index.d.ts +65 -0
- package/dist/category-tree-nav/index.js +24 -0
- package/dist/code-group/index.d.ts +10 -0
- package/dist/code-group/index.js +37 -0
- package/dist/code-syntax/code-block-enhancer-script.d.ts +1 -3
- package/dist/code-syntax/code-block-enhancer.d.ts +3 -6
- package/dist/code-syntax/index.d.ts +9 -8
- package/dist/code-syntax/mermaid-init-script.d.ts +3 -5
- package/dist/code-syntax/mermaid-init.d.ts +4 -7
- package/dist/code-syntax/tabs-init-script.d.ts +1 -3
- package/dist/code-syntax/tabs-init.d.ts +3 -6
- package/dist/code-syntax/tabs.d.ts +4 -7
- package/dist/color-scheme-utils.d.ts +125 -0
- package/dist/color-scheme-utils.js +151 -0
- package/dist/compose-meta-title/index.d.ts +7 -0
- package/dist/compose-meta-title/index.js +10 -0
- package/dist/content/component-map.d.ts +13 -17
- package/dist/content/content-blockquote.d.ts +3 -6
- package/dist/content/content-code.d.ts +3 -6
- package/dist/content/content-code.js +1 -1
- package/dist/content/content-link.d.ts +3 -6
- package/dist/content/content-link.js +1 -1
- package/dist/content/content-ol.d.ts +3 -6
- package/dist/content/content-paragraph.d.ts +3 -6
- package/dist/content/content-strong.d.ts +3 -6
- package/dist/content/content-table.d.ts +3 -6
- package/dist/content/content-ul.d.ts +3 -6
- package/dist/content/heading-h2.d.ts +3 -6
- package/dist/content/heading-h3.d.ts +3 -6
- package/dist/content/heading-h4.d.ts +3 -6
- package/dist/content/index.d.ts +29 -13
- package/dist/content-admonition/index.d.ts +15 -0
- package/dist/content-admonition/index.js +14 -0
- package/dist/design-token-panel-bootstrap.d.ts +38 -0
- package/dist/design-token-panel-bootstrap.js +29 -0
- package/dist/desktop-sidebar-toggle-island/index.d.ts +5 -0
- package/dist/desktop-sidebar-toggle-island/index.js +62 -0
- package/dist/details/details.d.ts +3 -7
- package/dist/details/index.d.ts +2 -2
- package/dist/doc-body-end/index.d.ts +21 -0
- package/dist/doc-body-end/index.js +15 -0
- package/dist/doc-content-header/index.d.ts +69 -0
- package/dist/doc-content-header/index.js +49 -0
- package/dist/doc-history/index.d.ts +10 -0
- package/dist/doc-history/index.js +407 -0
- package/dist/doc-history-area/index.d.ts +84 -0
- package/dist/doc-history-area/index.js +76 -0
- package/dist/doc-metainfo-area/index.d.ts +46 -0
- package/dist/doc-metainfo-area/index.js +41 -0
- package/dist/doc-page-props/index.d.ts +93 -0
- package/dist/doc-page-props/index.js +0 -0
- package/dist/doc-page-renderer/index.d.ts +128 -0
- package/dist/doc-page-renderer/index.js +103 -0
- package/dist/doc-page-shell/index.d.ts +136 -0
- package/dist/doc-page-shell/index.js +127 -0
- package/dist/doc-pager/index.d.ts +25 -0
- package/dist/doc-pager/index.js +41 -0
- package/dist/doc-route-entries/index.d.ts +125 -0
- package/dist/doc-route-entries/index.js +76 -0
- package/dist/doc-route-paths/index.d.ts +54 -0
- package/dist/doc-route-paths/index.js +61 -0
- package/dist/doc-tags-area/index.d.ts +38 -0
- package/dist/doc-tags-area/index.js +30 -0
- package/dist/doclayout/anchors.d.ts +7 -9
- package/dist/doclayout/doc-layout-with-defaults.d.ts +16 -12
- package/dist/doclayout/doc-layout.d.ts +5 -9
- package/dist/doclayout/index.d.ts +6 -6
- package/dist/eject/index.d.ts +33 -0
- package/dist/eject/index.js +229 -0
- package/dist/extract-headings/index.d.ts +43 -0
- package/dist/extract-headings/index.js +111 -0
- package/dist/factory-context/index.d.ts +80 -0
- package/dist/factory-context/index.js +0 -0
- package/dist/features.css +882 -0
- package/dist/footer/footer.d.ts +4 -8
- package/dist/footer/index.d.ts +13 -3
- package/dist/footer/types.d.ts +4 -6
- package/dist/footer-with-defaults/index.d.ts +63 -0
- package/dist/footer-with-defaults/index.js +128 -0
- package/dist/frontmatter-preview-data/index.d.ts +26 -0
- package/dist/frontmatter-preview-data/index.js +23 -0
- package/dist/github-helpers/index.d.ts +17 -0
- package/dist/github-helpers/index.js +16 -0
- package/dist/head/doc-head.d.ts +3 -6
- package/dist/head/index.d.ts +9 -5
- package/dist/head/og-tags.d.ts +4 -7
- package/dist/head/twitter-card.d.ts +3 -6
- package/dist/head/types.d.ts +1 -3
- package/dist/head-with-defaults/index.d.ts +49 -0
- package/dist/head-with-defaults/index.js +62 -0
- package/dist/header/header.d.ts +6 -10
- package/dist/header/index.d.ts +16 -6
- package/dist/header/nav-active.d.ts +5 -7
- package/dist/header/nav-overflow-script.d.ts +1 -3
- package/dist/header/right-items.d.ts +3 -6
- package/dist/header/types.d.ts +10 -12
- package/dist/header-with-defaults/index.d.ts +77 -0
- package/dist/header-with-defaults/index.js +163 -0
- package/dist/html-preview-wrapper/dedent.d.ts +1 -3
- package/dist/html-preview-wrapper/highlighted-code.d.ts +3 -7
- package/dist/html-preview-wrapper/html-preview-wrapper.d.ts +6 -10
- package/dist/html-preview-wrapper/html-preview.d.ts +5 -9
- package/dist/html-preview-wrapper/index.d.ts +8 -5
- package/dist/html-preview-wrapper/preflight.d.ts +1 -3
- package/dist/html-preview-wrapper/preview-base.d.ts +4 -8
- package/dist/i18n-version/index.d.ts +7 -5
- package/dist/i18n-version/language-switcher.d.ts +5 -8
- package/dist/i18n-version/types.d.ts +3 -5
- package/dist/i18n-version/version-banner.d.ts +4 -8
- package/dist/i18n-version/version-switcher.d.ts +7 -10
- package/dist/icons/index.d.ts +9 -13
- package/dist/image-enlarge/index.d.ts +13 -0
- package/dist/image-enlarge/index.js +176 -0
- package/dist/index.d.ts +26 -2
- package/dist/inline-version-switcher/index.d.ts +31 -0
- package/dist/inline-version-switcher/index.js +44 -0
- package/dist/integrations/claude-resources/escape-for-mdx.d.ts +1 -3
- package/dist/integrations/claude-resources/generate.d.ts +2 -4
- package/dist/integrations/claude-resources/index.d.ts +7 -10
- package/dist/integrations/doc-history/index.d.ts +21 -24
- package/dist/integrations/doc-history/pre-build.d.ts +7 -9
- package/dist/integrations/llms-txt/dev-middleware.d.ts +7 -11
- package/dist/integrations/llms-txt/emit.d.ts +2 -7
- package/dist/integrations/llms-txt/generate.d.ts +3 -8
- package/dist/integrations/llms-txt/index.d.ts +33 -8
- package/dist/integrations/llms-txt/load.d.ts +3 -7
- package/dist/integrations/llms-txt/strip.d.ts +2 -6
- package/dist/integrations/llms-txt/types.d.ts +9 -13
- package/dist/integrations/search-index/build-emitter.d.ts +4 -7
- package/dist/integrations/search-index/collect.d.ts +2 -5
- package/dist/integrations/search-index/dev-middleware.d.ts +5 -8
- package/dist/integrations/search-index/index.d.ts +7 -5
- package/dist/integrations/search-index/types.d.ts +5 -7
- package/dist/island-types/index.d.ts +44 -0
- package/dist/island-types/index.js +12 -0
- package/dist/locale-merge/index.d.ts +114 -0
- package/dist/locale-merge/index.js +27 -0
- package/dist/math-block/index.d.ts +18 -0
- package/dist/math-block/index.js +29 -0
- package/dist/md-utils/index.d.ts +6 -8
- package/dist/md-utils/index.js +2 -1
- package/dist/mdx-components/index.d.ts +46 -0
- package/dist/mdx-components/index.js +161 -0
- package/dist/mermaid-enlarge/index.d.ts +11 -0
- package/dist/mermaid-enlarge/index.js +290 -0
- package/dist/metainfo/doc-metainfo.d.ts +5 -9
- package/dist/metainfo/doc-tags.d.ts +7 -11
- package/dist/metainfo/frontmatter-preview.d.ts +8 -12
- package/dist/metainfo/index.d.ts +6 -4
- package/dist/nav-data-prep/index.d.ts +72 -0
- package/dist/nav-data-prep/index.js +34 -0
- package/dist/nav-indexing/category-nav.d.ts +4 -8
- package/dist/nav-indexing/category-tree-nav.d.ts +4 -8
- package/dist/nav-indexing/doc-card-grid.d.ts +4 -8
- package/dist/nav-indexing/docs-sitemap.d.ts +4 -8
- package/dist/nav-indexing/index.d.ts +37 -10
- package/dist/nav-indexing/nav-card-grid.d.ts +4 -8
- package/dist/nav-indexing/site-tree-nav-demo.d.ts +4 -8
- package/dist/nav-indexing/tag-nav.d.ts +6 -10
- package/dist/nav-indexing/types.d.ts +6 -8
- package/dist/nav-indexing/versions-page-content.d.ts +4 -8
- package/dist/nav-scope/index.d.ts +41 -0
- package/dist/nav-scope/index.js +41 -0
- package/dist/nav-source-cache/index.d.ts +13 -0
- package/dist/nav-source-cache/index.js +28 -0
- package/dist/nav-source-docs/index.d.ts +169 -0
- package/dist/nav-source-docs/index.js +123 -0
- package/dist/page-loading/index.d.ts +1 -2
- package/dist/page-loading/page-loading-overlay.d.ts +4 -8
- package/dist/plugins/claude-resources.d.ts +3 -0
- package/dist/plugins/claude-resources.js +27 -0
- package/dist/plugins/connect-adapter.d.ts +31 -0
- package/dist/plugins/connect-adapter.js +78 -0
- package/dist/plugins/doc-history.d.ts +3 -0
- package/dist/plugins/doc-history.js +54 -0
- package/dist/plugins/llms-txt.d.ts +3 -0
- package/dist/plugins/llms-txt.js +48 -0
- package/dist/plugins/plugin-utils.d.ts +17 -0
- package/dist/plugins/plugin-utils.js +11 -0
- package/dist/plugins/routes.d.ts +2 -0
- package/dist/plugins/routes.js +100 -0
- package/dist/plugins/search-index.d.ts +3 -0
- package/dist/plugins/search-index.js +24 -0
- package/dist/preset.d.ts +198 -0
- package/dist/preset.js +185 -0
- package/dist/render-markdown/index.d.ts +5 -0
- package/dist/render-markdown/index.js +115 -0
- package/dist/robots.d.ts +36 -0
- package/dist/robots.js +17 -0
- package/dist/route-enumerators/index.d.ts +204 -0
- package/dist/route-enumerators/index.js +156 -0
- package/dist/routes/404.d.ts +7 -0
- package/dist/routes/404.js +47 -0
- package/dist/routes/_chrome.d.ts +32 -0
- package/dist/routes/_chrome.js +365 -0
- package/dist/routes/_context.d.ts +56 -0
- package/dist/routes/_context.js +222 -0
- package/dist/routes/_docs-helpers.d.ts +43 -0
- package/dist/routes/_docs-helpers.js +173 -0
- package/dist/routes/_virtual.d.js +0 -0
- package/dist/routes/api-ai-chat.d.ts +5 -0
- package/dist/routes/api-ai-chat.js +24 -0
- package/dist/routes/docs-slug.d.ts +21 -0
- package/dist/routes/docs-slug.js +26 -0
- package/dist/routes/docs-tags-index.d.ts +7 -0
- package/dist/routes/docs-tags-index.js +11 -0
- package/dist/routes/docs-tags-tag.d.ts +23 -0
- package/dist/routes/docs-tags-tag.js +19 -0
- package/dist/routes/docs-versions.d.ts +7 -0
- package/dist/routes/docs-versions.js +11 -0
- package/dist/routes/index.d.ts +7 -0
- package/dist/routes/index.js +117 -0
- package/dist/routes/locale-docs-slug.d.ts +27 -0
- package/dist/routes/locale-docs-slug.js +40 -0
- package/dist/routes/locale-docs-tags-index.d.ts +18 -0
- package/dist/routes/locale-docs-tags-index.js +15 -0
- package/dist/routes/locale-docs-tags-tag.d.ts +25 -0
- package/dist/routes/locale-docs-tags-tag.js +22 -0
- package/dist/routes/locale-docs-versions.d.ts +18 -0
- package/dist/routes/locale-docs-versions.js +15 -0
- package/dist/routes/locale-index.d.ts +24 -0
- package/dist/routes/locale-index.js +132 -0
- package/dist/routes/robots.txt.d.ts +3 -0
- package/dist/routes/robots.txt.js +8 -0
- package/dist/routes/sitemap.xml.d.ts +5 -0
- package/dist/routes/sitemap.xml.js +31 -0
- package/dist/routes/v-docs-slug.d.ts +27 -0
- package/dist/routes/v-docs-slug.js +34 -0
- package/dist/routes/v-locale-docs-slug.d.ts +31 -0
- package/dist/routes/v-locale-docs-slug.js +50 -0
- package/dist/safelist.css +1 -1
- package/dist/search-widget/index.d.ts +38 -0
- package/dist/search-widget/index.js +169 -0
- package/dist/search-widget-script/index.d.ts +18 -0
- package/dist/search-widget-script/index.js +465 -0
- package/dist/settings.d.ts +270 -0
- package/dist/settings.js +0 -0
- package/dist/sidebar/index.d.ts +21 -3
- package/dist/sidebar/sidebar.d.ts +5 -9
- package/dist/sidebar/types.d.ts +4 -6
- package/dist/sidebar-prepaint/index.d.ts +21 -0
- package/dist/sidebar-prepaint/index.js +23 -0
- package/dist/sidebar-resizer/index.d.ts +2 -6
- package/dist/sidebar-resizer/sidebar-resizer-init.d.ts +6 -10
- package/dist/sidebar-toggle-island/index.d.ts +13 -0
- package/dist/sidebar-toggle-island/index.js +122 -0
- package/dist/sidebar-tree/build-tree.d.ts +4 -8
- package/dist/sidebar-tree/category-meta.d.ts +3 -6
- package/dist/sidebar-tree/index.d.ts +18 -3
- package/dist/sidebar-tree/types.d.ts +6 -8
- package/dist/sidebar-tree-island/index.d.ts +13 -0
- package/dist/sidebar-tree-island/index.js +454 -0
- package/dist/sidebar-utils/index.d.ts +64 -0
- package/dist/sidebar-utils/index.js +88 -0
- package/dist/sidebar-with-defaults/index.d.ts +38 -0
- package/dist/sidebar-with-defaults/index.js +45 -0
- package/dist/site-tree-nav/index.d.ts +71 -0
- package/dist/site-tree-nav/index.js +36 -0
- package/dist/site-tree-nav-island/index.d.ts +11 -0
- package/dist/site-tree-nav-island/index.js +176 -0
- package/dist/slug/index.d.ts +4 -0
- package/dist/slug/index.js +19 -0
- package/dist/smart-break/index.d.ts +55 -0
- package/dist/{toc/smart-break.js → smart-break/index.js} +30 -3
- package/dist/tab-item/index.d.ts +2 -2
- package/dist/tab-item/tab-item.d.ts +6 -7
- package/dist/tag-helpers/index.d.ts +40 -0
- package/dist/tag-helpers/index.js +54 -0
- package/dist/tag-pages/index.d.ts +114 -0
- package/dist/tag-pages/index.js +146 -0
- package/dist/tags-audit.d.ts +107 -0
- package/dist/tags-audit.js +321 -0
- package/dist/theme/color-scheme-provider.d.ts +4 -8
- package/dist/theme/color-tweak-export-modal.d.ts +4 -7
- package/dist/theme/design-token-serde.d.ts +14 -17
- package/dist/theme/design-token-types.d.ts +4 -6
- package/dist/theme/iframe-bridge.d.ts +12 -14
- package/dist/theme/index.d.ts +7 -9
- package/dist/theme/theme-toggle.d.ts +3 -8
- package/dist/theme-toggle/color-scheme-sync.d.ts +5 -7
- package/dist/theme-toggle/index.d.ts +4 -8
- package/dist/toc/cx.d.ts +2 -3
- package/dist/toc/index.d.ts +8 -6
- package/dist/toc/mobile-toc.d.ts +5 -9
- package/dist/toc/mobile-toc.js +1 -1
- package/dist/toc/toc-title.d.ts +1 -3
- package/dist/toc/toc.d.ts +5 -9
- package/dist/toc/toc.js +1 -1
- package/dist/toc/types.d.ts +1 -3
- package/dist/toc/use-active-heading.d.ts +4 -7
- package/dist/transitions/index.d.ts +1 -1
- package/dist/transitions/page-events.d.ts +4 -6
- package/dist/tree-nav-shared/index.d.ts +22 -0
- package/dist/tree-nav-shared/index.js +66 -0
- package/dist/url-helpers/index.d.ts +37 -0
- package/dist/url-helpers/index.js +106 -0
- package/dist/url-normalizer/index.d.ts +39 -1
- package/dist/url-normalizer/normalize.d.ts +3 -5
- package/dist/use-modal-dialog/index.d.ts +70 -0
- package/dist/use-modal-dialog/index.js +73 -0
- package/dist/versions-page/index.d.ts +55 -0
- package/dist/versions-page/index.js +73 -0
- package/eject/breadcrumb/breadcrumb.tsx +194 -0
- package/eject/breadcrumb/find-path.ts +26 -0
- package/eject/breadcrumb/index.ts +4 -0
- package/eject/breadcrumb/types.ts +32 -0
- package/eject/code-group/index.tsx +78 -0
- package/eject/content-admonition/index.tsx +50 -0
- package/eject/details/details.tsx +34 -0
- package/eject/details/index.ts +4 -0
- package/eject/doc-pager/index.tsx +91 -0
- package/eject/footer/footer.tsx +167 -0
- package/eject/footer/index.ts +19 -0
- package/eject/footer/types.ts +60 -0
- package/eject/header/header.tsx +725 -0
- package/eject/header/index.ts +36 -0
- package/eject/header/nav-active.ts +122 -0
- package/eject/header/nav-overflow-script.ts +302 -0
- package/eject/header/right-items.ts +78 -0
- package/eject/header/types.ts +69 -0
- package/eject/page-loading/index.ts +10 -0
- package/eject/page-loading/page-loading-overlay.tsx +103 -0
- package/eject/sidebar/index.ts +27 -0
- package/eject/sidebar/sidebar.tsx +137 -0
- package/eject/sidebar/types.ts +73 -0
- package/eject/tab-item/index.ts +7 -0
- package/eject/tab-item/tab-item.tsx +70 -0
- package/eject/theme-toggle/color-scheme-sync.ts +73 -0
- package/eject/theme-toggle/index.tsx +120 -0
- package/eject/toc/cx.ts +38 -0
- package/eject/toc/index.ts +11 -0
- package/eject/toc/mobile-toc.tsx +133 -0
- package/eject/toc/toc-title.ts +33 -0
- package/eject/toc/toc.tsx +119 -0
- package/eject/toc/types.ts +14 -0
- package/eject/toc/use-active-heading.ts +162 -0
- package/package.json +371 -11
- package/routes-src/404.tsx +49 -0
- package/routes-src/_chrome.tsx +470 -0
- package/routes-src/_context.ts +314 -0
- package/routes-src/_docs-helpers.ts +284 -0
- package/routes-src/_virtual.d.ts +15 -0
- package/routes-src/api-ai-chat.tsx +46 -0
- package/routes-src/docs-slug.tsx +43 -0
- package/routes-src/docs-tags-index.tsx +14 -0
- package/routes-src/docs-tags-tag.tsx +29 -0
- package/routes-src/docs-versions.tsx +15 -0
- package/routes-src/index.tsx +134 -0
- package/routes-src/locale-docs-slug.tsx +69 -0
- package/routes-src/locale-docs-tags-index.tsx +23 -0
- package/routes-src/locale-docs-tags-tag.tsx +39 -0
- package/routes-src/locale-docs-versions.tsx +23 -0
- package/routes-src/locale-index.tsx +150 -0
- package/routes-src/robots.txt.tsx +13 -0
- package/routes-src/sitemap.xml.tsx +48 -0
- package/routes-src/v-docs-slug.tsx +64 -0
- package/routes-src/v-locale-docs-slug.tsx +85 -0
- package/dist/toc/smart-break.d.ts +0 -27
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { VNode } from 'preact';
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime automatic */
|
|
4
2
|
/** @jsxImportSource preact */
|
|
5
|
-
|
|
3
|
+
import type { VNode } from "preact";
|
|
6
4
|
/**
|
|
7
5
|
* Default label used when the consumer doesn't pass one. The legacy
|
|
8
6
|
* Astro template translated `doc.viewSource` via the project's i18n
|
|
@@ -12,8 +10,8 @@ import { VNode } from 'preact';
|
|
|
12
10
|
* component degrades to the original wording when no override is
|
|
13
11
|
* supplied.
|
|
14
12
|
*/
|
|
15
|
-
declare const DEFAULT_VIEW_SOURCE_LABEL = "View source on GitHub";
|
|
16
|
-
interface BodyFootUtilAreaProps {
|
|
13
|
+
export declare const DEFAULT_VIEW_SOURCE_LABEL = "View source on GitHub";
|
|
14
|
+
export interface BodyFootUtilAreaProps {
|
|
17
15
|
/**
|
|
18
16
|
* Final, pre-computed GitHub source URL. The legacy template
|
|
19
17
|
* derived this from `settings.githubUrl + contentDir + entryId`; the
|
|
@@ -50,6 +48,4 @@ interface BodyFootUtilAreaProps {
|
|
|
50
48
|
* surrounding `<section>` (with its top border + spacing) doesn't
|
|
51
49
|
* appear as an empty band.
|
|
52
50
|
*/
|
|
53
|
-
declare function BodyFootUtilArea(props: BodyFootUtilAreaProps): VNode | null;
|
|
54
|
-
|
|
55
|
-
export { BodyFootUtilArea, type BodyFootUtilAreaProps, DEFAULT_VIEW_SOURCE_LABEL };
|
|
51
|
+
export declare function BodyFootUtilArea(props: BodyFootUtilAreaProps): VNode | null;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { VNode } from 'preact';
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime automatic */
|
|
4
2
|
/** @jsxImportSource preact */
|
|
5
|
-
|
|
3
|
+
import type { VNode } from "preact";
|
|
6
4
|
/**
|
|
7
5
|
* Default label used when the consumer doesn't pass one. The legacy
|
|
8
6
|
* Astro template translated `doc.editPage` via the project's i18n
|
|
@@ -10,8 +8,8 @@ import { VNode } from 'preact';
|
|
|
10
8
|
* already-translated label as `label` instead. The English string is
|
|
11
9
|
* mirrored verbatim from the legacy translations table.
|
|
12
10
|
*/
|
|
13
|
-
declare const DEFAULT_EDIT_LINK_LABEL = "Edit this page";
|
|
14
|
-
interface EditLinkProps {
|
|
11
|
+
export declare const DEFAULT_EDIT_LINK_LABEL = "Edit this page";
|
|
12
|
+
export interface EditLinkProps {
|
|
15
13
|
/**
|
|
16
14
|
* Final, pre-computed edit URL. The legacy Astro version derived
|
|
17
15
|
* this from `settings.editUrl + contentDir + entryId`; that
|
|
@@ -40,6 +38,4 @@ interface EditLinkProps {
|
|
|
40
38
|
* are pre-resolved by the caller. This matches the breadcrumb subpath
|
|
41
39
|
* pattern of "no settings/i18n imports inside the v2 package".
|
|
42
40
|
*/
|
|
43
|
-
declare function EditLink(props: EditLinkProps): VNode | null;
|
|
44
|
-
|
|
45
|
-
export { DEFAULT_EDIT_LINK_LABEL, EditLink, type EditLinkProps };
|
|
41
|
+
export declare function EditLink(props: EditLinkProps): VNode | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { BodyFootUtilArea,
|
|
2
|
-
export {
|
|
3
|
-
|
|
1
|
+
export { BodyFootUtilArea, DEFAULT_VIEW_SOURCE_LABEL, } from "./body-foot-util-area.js";
|
|
2
|
+
export type { BodyFootUtilAreaProps } from "./body-foot-util-area.js";
|
|
3
|
+
export { EditLink, DEFAULT_EDIT_LINK_LABEL } from "./edit-link.js";
|
|
4
|
+
export type { EditLinkProps } from "./edit-link.js";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { ComponentChildren, VNode } from 'preact';
|
|
2
|
-
import { BreadcrumbItem, SidebarNode } from './types.js';
|
|
3
|
-
|
|
4
1
|
/** @jsxRuntime automatic */
|
|
5
2
|
/** @jsxImportSource preact */
|
|
6
|
-
|
|
3
|
+
import type { ComponentChildren, VNode } from "preact";
|
|
4
|
+
import type { BreadcrumbItem, SidebarNode } from "./types.js";
|
|
7
5
|
/**
|
|
8
6
|
* Convert a sidebar tree + the current page's id into the ordered list
|
|
9
7
|
* of crumbs the renderer walks. The first crumb is the home rung
|
|
@@ -15,8 +13,8 @@ import { BreadcrumbItem, SidebarNode } from './types.js';
|
|
|
15
13
|
* src/utils/docs.ts so the rendered output stays parity-equivalent
|
|
16
14
|
* with the original Astro breadcrumb component.
|
|
17
15
|
*/
|
|
18
|
-
declare function buildBreadcrumbItems(tree: SidebarNode[], currentId: string, homeHref: string): BreadcrumbItem[];
|
|
19
|
-
interface BreadcrumbProps {
|
|
16
|
+
export declare function buildBreadcrumbItems(tree: SidebarNode[], currentId: string, homeHref: string): BreadcrumbItem[];
|
|
17
|
+
export interface BreadcrumbProps {
|
|
20
18
|
/** Pre-built items, or omit and pass `tree` + `currentId` instead. */
|
|
21
19
|
items?: BreadcrumbItem[];
|
|
22
20
|
/** Sidebar tree to derive the trail from. Required when `items` is omitted. */
|
|
@@ -52,6 +50,4 @@ interface BreadcrumbProps {
|
|
|
52
50
|
* Returns null when no items resolve, matching the documented
|
|
53
51
|
* `items.length > 0 &&` guard.
|
|
54
52
|
*/
|
|
55
|
-
declare function Breadcrumb(props: BreadcrumbProps): VNode | null;
|
|
56
|
-
|
|
57
|
-
export { Breadcrumb, type BreadcrumbProps, buildBreadcrumbItems };
|
|
53
|
+
export declare function Breadcrumb(props: BreadcrumbProps): VNode | null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BreadcrumbNode, SidebarNode } from
|
|
2
|
-
|
|
1
|
+
import type { BreadcrumbNode, SidebarNode } from "./types.js";
|
|
3
2
|
/**
|
|
4
3
|
* Walk the sidebar tree and return the chain of nodes from the root
|
|
5
4
|
* level down to (and including) the node whose `id` matches `targetId`.
|
|
@@ -11,6 +10,4 @@ import { BreadcrumbNode, SidebarNode } from './types.js';
|
|
|
11
10
|
* ancestry. The home/root crumb is the renderer's responsibility — this
|
|
12
11
|
* helper deals strictly with the tree itself.
|
|
13
12
|
*/
|
|
14
|
-
declare function findPath<T extends BreadcrumbNode = SidebarNode>(nodes: readonly T[], targetId: string): T[];
|
|
15
|
-
|
|
16
|
-
export { findPath };
|
|
13
|
+
export declare function findPath<T extends BreadcrumbNode = SidebarNode>(nodes: readonly T[], targetId: string): T[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Breadcrumb,
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
|
|
1
|
+
export { Breadcrumb, buildBreadcrumbItems } from "./breadcrumb.js";
|
|
2
|
+
export type { BreadcrumbProps } from "./breadcrumb.js";
|
|
3
|
+
export { findPath } from "./find-path.js";
|
|
4
|
+
export type { BreadcrumbItem, SidebarNode } from "./types.js";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* is structurally assignable to this, so callers can pass either shape
|
|
8
8
|
* unchanged.
|
|
9
9
|
*/
|
|
10
|
-
interface BreadcrumbNode {
|
|
10
|
+
export interface BreadcrumbNode {
|
|
11
11
|
type: "doc" | "category";
|
|
12
12
|
id: string;
|
|
13
13
|
label: string;
|
|
@@ -19,14 +19,12 @@ interface BreadcrumbNode {
|
|
|
19
19
|
* Backward-compatible alias retained for callers that previously imported
|
|
20
20
|
* `SidebarNode` from this subpath.
|
|
21
21
|
*/
|
|
22
|
-
type SidebarNode = BreadcrumbNode;
|
|
22
|
+
export type SidebarNode = BreadcrumbNode;
|
|
23
23
|
/**
|
|
24
24
|
* One rung of the breadcrumb trail. `href` is omitted on the final
|
|
25
25
|
* (current-page) item so the renderer can present it as plain text.
|
|
26
26
|
*/
|
|
27
|
-
interface BreadcrumbItem {
|
|
27
|
+
export interface BreadcrumbItem {
|
|
28
28
|
label: string;
|
|
29
29
|
href?: string;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
export type { BreadcrumbItem, BreadcrumbNode, SidebarNode };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/** @jsxRuntime automatic */
|
|
2
|
+
/** @jsxImportSource preact */
|
|
3
|
+
import type { JSX } from "preact";
|
|
4
|
+
/** Minimal nav node shape required by the category-nav factory. */
|
|
5
|
+
export interface CategoryNavNode {
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
href?: string;
|
|
9
|
+
hasPage: boolean;
|
|
10
|
+
children: CategoryNavNode[];
|
|
11
|
+
}
|
|
12
|
+
/** Minimal nav source needed by the category-nav factory. */
|
|
13
|
+
export interface CategoryNavSource {
|
|
14
|
+
navDocs: unknown[];
|
|
15
|
+
categoryMeta: Map<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
/** Props for the CategoryNavWrapper component. */
|
|
18
|
+
export interface CategoryNavWrapperProps {
|
|
19
|
+
/**
|
|
20
|
+
* Slug of the category whose immediate children should be listed, e.g.
|
|
21
|
+
* "getting-started" or "guides/layout-demos".
|
|
22
|
+
*/
|
|
23
|
+
category?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Explicit list of top-level category slugs to render as cards. Use this
|
|
26
|
+
* when the target categories are not children of a single parent node in
|
|
27
|
+
* the nav tree (e.g. "claude-md", "claude-skills" are top-level siblings
|
|
28
|
+
* of "claude", not children). Each slug is resolved to its nav node; nodes
|
|
29
|
+
* not found in the tree are silently skipped.
|
|
30
|
+
*
|
|
31
|
+
* A `category_no_page` category has no route of its own, so its card links to
|
|
32
|
+
* the first routed descendant page (via firstRoutedHref); categories with no
|
|
33
|
+
* reachable page are skipped rather than emitting a dead link.
|
|
34
|
+
*/
|
|
35
|
+
categories?: string[];
|
|
36
|
+
/**
|
|
37
|
+
* Active locale. Injected via createMdxComponents() closure.
|
|
38
|
+
* Defaults to defaultLocale when not provided.
|
|
39
|
+
*/
|
|
40
|
+
lang?: string;
|
|
41
|
+
/** Optional extra CSS classes forwarded to the <nav> element. */
|
|
42
|
+
class?: string;
|
|
43
|
+
}
|
|
44
|
+
/** Injected dependencies for {@link createCategoryNavWrapper}. */
|
|
45
|
+
export interface CategoryNavDeps {
|
|
46
|
+
/** Default locale code (e.g. `"en"`). */
|
|
47
|
+
defaultLocale: string;
|
|
48
|
+
/**
|
|
49
|
+
* Resolve the identity-stable nav source for an EN/locale context.
|
|
50
|
+
* Host passes `resolveNavSource` from `pages/lib/_nav-source-docs.ts`.
|
|
51
|
+
*/
|
|
52
|
+
resolveNavSource: (lang: string, currentVersion: string | undefined, options?: {
|
|
53
|
+
applyDefaultLocaleOnlyFilter?: boolean;
|
|
54
|
+
keepUnlisted?: boolean;
|
|
55
|
+
}) => CategoryNavSource;
|
|
56
|
+
/**
|
|
57
|
+
* Build the nav tree for a locale.
|
|
58
|
+
* Host passes `buildNavTree` from `@/utils/docs`.
|
|
59
|
+
*/
|
|
60
|
+
buildNavTree: (docs: unknown[], locale: string, categoryMeta: Map<string, unknown>) => CategoryNavNode[];
|
|
61
|
+
/**
|
|
62
|
+
* Find a node by slug in the nav tree.
|
|
63
|
+
* Host passes `findNode` from `@/utils/docs`.
|
|
64
|
+
*/
|
|
65
|
+
findNode: (tree: CategoryNavNode[], slug: string) => CategoryNavNode | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Recursively find the first href in a node's subtree.
|
|
68
|
+
* Host passes `firstRoutedHref` from `@/utils/docs`.
|
|
69
|
+
*/
|
|
70
|
+
firstRoutedHref: (node: CategoryNavNode) => string | undefined;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Create the `CategoryNavWrapper` component bound to the host's nav source
|
|
74
|
+
* and tree-building dependencies.
|
|
75
|
+
*
|
|
76
|
+
* Supports two modes:
|
|
77
|
+
* - `category`: resolves immediate children of a single category node.
|
|
78
|
+
* - `categories`: resolves an explicit list of top-level slugs as cards.
|
|
79
|
+
* Use this when the target categories are siblings in the nav tree rather
|
|
80
|
+
* than children of a common parent (e.g. claude-md / claude-skills are
|
|
81
|
+
* top-level peers of claude, not children of it). A noPage category card
|
|
82
|
+
* links to its first routed descendant page (it has no route of its own).
|
|
83
|
+
*
|
|
84
|
+
* Returns null when no visible children are resolved.
|
|
85
|
+
*/
|
|
86
|
+
export declare function createCategoryNavWrapper(deps: CategoryNavDeps): (props: CategoryNavWrapperProps) => JSX.Element | null;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { CategoryNav as CategoryNavV2 } from "../nav-indexing/index.js";
|
|
3
|
+
function createCategoryNavWrapper(deps) {
|
|
4
|
+
const { defaultLocale, resolveNavSource, buildNavTree, findNode, firstRoutedHref } = deps;
|
|
5
|
+
function CategoryNavWrapper({
|
|
6
|
+
category,
|
|
7
|
+
categories,
|
|
8
|
+
lang = defaultLocale,
|
|
9
|
+
class: className
|
|
10
|
+
}) {
|
|
11
|
+
const locale = lang;
|
|
12
|
+
const { navDocs, categoryMeta } = resolveNavSource(locale, void 0, {
|
|
13
|
+
keepUnlisted: true
|
|
14
|
+
});
|
|
15
|
+
const tree = buildNavTree(navDocs, locale, categoryMeta);
|
|
16
|
+
let children;
|
|
17
|
+
if (categories !== void 0) {
|
|
18
|
+
children = categories.map((slug) => {
|
|
19
|
+
const node = findNode(tree, slug);
|
|
20
|
+
if (!node) return null;
|
|
21
|
+
const href = node.href ?? firstRoutedHref(node);
|
|
22
|
+
if (!href) return null;
|
|
23
|
+
return {
|
|
24
|
+
label: node.label,
|
|
25
|
+
description: node.description,
|
|
26
|
+
href,
|
|
27
|
+
hasPage: true,
|
|
28
|
+
children: []
|
|
29
|
+
};
|
|
30
|
+
}).filter((n) => n !== null);
|
|
31
|
+
} else if (category !== void 0) {
|
|
32
|
+
const categoryNode = findNode(tree, category);
|
|
33
|
+
children = categoryNode?.children.filter((c) => c.hasPage) ?? [];
|
|
34
|
+
} else {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
if (children.length === 0) return null;
|
|
38
|
+
return /* @__PURE__ */ jsx(CategoryNavV2, { children, class: className });
|
|
39
|
+
}
|
|
40
|
+
return CategoryNavWrapper;
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
createCategoryNavWrapper
|
|
44
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** @jsxRuntime automatic */
|
|
2
|
+
/** @jsxImportSource preact */
|
|
3
|
+
import type { JSX } from "preact";
|
|
4
|
+
/** Minimal nav node shape required by the category-tree-nav factory. */
|
|
5
|
+
export interface CategoryTreeNavNode {
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
href?: string;
|
|
9
|
+
hasPage: boolean;
|
|
10
|
+
children: CategoryTreeNavNode[];
|
|
11
|
+
}
|
|
12
|
+
/** Minimal nav source needed by the category-tree-nav factory. */
|
|
13
|
+
export interface CategoryTreeNavSource {
|
|
14
|
+
navDocs: unknown[];
|
|
15
|
+
categoryMeta: Map<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
/** Props for the CategoryTreeNavWrapper component. */
|
|
18
|
+
export interface CategoryTreeNavWrapperProps {
|
|
19
|
+
/**
|
|
20
|
+
* Slug of the category whose children should be rendered as a tree,
|
|
21
|
+
* e.g. "guides" or "getting-started".
|
|
22
|
+
*/
|
|
23
|
+
category: string;
|
|
24
|
+
/**
|
|
25
|
+
* Active locale. Injected via createMdxComponents() closure.
|
|
26
|
+
* Defaults to defaultLocale when not provided.
|
|
27
|
+
*/
|
|
28
|
+
lang?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Injected dependencies for {@link createCategoryTreeNavWrapper}. */
|
|
31
|
+
export interface CategoryTreeNavDeps {
|
|
32
|
+
/** Default locale code (e.g. `"en"`). */
|
|
33
|
+
defaultLocale: string;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve the identity-stable nav source for an EN/locale context.
|
|
36
|
+
* Host passes `resolveNavSource` from `pages/lib/_nav-source-docs.ts`.
|
|
37
|
+
*/
|
|
38
|
+
resolveNavSource: (lang: string, currentVersion: string | undefined, options?: {
|
|
39
|
+
applyDefaultLocaleOnlyFilter?: boolean;
|
|
40
|
+
keepUnlisted?: boolean;
|
|
41
|
+
}) => CategoryTreeNavSource;
|
|
42
|
+
/**
|
|
43
|
+
* Build the nav tree for a locale.
|
|
44
|
+
* Host passes `buildNavTree` from `@/utils/docs`.
|
|
45
|
+
*/
|
|
46
|
+
buildNavTree: (docs: unknown[], locale: string, categoryMeta: Map<string, unknown>) => CategoryTreeNavNode[];
|
|
47
|
+
/**
|
|
48
|
+
* Group satellite nodes under target category prefixes in the nav tree.
|
|
49
|
+
* Host passes `groupSatelliteNodes` from `@/utils/docs`.
|
|
50
|
+
*/
|
|
51
|
+
groupSatelliteNodes: (tree: CategoryTreeNavNode[], prefixes: string[]) => CategoryTreeNavNode[];
|
|
52
|
+
/**
|
|
53
|
+
* Find a node by slug in the nav tree.
|
|
54
|
+
* Host passes `findNode` from `@/utils/docs`.
|
|
55
|
+
*/
|
|
56
|
+
findNode: (tree: CategoryTreeNavNode[], slug: string) => CategoryTreeNavNode | undefined;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create the `CategoryTreeNavWrapper` component bound to the host's nav source
|
|
60
|
+
* and tree-building dependencies.
|
|
61
|
+
*
|
|
62
|
+
* Returns null when the category is not found or has no renderable children —
|
|
63
|
+
* matching the original Astro component's guard.
|
|
64
|
+
*/
|
|
65
|
+
export declare function createCategoryTreeNavWrapper(deps: CategoryTreeNavDeps): (props: CategoryTreeNavWrapperProps) => JSX.Element | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { CategoryTreeNav as CategoryTreeNavV2 } from "../nav-indexing/index.js";
|
|
3
|
+
function createCategoryTreeNavWrapper(deps) {
|
|
4
|
+
const { defaultLocale, resolveNavSource, buildNavTree, groupSatelliteNodes, findNode } = deps;
|
|
5
|
+
function CategoryTreeNavWrapper({
|
|
6
|
+
category,
|
|
7
|
+
lang = defaultLocale
|
|
8
|
+
}) {
|
|
9
|
+
const locale = lang;
|
|
10
|
+
const { navDocs, categoryMeta } = resolveNavSource(locale, void 0, {
|
|
11
|
+
keepUnlisted: true
|
|
12
|
+
});
|
|
13
|
+
const rawTree = buildNavTree(navDocs, locale, categoryMeta);
|
|
14
|
+
const tree = groupSatelliteNodes(rawTree, [category]);
|
|
15
|
+
const categoryNode = findNode(tree, category);
|
|
16
|
+
const children = categoryNode?.children.filter((c) => c.hasPage || c.children.length > 0) ?? [];
|
|
17
|
+
if (children.length === 0) return null;
|
|
18
|
+
return /* @__PURE__ */ jsx(CategoryTreeNavV2, { children });
|
|
19
|
+
}
|
|
20
|
+
return CategoryTreeNavWrapper;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
createCategoryTreeNavWrapper
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @jsxRuntime automatic */
|
|
2
|
+
/** @jsxImportSource preact */
|
|
3
|
+
import type { ComponentChildren } from "preact";
|
|
4
|
+
type Props = {
|
|
5
|
+
tabs?: string[];
|
|
6
|
+
children?: ComponentChildren;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
export declare function CodeGroup({ tabs, children, name }: Props): import("preact").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Fragment, jsx } from "preact/jsx-runtime";
|
|
2
|
+
import { Tabs } from "../code-syntax/index.js";
|
|
3
|
+
import { TabItem } from "../tab-item/index.js";
|
|
4
|
+
function toArray(children) {
|
|
5
|
+
if (!children) return [];
|
|
6
|
+
if (Array.isArray(children)) return children;
|
|
7
|
+
return [children];
|
|
8
|
+
}
|
|
9
|
+
function CodeGroup({ tabs = [], children, name }) {
|
|
10
|
+
const childArray = toArray(children);
|
|
11
|
+
const items = tabs.map((label, i) => {
|
|
12
|
+
const child = childArray[i];
|
|
13
|
+
return { label, child };
|
|
14
|
+
});
|
|
15
|
+
if (items.length === 0) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
17
|
+
}
|
|
18
|
+
const groupId = typeof name === "string" ? name : void 0;
|
|
19
|
+
return /* @__PURE__ */ jsx(Tabs, { groupId, children: items.map(({ label, child }, i) => (
|
|
20
|
+
// value is suffixed with the index so two fences sharing a label
|
|
21
|
+
// (e.g. both titled "ts") get distinct stable tab identities; the
|
|
22
|
+
// label stays the visible text.
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
TabItem,
|
|
25
|
+
{
|
|
26
|
+
label,
|
|
27
|
+
value: `${label}-${i}`,
|
|
28
|
+
default: i === 0 ? true : void 0,
|
|
29
|
+
children: /* @__PURE__ */ jsx("div", { class: "code-group-panel", children: child })
|
|
30
|
+
},
|
|
31
|
+
`${label}-${i}`
|
|
32
|
+
)
|
|
33
|
+
)) });
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
CodeGroup
|
|
37
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { JSX } from 'preact';
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime automatic */
|
|
4
2
|
/** @jsxImportSource preact */
|
|
5
|
-
|
|
3
|
+
import type { JSX } from "preact";
|
|
6
4
|
/**
|
|
7
5
|
* Drop-in JSX replacement for the legacy `code-block-enhancer` component.
|
|
8
6
|
*
|
|
@@ -17,6 +15,5 @@ import { JSX } from 'preact';
|
|
|
17
15
|
* Transitions. Event names come from `BEFORE_NAVIGATE_EVENT` /
|
|
18
16
|
* `AFTER_NAVIGATE_EVENT` in `../transitions/page-events.ts`.
|
|
19
17
|
*/
|
|
20
|
-
declare function CodeBlockEnhancer(): JSX.Element;
|
|
21
|
-
|
|
22
|
-
export { CodeBlockEnhancer, CodeBlockEnhancer as default };
|
|
18
|
+
export declare function CodeBlockEnhancer(): JSX.Element;
|
|
19
|
+
export default CodeBlockEnhancer;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { CodeBlockEnhancer,
|
|
2
|
-
export { CODE_BLOCK_ENHANCER_SCRIPT } from
|
|
3
|
-
export { MermaidInit,
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
|
|
1
|
+
export { CodeBlockEnhancer, default as CodeBlockEnhancerDefault } from "./code-block-enhancer.js";
|
|
2
|
+
export { CODE_BLOCK_ENHANCER_SCRIPT } from "./code-block-enhancer-script.js";
|
|
3
|
+
export { MermaidInit, default as MermaidInitDefault, } from "./mermaid-init.js";
|
|
4
|
+
export type { MermaidInitProps } from "./mermaid-init.js";
|
|
5
|
+
export { MERMAID_INIT_SCRIPT, MERMAID_CDN_MODULE_URL, buildMermaidInitScript, } from "./mermaid-init-script.js";
|
|
6
|
+
export { Tabs, default as TabsDefault } from "./tabs.js";
|
|
7
|
+
export type { TabsProps } from "./tabs.js";
|
|
8
|
+
export { TabsInit, default as TabsInitDefault } from "./tabs-init.js";
|
|
9
|
+
export { TABS_INIT_SCRIPT } from "./tabs-init-script.js";
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* tests can override the URL — e.g. self-hosted mirrors, version-
|
|
17
17
|
* locked deployments — without re-templating the whole script.
|
|
18
18
|
*/
|
|
19
|
-
declare const MERMAID_CDN_MODULE_URL = "https://esm.sh/mermaid@11.15.0";
|
|
19
|
+
export declare const MERMAID_CDN_MODULE_URL = "https://esm.sh/mermaid@11.15.0";
|
|
20
20
|
/**
|
|
21
21
|
* Build the inline init script with a caller-supplied module URL.
|
|
22
22
|
*
|
|
@@ -34,7 +34,7 @@ declare const MERMAID_CDN_MODULE_URL = "https://esm.sh/mermaid@11.15.0";
|
|
|
34
34
|
* `MERMAID_CDN_MODULE_URL`) so existing callers keep working
|
|
35
35
|
* unchanged.
|
|
36
36
|
*/
|
|
37
|
-
declare function buildMermaidInitScript(cdnUrl: string): string;
|
|
37
|
+
export declare function buildMermaidInitScript(cdnUrl: string): string;
|
|
38
38
|
/**
|
|
39
39
|
* Default-URL init script. Built once at module load by passing
|
|
40
40
|
* `MERMAID_CDN_MODULE_URL` to `buildMermaidInitScript`. Kept as the
|
|
@@ -46,6 +46,4 @@ declare function buildMermaidInitScript(cdnUrl: string): string;
|
|
|
46
46
|
* CSP-allowlisted host) call `buildMermaidInitScript(yourUrl)` and
|
|
47
47
|
* pass the result to `<MermaidInit script={…}/>`.
|
|
48
48
|
*/
|
|
49
|
-
declare const MERMAID_INIT_SCRIPT: string;
|
|
50
|
-
|
|
51
|
-
export { MERMAID_CDN_MODULE_URL, MERMAID_INIT_SCRIPT, buildMermaidInitScript };
|
|
49
|
+
export declare const MERMAID_INIT_SCRIPT: string;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { JSX } from 'preact';
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime automatic */
|
|
4
2
|
/** @jsxImportSource preact */
|
|
5
|
-
|
|
3
|
+
import type { JSX } from "preact";
|
|
6
4
|
/**
|
|
7
5
|
* Props for `<MermaidInit/>`.
|
|
8
6
|
*
|
|
@@ -12,7 +10,7 @@ import { JSX } from 'preact';
|
|
|
12
10
|
* `script` wins over `cdnUrl` when both are provided so a fully
|
|
13
11
|
* hand-rolled script can short-circuit the builder entirely.
|
|
14
12
|
*/
|
|
15
|
-
interface MermaidInitProps {
|
|
13
|
+
export interface MermaidInitProps {
|
|
16
14
|
/**
|
|
17
15
|
* Override the mermaid module URL the inline script imports at
|
|
18
16
|
* runtime. Use this for self-hosted mirrors, version-pinned
|
|
@@ -43,6 +41,5 @@ interface MermaidInitProps {
|
|
|
43
41
|
* a `MutationObserver` on `:root[style]` to re-render when the user
|
|
44
42
|
* changes the color scheme via the color-tweak panel.
|
|
45
43
|
*/
|
|
46
|
-
declare function MermaidInit(props?: MermaidInitProps): JSX.Element;
|
|
47
|
-
|
|
48
|
-
export { MermaidInit, type MermaidInitProps, MermaidInit as default };
|
|
44
|
+
export declare function MermaidInit(props?: MermaidInitProps): JSX.Element;
|
|
45
|
+
export default MermaidInit;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { JSX } from 'preact';
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime automatic */
|
|
4
2
|
/** @jsxImportSource preact */
|
|
5
|
-
|
|
3
|
+
import type { JSX } from "preact";
|
|
6
4
|
/**
|
|
7
5
|
* Drop-in JSX replacement for the legacy `tabs-init` component.
|
|
8
6
|
*
|
|
@@ -19,6 +17,5 @@ import { JSX } from 'preact';
|
|
|
19
17
|
*
|
|
20
18
|
* Requires `<Tabs>` to have server-rendered the tab buttons in the DOM.
|
|
21
19
|
*/
|
|
22
|
-
declare function TabsInit(): JSX.Element;
|
|
23
|
-
|
|
24
|
-
export { TabsInit, TabsInit as default };
|
|
20
|
+
export declare function TabsInit(): JSX.Element;
|
|
21
|
+
export default TabsInit;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { ComponentChildren, JSX } from 'preact';
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime automatic */
|
|
4
2
|
/** @jsxImportSource preact */
|
|
5
|
-
|
|
6
|
-
interface TabsProps {
|
|
3
|
+
import type { ComponentChildren, JSX } from "preact";
|
|
4
|
+
export interface TabsProps {
|
|
7
5
|
/**
|
|
8
6
|
* When set, clicking a tab in this group persists the chosen value to
|
|
9
7
|
* `localStorage` under `tabs-group-{groupId}` and syncs all other
|
|
@@ -31,6 +29,5 @@ interface TabsProps {
|
|
|
31
29
|
* </Tabs>
|
|
32
30
|
* ```
|
|
33
31
|
*/
|
|
34
|
-
declare function Tabs({ groupId, children }: TabsProps): JSX.Element;
|
|
35
|
-
|
|
36
|
-
export { Tabs, type TabsProps, Tabs as default };
|
|
32
|
+
export declare function Tabs({ groupId, children }: TabsProps): JSX.Element;
|
|
33
|
+
export default Tabs;
|