@ciderpress/ui 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +23 -0
- package/dist/0~142.js +2 -0
- package/dist/0~164.js +2 -0
- package/dist/0~2.js +2 -0
- package/dist/0~225.js +2 -0
- package/dist/0~288.js +2 -0
- package/dist/0~299.js +2 -0
- package/dist/0~3.js +2 -0
- package/dist/0~301.js +2 -0
- package/dist/0~311.js +2 -0
- package/dist/0~326.js +2 -0
- package/dist/0~40.js +2 -0
- package/dist/0~43.js +2 -0
- package/dist/0~433.js +2 -0
- package/dist/0~453.js +2 -0
- package/dist/0~457.js +2 -0
- package/dist/0~497.js +2 -0
- package/dist/0~511.js +2 -0
- package/dist/0~603.js +2 -0
- package/dist/0~616.js +2 -0
- package/dist/0~659.js +2 -0
- package/dist/0~670.js +2 -0
- package/dist/0~687.js +2 -0
- package/dist/0~706.js +2 -0
- package/dist/0~729.js +2 -0
- package/dist/0~768.js +2 -0
- package/dist/0~819.js +2 -0
- package/dist/0~830.js +2 -0
- package/dist/0~854.js +2 -0
- package/dist/0~863.js +2 -0
- package/dist/0~879.js +2 -0
- package/dist/0~96.js +2 -0
- package/dist/0~97.js +2 -0
- package/dist/components/FileTree/FileTree.css +90 -0
- package/dist/components/FileTree/FileTree.d.ts +7 -0
- package/dist/components/FileTree/FileTree.js +531 -0
- package/dist/components/FileTree/FileTreeItem.d.ts +8 -0
- package/dist/components/FileTree/RemoteSvgIcon.d.ts +11 -0
- package/dist/components/FileTree/index.d.ts +4 -0
- package/dist/components/folder-icons.d.ts +32 -0
- package/dist/components/languages.d.ts +7 -0
- package/dist/components/tree-parser/tree-parser.d.ts +12 -0
- package/dist/components/tree-parser/types.d.ts +11 -0
- package/dist/head/css/loader-apple.css +1 -0
- package/dist/head/css/loader-backdrop.css +1 -0
- package/dist/head/css/loader-dots.css +1 -0
- package/dist/head/css/themes/amber.css +1 -0
- package/dist/head/css/themes/arcade.css +1 -0
- package/dist/head/css/themes/grannysmith.css +1 -0
- package/dist/head/css/themes/honeycrisp.css +1 -0
- package/dist/head/css/themes/midnight.css +1 -0
- package/dist/head/css/themes/mulled.css +1 -0
- package/dist/head/js/loader-dots.js +1 -0
- package/dist/head/js/vscode-nav.js +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.mjs +40 -0
- package/dist/node.d.ts +81 -0
- package/dist/node.mjs +17762 -0
- package/dist/plugins/mermaid/MermaidRenderer.tsx +480 -0
- package/dist/plugins/mermaid/mermaid.css +199 -0
- package/dist/theme/components/announcement/announcement-bar.css +103 -0
- package/dist/theme/components/announcement/announcement-bar.tsx +173 -0
- package/dist/theme/components/ask-ai/ask-ai-button.css +52 -0
- package/dist/theme/components/ask-ai/ask-ai-button.tsx +56 -0
- package/dist/theme/components/content-footer/content-footer-portal.tsx +70 -0
- package/dist/theme/components/content-footer/feedback.css +47 -0
- package/dist/theme/components/content-footer/feedback.tsx +96 -0
- package/dist/theme/components/content-footer/meta-actions.css +25 -0
- package/dist/theme/components/content-footer/meta-actions.tsx +57 -0
- package/dist/theme/components/content-footer/page-pager.css +61 -0
- package/dist/theme/components/content-footer/page-pager.tsx +110 -0
- package/dist/theme/components/edit-source-button.tsx +97 -0
- package/dist/theme/components/footer/site-footer.css +179 -0
- package/dist/theme/components/footer/site-footer.tsx +115 -0
- package/dist/theme/components/home/cta.css +67 -0
- package/dist/theme/components/home/cta.tsx +77 -0
- package/dist/theme/components/home/feature-card.css +52 -0
- package/dist/theme/components/home/feature-card.tsx +131 -0
- package/dist/theme/components/home/feature.tsx +79 -0
- package/dist/theme/components/home/hero-demo.css +66 -0
- package/dist/theme/components/home/hero-demo.tsx +46 -0
- package/dist/theme/components/home/hero.css +96 -0
- package/dist/theme/components/home/hero.tsx +111 -0
- package/dist/theme/components/home/layout.tsx +183 -0
- package/dist/theme/components/home/page-rail.css +21 -0
- package/dist/theme/components/home/page-rail.tsx +19 -0
- package/dist/theme/components/home/split.css +148 -0
- package/dist/theme/components/home/split.tsx +120 -0
- package/dist/theme/components/home/trust-strip.css +33 -0
- package/dist/theme/components/home/trust-strip.tsx +43 -0
- package/dist/theme/components/home/workspaces.tsx +71 -0
- package/dist/theme/components/nav/branch-tag.css +54 -0
- package/dist/theme/components/nav/branch-tag.tsx +101 -0
- package/dist/theme/components/nav/ciderpress-doc-layout.tsx +247 -0
- package/dist/theme/components/nav/ciderpress-docs-bar.css +505 -0
- package/dist/theme/components/nav/ciderpress-docs-bar.tsx +426 -0
- package/dist/theme/components/nav/ciderpress-header.css +172 -0
- package/dist/theme/components/nav/ciderpress-header.tsx +113 -0
- package/dist/theme/components/nav/ciderpress-layout-context.tsx +49 -0
- package/dist/theme/components/nav/ciderpress-nav-hamburger.css +193 -0
- package/dist/theme/components/nav/ciderpress-nav-hamburger.tsx +112 -0
- package/dist/theme/components/nav/ciderpress-nav-menu.css +130 -0
- package/dist/theme/components/nav/ciderpress-nav-menu.tsx +372 -0
- package/dist/theme/components/nav/ciderpress-nav-search.css +73 -0
- package/dist/theme/components/nav/ciderpress-nav-search.tsx +55 -0
- package/dist/theme/components/nav/ciderpress-nav-social-links.css +35 -0
- package/dist/theme/components/nav/ciderpress-nav-social-links.tsx +87 -0
- package/dist/theme/components/nav/floating-branch-indicator.css +106 -0
- package/dist/theme/components/nav/floating-branch-indicator.tsx +109 -0
- package/dist/theme/components/nav/layout.tsx +268 -0
- package/dist/theme/components/nav/mobile-nav-cta.tsx +79 -0
- package/dist/theme/components/nav/nav-divider.css +15 -0
- package/dist/theme/components/nav/nav-divider.tsx +19 -0
- package/dist/theme/components/nav/nav-logo.css +42 -0
- package/dist/theme/components/nav/nav-logo.tsx +262 -0
- package/dist/theme/components/nav/theme-switcher.css +92 -0
- package/dist/theme/components/nav/theme-switcher.tsx +298 -0
- package/dist/theme/components/nav/topbar-cta.css +45 -0
- package/dist/theme/components/nav/topbar-cta.tsx +39 -0
- package/dist/theme/components/nav/variant-toggle.css +70 -0
- package/dist/theme/components/nav/variant-toggle.tsx +83 -0
- package/dist/theme/components/nav/version-chip.css +31 -0
- package/dist/theme/components/nav/version-chip.tsx +45 -0
- package/dist/theme/components/nav/vscode-tag.css +32 -0
- package/dist/theme/components/nav/vscode-tag.tsx +20 -0
- package/dist/theme/components/openapi/code-sample.tsx +341 -0
- package/dist/theme/components/openapi/copy-markdown-button.tsx +41 -0
- package/dist/theme/components/openapi/icons.tsx +45 -0
- package/dist/theme/components/openapi/index.ts +6 -0
- package/dist/theme/components/openapi/method-badge.tsx +24 -0
- package/dist/theme/components/openapi/openapi.css +665 -0
- package/dist/theme/components/openapi/operation.tsx +200 -0
- package/dist/theme/components/openapi/overview.tsx +207 -0
- package/dist/theme/components/openapi/parameters-table.tsx +149 -0
- package/dist/theme/components/openapi/request-body.tsx +90 -0
- package/dist/theme/components/openapi/response-list.tsx +112 -0
- package/dist/theme/components/openapi/schema-viewer.tsx +277 -0
- package/dist/theme/components/openapi/security-badges.tsx +63 -0
- package/dist/theme/components/openapi/spec-utils.ts +122 -0
- package/dist/theme/components/shared/accordion.css +118 -0
- package/dist/theme/components/shared/accordion.stories.tsx +96 -0
- package/dist/theme/components/shared/accordion.tsx +191 -0
- package/dist/theme/components/shared/brand-logo.stories.tsx +49 -0
- package/dist/theme/components/shared/brand-mark.stories.tsx +53 -0
- package/dist/theme/components/shared/browser-window.css +1 -0
- package/dist/theme/components/shared/browser-window.stories.tsx +100 -0
- package/dist/theme/components/shared/browser-window.tsx +2 -0
- package/dist/theme/components/shared/card.stories.tsx +50 -0
- package/dist/theme/components/shared/card.tsx +35 -0
- package/dist/theme/components/shared/ciderpress-logo.tsx +93 -0
- package/dist/theme/components/shared/ciderpress-mark.tsx +77 -0
- package/dist/theme/components/shared/color.css +56 -0
- package/dist/theme/components/shared/color.stories.tsx +47 -0
- package/dist/theme/components/shared/color.tsx +69 -0
- package/dist/theme/components/shared/columns.css +37 -0
- package/dist/theme/components/shared/columns.stories.tsx +91 -0
- package/dist/theme/components/shared/columns.tsx +50 -0
- package/dist/theme/components/shared/desktop-window.css +339 -0
- package/dist/theme/components/shared/desktop-window.tsx +535 -0
- package/dist/theme/components/shared/field.css +158 -0
- package/dist/theme/components/shared/field.stories.tsx +100 -0
- package/dist/theme/components/shared/field.tsx +186 -0
- package/dist/theme/components/shared/frame.css +39 -0
- package/dist/theme/components/shared/frame.stories.tsx +49 -0
- package/dist/theme/components/shared/frame.tsx +76 -0
- package/dist/theme/components/shared/icon.stories.tsx +90 -0
- package/dist/theme/components/shared/icon.tsx +41 -0
- package/dist/theme/components/shared/prompt.css +178 -0
- package/dist/theme/components/shared/prompt.stories.tsx +57 -0
- package/dist/theme/components/shared/prompt.tsx +369 -0
- package/dist/theme/components/shared/resolve-card-icon.ts +28 -0
- package/dist/theme/components/shared/section-card.stories.tsx +51 -0
- package/dist/theme/components/shared/section-card.tsx +44 -0
- package/dist/theme/components/shared/section-grid.stories.tsx +46 -0
- package/dist/theme/components/shared/section-grid.tsx +15 -0
- package/dist/theme/components/shared/status-badge.css +37 -0
- package/dist/theme/components/shared/status-badge.stories.tsx +61 -0
- package/dist/theme/components/shared/status-badge.tsx +74 -0
- package/dist/theme/components/shared/steps.css +88 -0
- package/dist/theme/components/shared/steps.stories.tsx +68 -0
- package/dist/theme/components/shared/steps.tsx +100 -0
- package/dist/theme/components/shared/tech-icon-table.stories.tsx +29 -0
- package/dist/theme/components/shared/tech-icon-table.tsx +71 -0
- package/dist/theme/components/shared/tech-tag.stories.tsx +40 -0
- package/dist/theme/components/shared/tech-tag.tsx +31 -0
- package/dist/theme/components/shared/theme-color-palette.css +80 -0
- package/dist/theme/components/shared/theme-color-palette.stories.tsx +52 -0
- package/dist/theme/components/shared/theme-color-palette.tsx +275 -0
- package/dist/theme/components/shared/tooltip.css +69 -0
- package/dist/theme/components/shared/tooltip.stories.tsx +72 -0
- package/dist/theme/components/shared/tooltip.tsx +77 -0
- package/dist/theme/components/sidebar/framework-picker.css +77 -0
- package/dist/theme/components/sidebar/framework-picker.tsx +78 -0
- package/dist/theme/components/sidebar/sidebar-filter.test.ts +140 -0
- package/dist/theme/components/sidebar/sidebar-filter.ts +79 -0
- package/dist/theme/components/sidebar/sidebar-links.css +102 -0
- package/dist/theme/components/sidebar/sidebar-links.tsx +122 -0
- package/dist/theme/components/sidebar/sidebar-promo.css +42 -0
- package/dist/theme/components/sidebar/sidebar-promo.tsx +52 -0
- package/dist/theme/components/sidebar/sidebar-scope.tsx +151 -0
- package/dist/theme/components/sidebar/sidebar-toggle.css +181 -0
- package/dist/theme/components/sidebar/sidebar-toggle.tsx +127 -0
- package/dist/theme/components/theme-provider.tsx +637 -0
- package/dist/theme/components/workspaces/card.css +151 -0
- package/dist/theme/components/workspaces/card.tsx +166 -0
- package/dist/theme/components/workspaces/grid.tsx +62 -0
- package/dist/theme/css.d.ts +1 -0
- package/dist/theme/env.d.ts +12 -0
- package/dist/theme/fonts/GeistMono-Variable.woff2 +0 -0
- package/dist/theme/fonts/GeistPixel-Square.woff2 +0 -0
- package/dist/theme/fonts/GeistSans-Variable.woff2 +0 -0
- package/dist/theme/hooks/use-ciderpress.ts +61 -0
- package/dist/theme/hooks/use-nav-items.ts +76 -0
- package/dist/theme/icons/index.ts +2 -0
- package/dist/theme/icons/tech-map.ts +228 -0
- package/dist/theme/index.tsx +180 -0
- package/dist/theme/lib/read-social-links.ts +27 -0
- package/dist/theme/lib/route-link.tsx +126 -0
- package/dist/theme/lib/safe-url.test.ts +0 -0
- package/dist/theme/lib/safe-url.ts +68 -0
- package/dist/theme/lib/theme-favicon.ts +125 -0
- package/dist/theme/lib/user-config-stub.ts +12 -0
- package/dist/theme/styles/layers.css +32 -0
- package/dist/theme/styles/overrides/badge.css +26 -0
- package/dist/theme/styles/overrides/content-footer.css +80 -0
- package/dist/theme/styles/overrides/details.css +61 -0
- package/dist/theme/styles/overrides/fonts.css +32 -0
- package/dist/theme/styles/overrides/home-card.css +133 -0
- package/dist/theme/styles/overrides/home.css +243 -0
- package/dist/theme/styles/overrides/rail.css +337 -0
- package/dist/theme/styles/overrides/rspress.css +62 -0
- package/dist/theme/styles/overrides/scrollbar.css +25 -0
- package/dist/theme/styles/overrides/section-card.css +114 -0
- package/dist/theme/styles/overrides/sidebar.css +144 -0
- package/dist/theme/styles/overrides/tokens.css +288 -0
- package/dist/theme/styles/overrides/vscode.css +88 -0
- package/dist/theme/styles/themes/amber.css +545 -0
- package/dist/theme/styles/themes/arcade-fx.css +366 -0
- package/dist/theme/styles/themes/arcade.css +273 -0
- package/dist/theme/styles/themes/grannysmith.css +545 -0
- package/dist/theme/styles/themes/honeycrisp.css +545 -0
- package/dist/theme/styles/themes/midnight.css +273 -0
- package/dist/theme/styles/themes/mulled.css +817 -0
- package/package.json +103 -0
- package/src/theme/components/announcement/announcement-bar.css +103 -0
- package/src/theme/components/announcement/announcement-bar.tsx +173 -0
- package/src/theme/components/ask-ai/ask-ai-button.css +52 -0
- package/src/theme/components/ask-ai/ask-ai-button.tsx +56 -0
- package/src/theme/components/content-footer/content-footer-portal.tsx +70 -0
- package/src/theme/components/content-footer/feedback.css +47 -0
- package/src/theme/components/content-footer/feedback.tsx +96 -0
- package/src/theme/components/content-footer/meta-actions.css +25 -0
- package/src/theme/components/content-footer/meta-actions.tsx +57 -0
- package/src/theme/components/content-footer/page-pager.css +61 -0
- package/src/theme/components/content-footer/page-pager.tsx +110 -0
- package/src/theme/components/edit-source-button.tsx +97 -0
- package/src/theme/components/footer/site-footer.css +179 -0
- package/src/theme/components/footer/site-footer.tsx +115 -0
- package/src/theme/components/home/cta.css +67 -0
- package/src/theme/components/home/cta.tsx +77 -0
- package/src/theme/components/home/feature-card.css +52 -0
- package/src/theme/components/home/feature-card.tsx +131 -0
- package/src/theme/components/home/feature.tsx +79 -0
- package/src/theme/components/home/hero-demo.css +66 -0
- package/src/theme/components/home/hero-demo.tsx +46 -0
- package/src/theme/components/home/hero.css +96 -0
- package/src/theme/components/home/hero.tsx +111 -0
- package/src/theme/components/home/layout.tsx +183 -0
- package/src/theme/components/home/page-rail.css +21 -0
- package/src/theme/components/home/page-rail.tsx +19 -0
- package/src/theme/components/home/split.css +148 -0
- package/src/theme/components/home/split.tsx +120 -0
- package/src/theme/components/home/trust-strip.css +33 -0
- package/src/theme/components/home/trust-strip.tsx +43 -0
- package/src/theme/components/home/workspaces.tsx +71 -0
- package/src/theme/components/nav/branch-tag.css +54 -0
- package/src/theme/components/nav/branch-tag.tsx +101 -0
- package/src/theme/components/nav/ciderpress-doc-layout.tsx +247 -0
- package/src/theme/components/nav/ciderpress-docs-bar.css +505 -0
- package/src/theme/components/nav/ciderpress-docs-bar.tsx +426 -0
- package/src/theme/components/nav/ciderpress-header.css +172 -0
- package/src/theme/components/nav/ciderpress-header.tsx +113 -0
- package/src/theme/components/nav/ciderpress-layout-context.tsx +49 -0
- package/src/theme/components/nav/ciderpress-nav-hamburger.css +193 -0
- package/src/theme/components/nav/ciderpress-nav-hamburger.tsx +112 -0
- package/src/theme/components/nav/ciderpress-nav-menu.css +130 -0
- package/src/theme/components/nav/ciderpress-nav-menu.tsx +372 -0
- package/src/theme/components/nav/ciderpress-nav-search.css +73 -0
- package/src/theme/components/nav/ciderpress-nav-search.tsx +55 -0
- package/src/theme/components/nav/ciderpress-nav-social-links.css +35 -0
- package/src/theme/components/nav/ciderpress-nav-social-links.tsx +87 -0
- package/src/theme/components/nav/floating-branch-indicator.css +106 -0
- package/src/theme/components/nav/floating-branch-indicator.tsx +109 -0
- package/src/theme/components/nav/layout.tsx +268 -0
- package/src/theme/components/nav/mobile-nav-cta.tsx +79 -0
- package/src/theme/components/nav/nav-divider.css +15 -0
- package/src/theme/components/nav/nav-divider.tsx +19 -0
- package/src/theme/components/nav/nav-logo.css +42 -0
- package/src/theme/components/nav/nav-logo.tsx +262 -0
- package/src/theme/components/nav/theme-switcher.css +92 -0
- package/src/theme/components/nav/theme-switcher.tsx +298 -0
- package/src/theme/components/nav/topbar-cta.css +45 -0
- package/src/theme/components/nav/topbar-cta.tsx +39 -0
- package/src/theme/components/nav/variant-toggle.css +70 -0
- package/src/theme/components/nav/variant-toggle.tsx +83 -0
- package/src/theme/components/nav/version-chip.css +31 -0
- package/src/theme/components/nav/version-chip.tsx +45 -0
- package/src/theme/components/nav/vscode-tag.css +32 -0
- package/src/theme/components/nav/vscode-tag.tsx +20 -0
- package/src/theme/components/openapi/code-sample.tsx +341 -0
- package/src/theme/components/openapi/copy-markdown-button.tsx +41 -0
- package/src/theme/components/openapi/icons.tsx +45 -0
- package/src/theme/components/openapi/index.ts +6 -0
- package/src/theme/components/openapi/method-badge.tsx +24 -0
- package/src/theme/components/openapi/openapi.css +665 -0
- package/src/theme/components/openapi/operation.tsx +200 -0
- package/src/theme/components/openapi/overview.tsx +207 -0
- package/src/theme/components/openapi/parameters-table.tsx +149 -0
- package/src/theme/components/openapi/request-body.tsx +90 -0
- package/src/theme/components/openapi/response-list.tsx +112 -0
- package/src/theme/components/openapi/schema-viewer.tsx +277 -0
- package/src/theme/components/openapi/security-badges.tsx +63 -0
- package/src/theme/components/openapi/spec-utils.ts +122 -0
- package/src/theme/components/shared/accordion.css +118 -0
- package/src/theme/components/shared/accordion.stories.tsx +96 -0
- package/src/theme/components/shared/accordion.tsx +191 -0
- package/src/theme/components/shared/brand-logo.stories.tsx +49 -0
- package/src/theme/components/shared/brand-mark.stories.tsx +53 -0
- package/src/theme/components/shared/browser-window.css +1 -0
- package/src/theme/components/shared/browser-window.stories.tsx +100 -0
- package/src/theme/components/shared/browser-window.tsx +2 -0
- package/src/theme/components/shared/card.stories.tsx +50 -0
- package/src/theme/components/shared/card.tsx +35 -0
- package/src/theme/components/shared/ciderpress-logo.tsx +93 -0
- package/src/theme/components/shared/ciderpress-mark.tsx +77 -0
- package/src/theme/components/shared/color.css +56 -0
- package/src/theme/components/shared/color.stories.tsx +47 -0
- package/src/theme/components/shared/color.tsx +69 -0
- package/src/theme/components/shared/columns.css +37 -0
- package/src/theme/components/shared/columns.stories.tsx +91 -0
- package/src/theme/components/shared/columns.tsx +50 -0
- package/src/theme/components/shared/desktop-window.css +339 -0
- package/src/theme/components/shared/desktop-window.tsx +535 -0
- package/src/theme/components/shared/field.css +158 -0
- package/src/theme/components/shared/field.stories.tsx +100 -0
- package/src/theme/components/shared/field.tsx +186 -0
- package/src/theme/components/shared/frame.css +39 -0
- package/src/theme/components/shared/frame.stories.tsx +49 -0
- package/src/theme/components/shared/frame.tsx +76 -0
- package/src/theme/components/shared/icon.stories.tsx +90 -0
- package/src/theme/components/shared/icon.tsx +41 -0
- package/src/theme/components/shared/prompt.css +178 -0
- package/src/theme/components/shared/prompt.stories.tsx +57 -0
- package/src/theme/components/shared/prompt.tsx +369 -0
- package/src/theme/components/shared/resolve-card-icon.ts +28 -0
- package/src/theme/components/shared/section-card.stories.tsx +51 -0
- package/src/theme/components/shared/section-card.tsx +44 -0
- package/src/theme/components/shared/section-grid.stories.tsx +46 -0
- package/src/theme/components/shared/section-grid.tsx +15 -0
- package/src/theme/components/shared/status-badge.css +37 -0
- package/src/theme/components/shared/status-badge.stories.tsx +61 -0
- package/src/theme/components/shared/status-badge.tsx +74 -0
- package/src/theme/components/shared/steps.css +88 -0
- package/src/theme/components/shared/steps.stories.tsx +68 -0
- package/src/theme/components/shared/steps.tsx +100 -0
- package/src/theme/components/shared/tech-icon-table.stories.tsx +29 -0
- package/src/theme/components/shared/tech-icon-table.tsx +71 -0
- package/src/theme/components/shared/tech-tag.stories.tsx +40 -0
- package/src/theme/components/shared/tech-tag.tsx +31 -0
- package/src/theme/components/shared/theme-color-palette.css +80 -0
- package/src/theme/components/shared/theme-color-palette.stories.tsx +52 -0
- package/src/theme/components/shared/theme-color-palette.tsx +275 -0
- package/src/theme/components/shared/tooltip.css +69 -0
- package/src/theme/components/shared/tooltip.stories.tsx +72 -0
- package/src/theme/components/shared/tooltip.tsx +77 -0
- package/src/theme/components/sidebar/framework-picker.css +77 -0
- package/src/theme/components/sidebar/framework-picker.tsx +78 -0
- package/src/theme/components/sidebar/sidebar-filter.test.ts +140 -0
- package/src/theme/components/sidebar/sidebar-filter.ts +79 -0
- package/src/theme/components/sidebar/sidebar-links.css +102 -0
- package/src/theme/components/sidebar/sidebar-links.tsx +122 -0
- package/src/theme/components/sidebar/sidebar-promo.css +42 -0
- package/src/theme/components/sidebar/sidebar-promo.tsx +52 -0
- package/src/theme/components/sidebar/sidebar-scope.tsx +151 -0
- package/src/theme/components/sidebar/sidebar-toggle.css +181 -0
- package/src/theme/components/sidebar/sidebar-toggle.tsx +127 -0
- package/src/theme/components/theme-provider.tsx +637 -0
- package/src/theme/components/workspaces/card.css +151 -0
- package/src/theme/components/workspaces/card.tsx +166 -0
- package/src/theme/components/workspaces/grid.tsx +62 -0
- package/src/theme/css.d.ts +1 -0
- package/src/theme/env.d.ts +12 -0
- package/src/theme/fonts/GeistMono-Variable.woff2 +0 -0
- package/src/theme/fonts/GeistPixel-Square.woff2 +0 -0
- package/src/theme/fonts/GeistSans-Variable.woff2 +0 -0
- package/src/theme/hooks/use-ciderpress.ts +61 -0
- package/src/theme/hooks/use-nav-items.ts +76 -0
- package/src/theme/icons/index.ts +2 -0
- package/src/theme/icons/tech-map.ts +228 -0
- package/src/theme/index.tsx +180 -0
- package/src/theme/lib/read-social-links.ts +27 -0
- package/src/theme/lib/route-link.tsx +126 -0
- package/src/theme/lib/safe-url.test.ts +0 -0
- package/src/theme/lib/safe-url.ts +68 -0
- package/src/theme/lib/theme-favicon.ts +125 -0
- package/src/theme/lib/user-config-stub.ts +12 -0
- package/src/theme/styles/layers.css +32 -0
- package/src/theme/styles/overrides/badge.css +26 -0
- package/src/theme/styles/overrides/content-footer.css +80 -0
- package/src/theme/styles/overrides/details.css +61 -0
- package/src/theme/styles/overrides/fonts.css +32 -0
- package/src/theme/styles/overrides/home-card.css +133 -0
- package/src/theme/styles/overrides/home.css +243 -0
- package/src/theme/styles/overrides/rail.css +337 -0
- package/src/theme/styles/overrides/rspress.css +62 -0
- package/src/theme/styles/overrides/scrollbar.css +25 -0
- package/src/theme/styles/overrides/section-card.css +114 -0
- package/src/theme/styles/overrides/sidebar.css +144 -0
- package/src/theme/styles/overrides/tokens.css +288 -0
- package/src/theme/styles/overrides/vscode.css +88 -0
- package/src/theme/styles/themes/amber.css +545 -0
- package/src/theme/styles/themes/arcade-fx.css +366 -0
- package/src/theme/styles/themes/arcade.css +273 -0
- package/src/theme/styles/themes/grannysmith.css +545 -0
- package/src/theme/styles/themes/honeycrisp.css +545 -0
- package/src/theme/styles/themes/midnight.css +273 -0
- package/src/theme/styles/themes/mulled.css +817 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.cp-meta-actions {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
font-family: var(--cp-font-family-mono);
|
|
6
|
+
font-size: 12px;
|
|
7
|
+
color: var(--cp-c-text-3);
|
|
8
|
+
margin-bottom: 24px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.cp-meta-actions__item {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 6px;
|
|
15
|
+
color: var(--cp-c-text-2);
|
|
16
|
+
transition: color 0.15s ease;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.cp-meta-actions__item:hover {
|
|
20
|
+
color: var(--cp-c-text-1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cp-meta-actions__icon {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { match } from 'massaman/match'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { safeUrl } from '../../lib/safe-url.ts'
|
|
5
|
+
|
|
6
|
+
import './meta-actions.css'
|
|
7
|
+
|
|
8
|
+
export interface MetaAction {
|
|
9
|
+
readonly href: string
|
|
10
|
+
readonly label: string
|
|
11
|
+
readonly icon?: React.ReactNode
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface MetaActionsProps {
|
|
15
|
+
/**
|
|
16
|
+
* List of actions to render — typically Edit on GitHub, Report issue, Discuss.
|
|
17
|
+
*/
|
|
18
|
+
readonly actions: readonly MetaAction[]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* MetaActions — horizontal row of mono-styled links rendered below the
|
|
23
|
+
* feedback widget on doc pages. Each action is an external/internal link
|
|
24
|
+
* with an optional leading icon.
|
|
25
|
+
*
|
|
26
|
+
* @param props - Actions to render.
|
|
27
|
+
* @returns React element, or null when no actions are provided.
|
|
28
|
+
*/
|
|
29
|
+
export function MetaActions(props: MetaActionsProps): React.ReactElement | null {
|
|
30
|
+
const safeActions = props.actions.flatMap((action) => {
|
|
31
|
+
const href = safeUrl(action.href)
|
|
32
|
+
if (href === null) {
|
|
33
|
+
return []
|
|
34
|
+
}
|
|
35
|
+
return [{ ...action, href }]
|
|
36
|
+
})
|
|
37
|
+
return match(safeActions.length === 0)
|
|
38
|
+
.with(true, () => null)
|
|
39
|
+
.otherwise(() => (
|
|
40
|
+
<div className="cp-meta-actions">
|
|
41
|
+
{safeActions.map((action) => (
|
|
42
|
+
<a
|
|
43
|
+
key={`${action.label}:${action.href}`}
|
|
44
|
+
className="cp-meta-actions__item"
|
|
45
|
+
href={action.href}
|
|
46
|
+
>
|
|
47
|
+
{match(action.icon)
|
|
48
|
+
.with(undefined, () => null)
|
|
49
|
+
.otherwise((icon) => (
|
|
50
|
+
<span className="cp-meta-actions__icon">{icon}</span>
|
|
51
|
+
))}
|
|
52
|
+
<span>{action.label}</span>
|
|
53
|
+
</a>
|
|
54
|
+
))}
|
|
55
|
+
</div>
|
|
56
|
+
))
|
|
57
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* Content-footer wrapper — the band below the doc body containing the
|
|
2
|
+
feedback widget, meta-actions row, and prev/next pager. */
|
|
3
|
+
.cp-content-footer {
|
|
4
|
+
margin-top: 56px;
|
|
5
|
+
border-top: 1px solid var(--cp-c-border);
|
|
6
|
+
padding-top: 32px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cp-pager {
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: 1fr 1fr;
|
|
12
|
+
gap: 12px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.cp-pager__link {
|
|
16
|
+
border: 1px solid var(--cp-c-border);
|
|
17
|
+
border-radius: var(--cp-radius-card);
|
|
18
|
+
padding: 16px;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 4px;
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
color: inherit;
|
|
24
|
+
transition: all 0.15s ease;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.cp-pager__link:hover {
|
|
28
|
+
border-color: var(--cp-c-border);
|
|
29
|
+
background: var(--cp-c-bg-soft);
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.cp-pager__link--next {
|
|
34
|
+
text-align: right;
|
|
35
|
+
align-items: flex-end;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.cp-pager__placeholder {
|
|
39
|
+
/* keeps the grid cell open when only one side is provided */
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.cp-pager__label {
|
|
43
|
+
font-family: var(--cp-font-family-mono);
|
|
44
|
+
font-size: 11px;
|
|
45
|
+
color: var(--cp-c-text-3);
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 4px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.cp-pager__title {
|
|
52
|
+
font-size: 14px;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
color: var(--cp-c-text-1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (max-width: 720px) {
|
|
58
|
+
.cp-pager {
|
|
59
|
+
grid-template-columns: 1fr;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { match } from 'massaman/match'
|
|
2
|
+
import type React from 'react'
|
|
3
|
+
|
|
4
|
+
import { RouteLink } from '../../lib/route-link.tsx'
|
|
5
|
+
import { safeUrl } from '../../lib/safe-url.ts'
|
|
6
|
+
|
|
7
|
+
import './page-pager.css'
|
|
8
|
+
|
|
9
|
+
export interface PagerLink {
|
|
10
|
+
/**
|
|
11
|
+
* Link label.
|
|
12
|
+
*/
|
|
13
|
+
readonly title: string
|
|
14
|
+
/**
|
|
15
|
+
* Destination URL.
|
|
16
|
+
*/
|
|
17
|
+
readonly href: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface PagePagerProps {
|
|
21
|
+
/**
|
|
22
|
+
* Previous page link, or undefined to hide the prev side.
|
|
23
|
+
*/
|
|
24
|
+
readonly prev?: PagerLink
|
|
25
|
+
/**
|
|
26
|
+
* Next page link, or undefined to hide the next side.
|
|
27
|
+
*/
|
|
28
|
+
readonly next?: PagerLink
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* PagePager — bottom-of-content prev/next navigation. Two side-by-side
|
|
33
|
+
* bordered link cards mirroring the mockup gutter pattern.
|
|
34
|
+
*
|
|
35
|
+
* @param props - Pager configuration.
|
|
36
|
+
* @returns React element, or null when both ends are empty.
|
|
37
|
+
*/
|
|
38
|
+
export function PagePager(props: PagePagerProps): React.ReactElement | null {
|
|
39
|
+
const { prev, next } = props
|
|
40
|
+
|
|
41
|
+
return match(prev === undefined && next === undefined)
|
|
42
|
+
.with(true, () => null)
|
|
43
|
+
.otherwise(() => (
|
|
44
|
+
<nav className="cp-pager">
|
|
45
|
+
{match(prev)
|
|
46
|
+
.with(undefined, () => <span className="cp-pager__placeholder" />)
|
|
47
|
+
.otherwise((p) => {
|
|
48
|
+
const href = safeUrl(p.href)
|
|
49
|
+
if (href === null) {
|
|
50
|
+
return <span className="cp-pager__placeholder" />
|
|
51
|
+
}
|
|
52
|
+
return (
|
|
53
|
+
<RouteLink className="cp-pager__link cp-pager__link--prev" href={href}>
|
|
54
|
+
<span className="cp-pager__label">
|
|
55
|
+
<Chev direction="left" />
|
|
56
|
+
Previous
|
|
57
|
+
</span>
|
|
58
|
+
<span className="cp-pager__title">{p.title}</span>
|
|
59
|
+
</RouteLink>
|
|
60
|
+
)
|
|
61
|
+
})}
|
|
62
|
+
{match(next)
|
|
63
|
+
.with(undefined, () => <span className="cp-pager__placeholder" />)
|
|
64
|
+
.otherwise((n) => {
|
|
65
|
+
const href = safeUrl(n.href)
|
|
66
|
+
if (href === null) {
|
|
67
|
+
return <span className="cp-pager__placeholder" />
|
|
68
|
+
}
|
|
69
|
+
return (
|
|
70
|
+
<RouteLink className="cp-pager__link cp-pager__link--next" href={href}>
|
|
71
|
+
<span className="cp-pager__label">
|
|
72
|
+
Next
|
|
73
|
+
<Chev direction="right" />
|
|
74
|
+
</span>
|
|
75
|
+
<span className="cp-pager__title">{n.title}</span>
|
|
76
|
+
</RouteLink>
|
|
77
|
+
)
|
|
78
|
+
})}
|
|
79
|
+
</nav>
|
|
80
|
+
))
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface ChevProps {
|
|
84
|
+
readonly direction: 'left' | 'right'
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Chevron arrow icon used inside the pager label row.
|
|
89
|
+
*
|
|
90
|
+
* @private
|
|
91
|
+
* @param props - direction
|
|
92
|
+
* @returns SVG element.
|
|
93
|
+
*/
|
|
94
|
+
function Chev(props: ChevProps): React.ReactElement {
|
|
95
|
+
const points = match(props.direction)
|
|
96
|
+
.with('left', () => '15 18 9 12 15 6')
|
|
97
|
+
.otherwise(() => '9 18 15 12 9 6')
|
|
98
|
+
return (
|
|
99
|
+
<svg
|
|
100
|
+
width="11"
|
|
101
|
+
height="11"
|
|
102
|
+
viewBox="0 0 24 24"
|
|
103
|
+
fill="none"
|
|
104
|
+
stroke="currentColor"
|
|
105
|
+
strokeWidth="2"
|
|
106
|
+
>
|
|
107
|
+
<polyline points={points} />
|
|
108
|
+
</svg>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { match } from 'massaman/match'
|
|
2
|
+
import type React from 'react'
|
|
3
|
+
import { useEffect, useRef } from 'react'
|
|
4
|
+
|
|
5
|
+
declare const __CIDERPRESS_VSCODE__: boolean
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* "Edit" button injected next to the Rspress "Copy Markdown" LLMs button.
|
|
9
|
+
*
|
|
10
|
+
* Uses DOM injection to place the button inside the `.rp-llms-container`
|
|
11
|
+
* that Rspress renders on every doc page. Re-injects on SPA navigation
|
|
12
|
+
* by observing `<title>` mutations (same technique as vscode-nav.js).
|
|
13
|
+
*
|
|
14
|
+
* Posts a `ciderpress:edit` message to the parent VS Code webview,
|
|
15
|
+
* which resolves the URL path to the source markdown file and
|
|
16
|
+
* opens it in the editor.
|
|
17
|
+
*
|
|
18
|
+
* Registered as a globalUIComponent — renders on every page.
|
|
19
|
+
*
|
|
20
|
+
* @returns Null element (side-effect only component)
|
|
21
|
+
*/
|
|
22
|
+
export default function EditSourceButton(): React.ReactElement | null {
|
|
23
|
+
return match(__CIDERPRESS_VSCODE__)
|
|
24
|
+
.with(true, () => <EditSourceButtonInner />)
|
|
25
|
+
.otherwise(() => null)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Inner component that performs DOM injection. Only mounted in VS Code mode.
|
|
30
|
+
*
|
|
31
|
+
* @private
|
|
32
|
+
* @returns Null element (side-effect only)
|
|
33
|
+
*/
|
|
34
|
+
function EditSourceButtonInner(): React.ReactElement | null {
|
|
35
|
+
const buttonRef = useRef<HTMLButtonElement | null>(null)
|
|
36
|
+
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
function inject(): void {
|
|
39
|
+
if (buttonRef.current) {
|
|
40
|
+
buttonRef.current.remove()
|
|
41
|
+
buttonRef.current = null
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const container = document.querySelector('.rp-llms-container')
|
|
45
|
+
if (!container) {
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const btn = document.createElement('button')
|
|
50
|
+
btn.type = 'button'
|
|
51
|
+
btn.className = 'cp-edit-source-btn'
|
|
52
|
+
btn.setAttribute('aria-label', 'Edit source file')
|
|
53
|
+
btn.title = 'Open in editor'
|
|
54
|
+
btn.innerHTML = [
|
|
55
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">',
|
|
56
|
+
'<path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/>',
|
|
57
|
+
'<path d="m15 5 4 4"/>',
|
|
58
|
+
'</svg>',
|
|
59
|
+
'<span>Edit</span>',
|
|
60
|
+
].join('')
|
|
61
|
+
|
|
62
|
+
btn.addEventListener('click', () => {
|
|
63
|
+
globalThis.parent.postMessage(
|
|
64
|
+
{ type: 'ciderpress:edit', path: globalThis.location.pathname },
|
|
65
|
+
'*'
|
|
66
|
+
)
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
// oxlint-disable-next-line prefer-modern-dom-apis -- container.firstChild may be null; insertBefore(x, null) appends safely, but firstChild.before() would throw
|
|
70
|
+
container.insertBefore(btn, container.firstChild)
|
|
71
|
+
buttonRef.current = btn
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
inject()
|
|
75
|
+
|
|
76
|
+
const titleEl = document.querySelector('title')
|
|
77
|
+
const observer = match(titleEl)
|
|
78
|
+
.with(null, () => null)
|
|
79
|
+
.otherwise((el) => {
|
|
80
|
+
const obs = new MutationObserver(inject)
|
|
81
|
+
obs.observe(el, { childList: true })
|
|
82
|
+
return obs
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
return () => {
|
|
86
|
+
if (observer) {
|
|
87
|
+
observer.disconnect()
|
|
88
|
+
}
|
|
89
|
+
if (buttonRef.current) {
|
|
90
|
+
buttonRef.current.remove()
|
|
91
|
+
buttonRef.current = null
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}, [])
|
|
95
|
+
|
|
96
|
+
return null
|
|
97
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
.cp-site-footer {
|
|
2
|
+
background: transparent;
|
|
3
|
+
font-size: 13px;
|
|
4
|
+
color: var(--cp-c-text-2);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.cp-site-footer__inner {
|
|
8
|
+
padding: 56px 32px 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@media (max-width: 720px) {
|
|
12
|
+
.cp-site-footer__inner {
|
|
13
|
+
padding: 40px 20px 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cp-site-footer__grid {
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
|
|
20
|
+
gap: 48px;
|
|
21
|
+
max-width: 1200px;
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (max-width: 880px) {
|
|
26
|
+
.cp-site-footer__grid {
|
|
27
|
+
grid-template-columns: 1fr 1fr;
|
|
28
|
+
gap: 32px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (max-width: 640px) {
|
|
33
|
+
.cp-site-footer__grid {
|
|
34
|
+
grid-template-columns: 1fr;
|
|
35
|
+
gap: 36px;
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.cp-site-footer__brand {
|
|
41
|
+
max-width: 320px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (max-width: 640px) {
|
|
45
|
+
.cp-site-footer__brand {
|
|
46
|
+
margin: 0 auto;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cp-site-footer__brand-mark {
|
|
51
|
+
width: 28px;
|
|
52
|
+
height: 28px;
|
|
53
|
+
border-radius: 6px;
|
|
54
|
+
background: var(--cp-c-brand-1);
|
|
55
|
+
display: grid;
|
|
56
|
+
place-items: center;
|
|
57
|
+
color: var(--cp-c-brand-fg);
|
|
58
|
+
font-family: var(--cp-font-family-mono);
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
margin-bottom: 12px;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.cp-site-footer__brand-mark:has(.cp-site-footer__brand-icon) {
|
|
66
|
+
background: transparent;
|
|
67
|
+
border-radius: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.cp-site-footer__brand-icon {
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
display: block;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (max-width: 640px) {
|
|
77
|
+
.cp-site-footer__brand-mark {
|
|
78
|
+
margin-left: auto;
|
|
79
|
+
margin-right: auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.cp-site-footer__socials {
|
|
83
|
+
display: flex;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.cp-site-footer__message {
|
|
89
|
+
margin: 0 0 12px;
|
|
90
|
+
font-size: 13px;
|
|
91
|
+
color: var(--cp-c-text-2);
|
|
92
|
+
line-height: 1.55;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.cp-site-footer__socials {
|
|
96
|
+
margin-top: 8px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.cp-site-footer__col-title {
|
|
100
|
+
margin: 0 0 14px;
|
|
101
|
+
font-family: var(--cp-font-family-mono);
|
|
102
|
+
font-size: 10px;
|
|
103
|
+
text-transform: uppercase;
|
|
104
|
+
letter-spacing: 0.08em;
|
|
105
|
+
color: var(--cp-c-text-3);
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.cp-site-footer__col-list {
|
|
110
|
+
list-style: none;
|
|
111
|
+
margin: 0;
|
|
112
|
+
padding: 0;
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
gap: 8px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.cp-site-footer__col-list a {
|
|
119
|
+
color: var(--cp-c-text-2);
|
|
120
|
+
font-size: 13px;
|
|
121
|
+
text-decoration: none;
|
|
122
|
+
transition: color 0.15s ease;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.cp-site-footer__col-list a:hover {
|
|
126
|
+
color: var(--cp-c-text-1);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.cp-site-footer__bottom {
|
|
130
|
+
margin-top: 48px;
|
|
131
|
+
border-top: 1px solid var(--cp-c-border);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.cp-site-footer__bottom-inner {
|
|
135
|
+
display: flex;
|
|
136
|
+
justify-content: space-between;
|
|
137
|
+
align-items: center;
|
|
138
|
+
padding: 20px 32px;
|
|
139
|
+
max-width: 1200px;
|
|
140
|
+
margin: 0 auto;
|
|
141
|
+
font-family: var(--cp-font-family-mono);
|
|
142
|
+
font-size: 11px;
|
|
143
|
+
color: var(--cp-c-text-3);
|
|
144
|
+
flex-wrap: wrap;
|
|
145
|
+
gap: 12px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@media (max-width: 720px) {
|
|
149
|
+
.cp-site-footer__bottom-inner {
|
|
150
|
+
padding: 20px;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@media (max-width: 640px) {
|
|
155
|
+
.cp-site-footer__bottom-inner {
|
|
156
|
+
flex-direction: column;
|
|
157
|
+
justify-content: center;
|
|
158
|
+
text-align: center;
|
|
159
|
+
gap: 14px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.cp-site-footer__bottom-end {
|
|
163
|
+
justify-content: center;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.cp-site-footer__copyright {
|
|
168
|
+
white-space: nowrap;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.cp-site-footer__tagline {
|
|
172
|
+
white-space: nowrap;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.cp-site-footer__bottom-end {
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
gap: 12px;
|
|
179
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { useSite } from '@rspress/core/runtime'
|
|
2
|
+
import { match } from 'massaman/match'
|
|
3
|
+
import type React from 'react'
|
|
4
|
+
|
|
5
|
+
import { useCiderpress } from '../../hooks/use-ciderpress'
|
|
6
|
+
import { readSocialLinks } from '../../lib/read-social-links'
|
|
7
|
+
import { RouteLink } from '../../lib/route-link.tsx'
|
|
8
|
+
import { safeUrl } from '../../lib/safe-url.ts'
|
|
9
|
+
import { CiderpressNavSocialLinks } from '../nav/ciderpress-nav-social-links'
|
|
10
|
+
import { ThemeSwitcher } from '../nav/theme-switcher'
|
|
11
|
+
import { CiderpressMark } from '../shared/ciderpress-mark'
|
|
12
|
+
|
|
13
|
+
import './site-footer.css'
|
|
14
|
+
|
|
15
|
+
declare const __CIDERPRESS_THEME_SWITCHER__: boolean
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Site-wide footer rendered at the bottom of every page.
|
|
19
|
+
*
|
|
20
|
+
* Brand block on the left, optional link columns on the right (from
|
|
21
|
+
* `site.footer.columns`), and a full-width bottom strip with copyright +
|
|
22
|
+
* tagline divided by a hairline.
|
|
23
|
+
*
|
|
24
|
+
* Renders `null` when neither the top-level `footer` config (Rspress-compat
|
|
25
|
+
* `message` / `copyright` / `socials`) nor `site.footer` is provided, so a
|
|
26
|
+
* consumer who configures neither gets no footer rather than an empty shell.
|
|
27
|
+
*
|
|
28
|
+
* @returns Footer element, or null when no footer config is provided.
|
|
29
|
+
*/
|
|
30
|
+
export function SiteFooter(): React.ReactElement | null {
|
|
31
|
+
const { ciderpressFooter, site } = useCiderpress()
|
|
32
|
+
const { site: rspressSite } = useSite()
|
|
33
|
+
const socialLinks = readSocialLinks(rspressSite)
|
|
34
|
+
const { footer: siteFooter } = site ?? {}
|
|
35
|
+
const { message, copyright, socials } = ciderpressFooter ?? {}
|
|
36
|
+
const { columns, tagline, brandMark } = siteFooter ?? {}
|
|
37
|
+
|
|
38
|
+
const hasRspressContent = message !== undefined || copyright !== undefined || socials === true
|
|
39
|
+
const hasSiteContent = columns !== undefined || tagline !== undefined
|
|
40
|
+
// The footer also hosts the theme switcher when it's enabled — so a
|
|
41
|
+
// config with `theme.switcher: true` but no other footer content
|
|
42
|
+
// still needs the footer shell rendered.
|
|
43
|
+
const hasSwitcher = __CIDERPRESS_THEME_SWITCHER__
|
|
44
|
+
|
|
45
|
+
if (!hasRspressContent && !hasSiteContent && !hasSwitcher) {
|
|
46
|
+
return null
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const resolvedColumns = columns ?? []
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<footer className="cp-site-footer">
|
|
53
|
+
<div className="cp-site-footer__inner">
|
|
54
|
+
<div className="cp-site-footer__grid">
|
|
55
|
+
<div className="cp-site-footer__brand">
|
|
56
|
+
<div className="cp-site-footer__brand-mark">
|
|
57
|
+
{match(brandMark)
|
|
58
|
+
.with(undefined, () => (
|
|
59
|
+
<CiderpressMark className="cp-site-footer__brand-icon" title="" />
|
|
60
|
+
))
|
|
61
|
+
.otherwise((mark) => mark)}
|
|
62
|
+
</div>
|
|
63
|
+
{match(message)
|
|
64
|
+
.with(undefined, () => null)
|
|
65
|
+
.otherwise((msg) => (
|
|
66
|
+
<p className="cp-site-footer__message">{msg}</p>
|
|
67
|
+
))}
|
|
68
|
+
{match(socials === true && socialLinks.length > 0)
|
|
69
|
+
.with(true, () => (
|
|
70
|
+
<div className="cp-site-footer__socials">
|
|
71
|
+
<CiderpressNavSocialLinks links={socialLinks} />
|
|
72
|
+
</div>
|
|
73
|
+
))
|
|
74
|
+
.otherwise(() => null)}
|
|
75
|
+
</div>
|
|
76
|
+
{resolvedColumns.map((col) => (
|
|
77
|
+
<div key={col.heading} className="cp-site-footer__col">
|
|
78
|
+
<h4 className="cp-site-footer__col-title">{col.heading}</h4>
|
|
79
|
+
<ul className="cp-site-footer__col-list">
|
|
80
|
+
{col.links.flatMap((link) => {
|
|
81
|
+
const href = safeUrl(link.href)
|
|
82
|
+
if (href === null) {
|
|
83
|
+
return []
|
|
84
|
+
}
|
|
85
|
+
return [
|
|
86
|
+
<li key={link.text}>
|
|
87
|
+
<RouteLink href={href}>{link.text}</RouteLink>
|
|
88
|
+
</li>,
|
|
89
|
+
]
|
|
90
|
+
})}
|
|
91
|
+
</ul>
|
|
92
|
+
</div>
|
|
93
|
+
))}
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div className="cp-site-footer__bottom">
|
|
97
|
+
<div className="cp-site-footer__bottom-inner">
|
|
98
|
+
{match(copyright)
|
|
99
|
+
.with(undefined, () => null)
|
|
100
|
+
.otherwise((cr) => (
|
|
101
|
+
<span className="cp-site-footer__copyright">{cr}</span>
|
|
102
|
+
))}
|
|
103
|
+
<div className="cp-site-footer__bottom-end">
|
|
104
|
+
{match(tagline)
|
|
105
|
+
.with(undefined, () => null)
|
|
106
|
+
.otherwise((tag) => (
|
|
107
|
+
<span className="cp-site-footer__tagline">{tag}</span>
|
|
108
|
+
))}
|
|
109
|
+
<ThemeSwitcher />
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</footer>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
.cp-cta {
|
|
2
|
+
padding: 96px 0;
|
|
3
|
+
text-align: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.cp-cta__inner {
|
|
7
|
+
max-width: 800px;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
padding: 0 32px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.cp-cta__title {
|
|
13
|
+
font-size: clamp(32px, 5vw, 56px);
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
letter-spacing: -0.03em;
|
|
16
|
+
line-height: 1.05;
|
|
17
|
+
margin: 0 0 20px;
|
|
18
|
+
color: var(--cp-c-text-1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.cp-cta__sub {
|
|
22
|
+
font-size: 17px;
|
|
23
|
+
color: var(--cp-c-text-2);
|
|
24
|
+
max-width: 520px;
|
|
25
|
+
margin: 0 auto 36px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.cp-cta__row {
|
|
29
|
+
display: flex;
|
|
30
|
+
gap: 12px;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.cp-cta__btn {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: 8px;
|
|
39
|
+
padding: 10px 18px;
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
border-radius: var(--cp-radius-pill);
|
|
43
|
+
border: 1px solid var(--cp-c-border);
|
|
44
|
+
background: transparent;
|
|
45
|
+
color: var(--cp-c-text-1);
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
transition: all 0.15s ease;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.cp-cta__btn:hover {
|
|
53
|
+
background: var(--cp-c-bg-soft);
|
|
54
|
+
border-color: var(--cp-c-border);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.cp-cta__btn--primary {
|
|
58
|
+
background: var(--cp-c-brand-1);
|
|
59
|
+
color: var(--cp-c-brand-fg);
|
|
60
|
+
border-color: var(--cp-c-brand-1);
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.cp-cta__btn--primary:hover {
|
|
65
|
+
background: var(--cp-c-brand-2);
|
|
66
|
+
border-color: var(--cp-c-brand-2);
|
|
67
|
+
}
|