vuepress-theme-hope
Version:
A light vuepress theme with tons of features
833 lines (832 loc) • 32.9 kB
TypeScript
import { a as SidebarGroupOptions, c as SidebarObjectOptions, d as AutoLinkOptions, f as NavItemOptions, h as AuthorName, i as SidebarArrayOptions, l as SidebarOptions, m as AuthorInfo, n as ThemePortfolioFrontmatter, o as SidebarItemOptions, p as Author, r as ThemeBasePageFrontmatter, s as SidebarLinkOptions, t as PortfolioMedia, u as SidebarStructureOptions } from "../portfolio-FPgkMXUX.js";
import { $ as getStringArray, A as NavbarLocaleOptions, B as InfoOptions, C as ThemeProjectHomePageFrontmatter, D as NavbarComponent, E as RouteLocaleData, F as MetaLocaleOptions, G as FeatureOptions, H as FeatureLocaleConfig, I as MetaLocateData, J as EncryptOptions, K as EncryptConfig, L as DocsRepoLocaleOptions, M as NavbarGroupOptions, N as NavbarLinkOptions, O as NavbarLayoutOptions, P as NavbarOptions, Q as getCategory, R as FooterLocaleOptions, S as ThemeProjectHomeHighlightOptions, T as ThemeNormalPageFrontmatter, U as FeatureLocaleData, V as FeatureConfig, W as FeatureLocaleOptions, X as PasswordOptions, Y as PasswordConfig, Z as getAuthor, _ as ThemePageData, a as DeprecatedLayoutOptions, b as ThemeProjectHomeFeatureOptions, c as LayoutLocaleOptions, d as SidebarFileInfo, et as getTag, f as SidebarInfo, g as SidebarSorterKeyword, h as SidebarSorterFunction, i as ThemeLocaleOptions, j as NavGroup, k as NavbarLocaleData, l as LayoutOptions, m as SidebarSorter, n as ThemeLocaleConfig, o as LayoutLocaleConfig, p as SidebarLocaleOptions, q as EncryptLocaleData, r as ThemeLocaleData, s as LayoutLocaleData, t as ThemeData, u as SidebarDirInfo, v as ThemeProjectHomeActionOptions, w as StructureSidebarDirOptions, x as ThemeProjectHomeHighlightItem, y as ThemeProjectHomeFeatureItem, z as InfoConfig } from "../data-BaDXBlcL.js";
import { a as BlogLocaleData, c as PaginationLocaleData, d as PageInfoData, f as PageType, i as BlogLocaleConfig, l as PageInfoType, n as ThemeBlogHomeProjectOptions, o as BlogLocaleOptions, r as ThemeHomePageFrontmatter, s as DeprecatedBlogLocaleData, t as ThemeBlogHomePageFrontmatter, u as ArticleInfoData } from "../blogHome-DJaoVOnc.js";
import { a as DeprecatedAppearanceOptions, i as DarkModeOptions, n as AppearanceLocaleData, o as OutlookLocaleData, r as AppearanceOptions, t as AppearanceConfig } from "../appearance-CPtSZA01.js";
import { DefaultLocaleInfo } from "@vuepress/helper";
import { BackToTopPluginOptions } from "@vuepress/plugin-back-to-top";
import { CopyCodePluginOptions } from "@vuepress/plugin-copy-code";
import { IconPluginOptions } from "@vuepress/plugin-icon";
import { LinksCheckPluginOptions } from "@vuepress/plugin-links-check";
import { MarkdownChartPluginOptions } from "@vuepress/plugin-markdown-chart";
import { MarkdownExtPluginOptions } from "@vuepress/plugin-markdown-ext";
import { MarkdownHintPluginOptions } from "@vuepress/plugin-markdown-hint";
import { MarkdownIncludePluginOptions } from "@vuepress/plugin-markdown-include";
import { MarkdownMathPluginOptions } from "@vuepress/plugin-markdown-math";
import { MarkdownTabPluginOptions } from "@vuepress/plugin-markdown-tab";
import { PhotoSwipePluginOptions } from "@vuepress/plugin-photo-swipe";
import { ThemeData as ThemeData$1 } from "@vuepress/plugin-theme-data";
import { BlogPluginOptions, BlogTypeOptions } from "@vuepress/plugin-blog";
import { CatalogPluginOptions } from "@vuepress/plugin-catalog";
import { CommentOptions, CommentPluginOptions } from "@vuepress/plugin-comment";
import { ComponentPluginOptions } from "vuepress-plugin-components";
import { CopyrightPluginOptions } from "@vuepress/plugin-copyright";
import { MarkdownImagePluginOptions } from "@vuepress/plugin-markdown-image";
import { MarkdownStylizePluginOptions } from "@vuepress/plugin-markdown-stylize";
import { MarkdownEnhancePluginOptions } from "vuepress-plugin-md-enhance";
import { NoticeOptions, NoticePluginOptions } from "@vuepress/plugin-notice";
import { RedirectPluginOptions } from "@vuepress/plugin-redirect";
import { SeoPluginOptions } from "@vuepress/plugin-seo";
import { SitemapPluginOptions } from "@vuepress/plugin-sitemap";
import { ShikiPluginOptions } from "@vuepress/plugin-shiki";
import { ReadingTimePluginOptions } from "@vuepress/plugin-reading-time";
import { GitPluginOptions } from "@vuepress/plugin-git";
import { PageFrontmatter } from "vuepress/shared";
import { App, Page, PluginConfig, ThemeFunction } from "vuepress/core";
import { FeedPluginOptions } from "@vuepress/plugin-feed";
import { PrismjsPluginOptions } from "@vuepress/plugin-prismjs";
import { PwaPluginOptions } from "@vuepress/plugin-pwa";
import { RevealJsPluginOptions } from "@vuepress/plugin-revealjs";
import { WatermarkPluginOptions } from "@vuepress/plugin-watermark";
import { DocSearchPluginOptions } from "@vuepress/plugin-docsearch";
import { MeiliSearchPluginOptions } from "@vuepress/plugin-meilisearch";
import { SearchPluginOptions } from "@vuepress/plugin-search";
import { SlimSearchPluginOptions } from "@vuepress/plugin-slimsearch";
//#region src/node/compact/checkLegacyStyle.d.ts
/**
* @deprecated You should use scss style files in v2 and avoid using it
* @param app - VuePress app instance
*/
declare const checkLegacyStyle: (app: App) => void;
//#endregion
//#region src/node/compact/convertFrontmatter.d.ts
/**
* @deprecated You should use V2 standard frontmatter and avoid using it
* @param frontmatter - Page frontmatter
* @param filePathRelative - Page file path relative to source directory
* @returns Converted frontmatter
*/
declare const convertFrontmatter: (frontmatter: PageFrontmatter & Record<string, unknown>, filePathRelative: string) => ThemeBasePageFrontmatter & Record<string, unknown>;
//#endregion
//#region src/node/compact/convertNavbarOptions.d.ts
/**
* @deprecated You should use V2 standard navbar config and avoid using it
* @param config - Legacy navbar config
* @param localePath - Current locale path, used for logger
* @returns Converted navbar config or false if the config is invalid
*/
declare const convertNavbarOptions: (config: unknown, localePath?: string) => NavbarOptions | false;
/**
* @deprecated You should use V2 standard navbar config and avoid using it
* @param options - Legacy navbar layout options
*/
declare const convertNavbarLayoutOptions: (options: Record<string, unknown>) => void;
//#endregion
//#region src/node/compact/convertSidebarOptions.d.ts
/**
* @deprecated You should use V2 standard sidebar config and avoid using it
* @param config - Original sidebar config
* @param localePath - Current locale path, used for logger
* @returns Converted sidebar config
*/
declare const convertSidebarOptions: (config: unknown, localePath?: string) => SidebarOptions;
//#endregion
//#region src/node/typings/behavior.d.ts
interface ThemeBehaviorOptions {
/**
* Whether to perform extra checks
*
* 是否执行额外检查
*
* @default true
*/
check?: boolean;
/**
* Whether to compact with historical versions
*
* 是否兼容历史版本
*
* @default true
*/
compact?: boolean;
/**
* Whether to enable customization
*
* 是否启用自定义
*
* @default false
*/
custom?: boolean;
/**
* Whether to enable debug mode
*
* 是否启用调试模式
*
* @default false
*/
debug?: boolean;
/**
* Whether to check VuePress version
*
* 是否检查 VuePress 版本
*
* @default true
*/
checkVuePress?: boolean;
}
//#endregion
//#region src/node/typings/plugins/blog.d.ts
interface BlogOptions extends Partial<Pick<BlogPluginOptions, "excerptFilter" | "excerptLength" | "excerptSeparator" | "filter" | "slugify" | "hotReload">> {
/**
* Path of article list
*
* 文章列表的路径
*
* @default "/article/"
*/
article?: string;
/**
* Path of category map
*
* 分类地图页的地址
*
* @default "/category/"
*/
category?: string;
/**
* Path to navigate when clicking category label
*
* `:name` will be automatically replaced by current category name
*
* 点击分类标签时跳转的路径。
*
* 其中 `:name` 会被自动替换为当前分类名称
*
* @default "/category/:name/"
*/
categoryItem?: string;
/**
* Path of tag map
*
* 标签地图页的地址
*
* @default "/tag/"
*/
tag?: string;
/**
* Path to navigate when clicking tag label
*
* `:name` will be automatically replaced by current tag name
*
* 点击标签跳转的路径。
*
* 其中 `:name` 会被自动替换为当前分类名称
*
* @default "/tag/:name/"
*/
tagItem?: string;
/**
* Path of star article list
*
* 星标文章列表的路径
*
* @default "/star/""
*/
star?: string;
/**
* Path of timeline
*
* 时间线路径
*
* @default "/timeline/"
*/
timeline?: string;
/**
* Excerpt generation
*
* 摘要生成
*
* @default true
*/
excerpt?: boolean;
/**
* Additional Article Type
*
* This is an advanced option, please refer to the [blog plugin
* documentation](https://ecosystem.vuejs.press/plugins/blog/blog/) for details
*
* 额外的文章类型
*
* 这是一个高级选项,请参考 [blog 插件文档](https://ecosystem.vuejs.press/zh/plugins/blog/blog/) 了解详情
*
* @default [ ]
*/
type?: BlogTypeOptions[];
}
//#endregion
//#region src/node/typings/plugins/options.d.ts
interface DeprecatedThemePluginsOptions {
/** @deprecated Use `markdown.linksCheck` instead */
linksCheck?: never;
/** @deprecated Use `markdown.alert` and `markdown.hint` instead */
markdownHint?: never;
/**
* @deprecated Use `markdown.figure` `markdown.imgLazyload` `markdown.imgMark` `markdown.imgSize`
* and `markdown.obsidianImgSize` instead
*/
markdownImage?: never;
/** @deprecated Use `markdown.math` instead */
markdownMath?: never;
/** @deprecated Use `markdown.codeTabs` and `markdown.tabs` instead */
markdownTab?: never;
/** @deprecated Use `markdown.revealjs` instead */
revealjs?: never;
/** @deprecated Use `markdown.highlighter` instead */
prismjs?: never;
/** @deprecated Use `markdown.highlighter` instead */
shiki?: never;
/** @deprecated Use `plugins.slimsearch` instead */
searchPro?: never;
/** @deprecated Use `markdown` instead */
mdEnhance?: never;
}
interface ThemePluginsOptions extends DeprecatedThemePluginsOptions {
/**
* Enable active-header-links plugin or not
*
* 是否启用 active-header-links 插件
*
* @default true
* @see https://ecosystem.vuejs.press/plugins/development/active-header-links.html
* @see https://ecosystem.vuejs.press/zh/plugins/development/active-header-links.html
*/
activeHeaderLinks?: boolean;
/**
* Back to top plugin options
*
* 返回顶部插件配置
*
* @default true
* @see https://ecosystem.vuejs.press/plugins/features/back-to-top.html
* @see https://ecosystem.vuejs.press/zh/plugins/features/back-to-top.html
*/
backToTop?: BackToTopPluginOptions | boolean;
/**
* Blog plugin options
*
* 博客插件选项
*
* @default false
*/
blog?: BlogOptions | boolean;
/**
* Catalog plugin options
*
* 自动目录插件选项
*
* @default true
* @see https://ecosystem.vuejs.press/plugins/features/catalog.html
* @see https://ecosystem.vuejs.press/plugins/features/catalog.html
*/
catalog?: CatalogPluginOptions | boolean;
/**
* Components plugin options
*
* 插件选项配置
*
* @see https://plugin-components.vuejs.press/config.html
* @see https://plugin-components.vuejs.press/zh/config.html
*/
components?: ComponentPluginOptions | false;
/**
* Comment plugin options
*
* 评论插件配置
*
* @see https://ecosystem.vuejs.press/plugins/blog/comment/
* @see https://ecosystem.vuejs.press/zh/plugins/blog/comment/
*/
comment?: CommentPluginOptions | false;
/**
* Copy code plugin options
*
* 代码复制插件配置
*
* @see https://ecosystem.vuejs.press/plugins/features/copy-code.html
* @see https://ecosystem.vuejs.press/zh/plugins/features/copy-code.html
*/
copyCode?: CopyCodePluginOptions | boolean;
/**
* Copyright plugin options
*
* 版权信息插件配置
*
* @default false
* @see https://ecosystem.vuejs.press/plugins/features/copyright.html
* @see https://ecosystem.vuejs.press/zh/plugins/features/copyright.html
*/
copyright?: CopyrightPluginOptions | boolean;
/**
* DocSearch plugin options
*
* DocSearch 插件选项
*
* @see https://ecosystem.vuejs.press/plugins/search/docsearch.html
* @see https://ecosystem.vuejs.press/zh/plugins/search/docsearch.html
*/
docsearch?: DocSearchPluginOptions;
/**
* Feed plugin options
*
* Feed 插件配置
*
* @see https://ecosystem.vuejs.press/plugins/blog/feed/config.html
* @see https://ecosystem.vuejs.press/zh/plugins/blog/feed/config.html
*/
feed?: Omit<FeedPluginOptions, "hostname"> | boolean;
/**
* Git plugin options
*
* By default this plugin is only enabled in production mode for performance reasons.
*
* Git 插件配置
*
* 默认情况下,出于性能原因,此插件仅在生产模式下启用。
*
* @see https://ecosystem.vuejs.press/plugins/development/git.html
* @see https://ecosystem.vuejs.press/zh/plugins/development/git.html
*/
git?: GitPluginOptions | boolean;
/**
* Icon plugin options
*
* 图标插件选项
*/
icon?: Omit<IconPluginOptions, "component"> | boolean;
/**
* MeiliSearch plugin options
*
* Meilisearch 插件配置
*
* @see https://ecosystem.vuejs.press/plugins/search/meilisearch.html
* @see https://ecosystem.vuejs.press/zh/plugins/search/meilisearch.html
*/
meilisearch?: MeiliSearchPluginOptions;
/**
* Notice options
*
* 公告选项
*
* @default true
*/
notice?: NoticeOptions[] | NoticePluginOptions;
/**
* Enable nprogress plugin or not
*
* 是否启用 nprogress 插件
*
* @default true
*/
nprogress?: boolean;
/**
* Photo-swipe plugin options
*
* 图片预览插件配置
*
* @default true
* @see https://ecosystem.vuejs.press/plugins/features/photo-swipe.html
* @see https://ecosystem.vuejs.press/zh/plugins/features/photo-swipe.html
*/
photoSwipe?: PhotoSwipePluginOptions | boolean;
/**
* PWA plugin options
*
* PWA 插件配置
*
* @default false
* @see https://ecosystem.vuejs.press/plugins/pwa/pwa/config.html
* @see https://ecosystem.vuejs.press/zh/plugins/pwa/pwa/config.html
*/
pwa?: PwaPluginOptions | boolean;
/**
* Reading time plugin options
*
* 阅读时间插件配置
*
* @default true
* @see https://ecosystem.vuejs.press/plugins/development/reading-time.html
* @see https://ecosystem.vuejs.press/zh/plugins/development/reading-time.html
*/
readingTime?: ReadingTimePluginOptions | boolean;
/**
* Redirect plugin options
*
* 重定向插件配置
*
* @see https://ecosystem.vuejs.press/plugins/tools/redirect.html
* @see https://ecosystem.vuejs.press/zh/plugins/tools/redirect.html
*/
redirect?: RedirectPluginOptions | boolean;
/**
* Search plugin options
*
* Search 插件配置
*
* @deprecated Use `slimsearch` instead
* @deprecated 使用 `slimsearch` 代替
* @see https://ecosystem.vuejs.press/plugins/search/search.html
* @see https://ecosystem.vuejs.press/zh/plugins/search/search.html
*/
search?: SearchPluginOptions | boolean;
/**
* Slimsearch plugin options
*
* Slimsearch 插件配置
*
* @see https://ecosystem.vuejs.press/zh/plugins/search/slimsearch.html
* @see https://ecosystem.vuejs.press/zh/plugins/search/slimsearch.html
*/
slimsearch?: SlimSearchPluginOptions | boolean;
/**
* SEO plugin options
*
* SEO 插件配置
*
* @default true
* @see https://ecosystem.vuejs.press/plugins/seo/seo/config.html
* @see https://ecosystem.vuejs.press/zh/plugins/seo/seo/config.html
*/
seo?: Omit<SeoPluginOptions, "hostname" | "author"> | boolean;
/**
* Sitemap plugin options
*
* Sitemap 插件配置
*
* @default true
* @see https://ecosystem.vuejs.press/plugins/seo/sitemap/config.html
* @see https://ecosystem.vuejs.press/zh/plugins/seo/sitemap/config.html
*/
sitemap?: Omit<SitemapPluginOptions, "hostname"> | boolean;
/**
* Watermark plugin options
*
* 水印插件配置
*
* @default false
* @see https://ecosystem.vuejs.press/plugins/features/watermark.html
* @see https://ecosystem.vuejs.press/zh/plugins/features/watermark.html
*/
watermark?: WatermarkPluginOptions | boolean;
}
//#endregion
//#region src/node/typings/helper.d.ts
type Helper<Options> = (options: Options) => Options;
type ThemeNavbarHelper = Helper<NavbarOptions>;
type ThemeSidebarHelper = Helper<SidebarOptions>;
type ThemeSidebarArrayHelper = Helper<SidebarArrayOptions>;
type ThemeSidebarObjectHelper = Helper<SidebarObjectOptions>;
type ThemeBackToTopPluginHelper = Helper<BackToTopPluginOptions | boolean>;
type ThemeBlogPluginHelper = Helper<BlogOptions | boolean>;
type ThemeCatalogPluginHelper = Helper<CatalogPluginOptions | boolean>;
type ThemeCommentPluginHelper = Helper<CommentOptions | false>;
type ThemeComponentPluginHelper = Helper<ComponentPluginOptions>;
type ThemeCopyCodePluginHelper = Helper<CopyCodePluginOptions | boolean>;
type ThemeCopyrightPluginHelper = Helper<CopyrightPluginOptions | boolean>;
type ThemeFeedPluginHelper = Helper<Omit<FeedPluginOptions, "hostname"> | boolean>;
type ThemeGitPluginHelper = Helper<GitPluginOptions | boolean>;
type ThemeLinksCheckPluginHelper = Helper<LinksCheckPluginOptions | boolean>;
type ThemeNoticePluginHelper = Helper<NoticePluginOptions | NoticeOptions[]>;
type ThemePhotoSwipePluginHelper = Helper<PhotoSwipePluginOptions | boolean>;
type ThemePrismJsPluginHelper = Helper<PrismjsPluginOptions | boolean>;
type ThemePwaPluginHelper = Helper<PwaPluginOptions | boolean>;
type ThemeReadingTimePluginHelper = Helper<ReadingTimePluginOptions | false>;
type ThemeRedirectPluginHelper = Helper<RedirectPluginOptions | boolean>;
type ThemeRevealPluginHelper = Helper<Omit<RevealJsPluginOptions, "layout"> | boolean>;
type ThemeSEOPluginHelper = Helper<Omit<SeoPluginOptions, "hostname" | "author"> | boolean>;
type ThemeShikiPluginHelper = Helper<ShikiPluginOptions | boolean>;
type ThemeSitemapPluginHelper = Helper<Omit<SitemapPluginOptions, "hostname"> | boolean>;
type ThemeWatermarkPluginHelper = Helper<WatermarkPluginOptions | boolean>;
//#endregion
//#region src/node/typings/markdown.d.ts
type MarkdownHighlighterOptions = ({
type: "prismjs";
} & PrismjsPluginOptions) | ({
type: "shiki";
} & ShikiPluginOptions);
interface ThemeMarkdownOptions extends MarkdownChartPluginOptions, MarkdownExtPluginOptions, Pick<MarkdownHintPluginOptions, "alert" | "hint">, Pick<MarkdownImagePluginOptions, "figure">, Omit<MarkdownStylizePluginOptions, "custom">, MarkdownTabPluginOptions, Pick<MarkdownEnhancePluginOptions, "demo" | "playground" | "kotlinPlayground" | "vuePlayground" | "sandpack"> {
/**
* Link check plugin options
*
* 链接检查插件选项
*
* @see https://ecosystem.vuejs.press/plugins/markdown/links-check.html
* @see https://ecosystem.vuejs.press/zh/plugins/markdown/links-check.html
*/
linksCheck?: LinksCheckPluginOptions | boolean;
/**
* Whether enable native image lazy loading
*
* 是否启用原生的图片懒加载。
*
* @default false
*/
imgLazyload?: MarkdownImagePluginOptions["lazyload"];
/**
* Whether to enable gfm image id mark support
*
* 是否启用 GFM 图片 ID 标记。
*
* @default false
*/
imgMark?: MarkdownImagePluginOptions["mark"];
/**
* Whether to enable image size mark support
*
* 是否启用图片大小标记支持。
*
* @default false
*/
imgSize?: MarkdownImagePluginOptions["size"];
/**
* Whether to enable obsidian image size mark support
*
* 是否启用 Obsidian 图片大小标记支持。
*
* @default false
*/
obsidianImgSize?: MarkdownImagePluginOptions["obsidianSize"];
/**
* Whether to enable legacy image size mark support
*
* 是否启用旧版图片大小标记支持。
*
* @deprecated
* @default false
*/
legacyImgSize?: MarkdownImagePluginOptions["legacySize"];
/**
* Whether to enable markdown include support
*
* 是否启用 markdown include 支持。
*
* @default false
*/
include?: MarkdownIncludePluginOptions | boolean;
/**
* Whether to enable markdown math support
*
* 是否启用 markdown math 支持。
*
* @default false
*/
math?: MarkdownMathPluginOptions | boolean;
/**
* Whether to enable preview support
*
* 是否启用预览支持
*/
preview?: boolean;
/**
* Customizing token stylize
*
* 自定义标记样式
*/
stylize?: MarkdownStylizePluginOptions["custom"];
/**
* Whether to enable revealjs support
*
* 是否启用 revealjs 支持
*/
revealjs?: Omit<RevealJsPluginOptions, "layout"> | boolean;
/**
* Markdown highlighter options
*
* Markdown 高亮器选项
*
* @default "shiki"
*/
highlighter?: MarkdownHighlighterOptions | "prismjs" | "shiki" | false;
}
//#endregion
//#region src/node/typings/options.d.ts
interface ThemeOptions extends ThemeData$1<ThemeLocaleOptions>, AppearanceOptions, FeatureOptions, InfoOptions, LayoutOptions {
/**
* Theme markdown options
*
* 主题 Markdown 选项
*/
markdown?: ThemeMarkdownOptions;
/**
* Theme plugins options
*
* 主题插件选项
*/
plugins?: ThemePluginsOptions;
}
//#endregion
//#region src/node/compact/convertThemeOptions.d.ts
/**
* @deprecated You should use V2 standard options and avoid using it
* @param themeOptions - Theme options
* @returns Converted theme options
*/
declare const convertThemeOptions: (themeOptions: Record<string, unknown>) => ThemeOptions;
//#endregion
//#region src/node/helpers.d.ts
declare const navbar: ThemeNavbarHelper;
declare const sidebar: ThemeSidebarHelper;
declare const arraySidebar: ThemeSidebarArrayHelper;
declare const objectSidebar: ThemeSidebarObjectHelper;
declare const backToTop: ThemeBackToTopPluginHelper;
declare const blog: ThemeBlogPluginHelper;
declare const catalog: ThemeCatalogPluginHelper;
declare const comment: ThemeCommentPluginHelper;
declare const components: ThemeComponentPluginHelper;
declare const copyCode: ThemeCopyCodePluginHelper;
declare const copyright: ThemeCopyrightPluginHelper;
declare const feed: ThemeFeedPluginHelper;
declare const git: ThemeGitPluginHelper;
declare const linksCheck: ThemeLinksCheckPluginHelper;
declare const notice: ThemeNoticePluginHelper;
declare const photoSwipe: ThemePhotoSwipePluginHelper;
declare const prismjs: ThemePrismJsPluginHelper;
declare const pwa: ThemePwaPluginHelper;
declare const readingTime: ThemeReadingTimePluginHelper;
declare const redirect: ThemeRedirectPluginHelper;
declare const revealjs: ThemeRevealPluginHelper;
declare const seo: ThemeSEOPluginHelper;
declare const shiki: ThemeShikiPluginHelper;
declare const sitemap: ThemeSitemapPluginHelper;
declare const watermark: ThemeWatermarkPluginHelper;
//#endregion
//#region src/node/hopeTheme.d.ts
/**
* VuePress Theme Hope
*
* @param themeOptions - Theme options
* @param behaviorOptions - Theme behavior options
* @returns VuePress theme instance
*/
declare const hopeTheme: (themeOptions: ThemeOptions, behaviorOptions?: ThemeBehaviorOptions | boolean) => ThemeFunction;
//#endregion
//#region src/node/locales/index.d.ts
declare const themeLocaleInfo: DefaultLocaleInfo<ThemeLocaleData>;
//#endregion
//#region src/node/config/getEncryptConfig.d.ts
declare const getEncryptConfig: ({
admin,
config,
global
}?: EncryptOptions) => EncryptConfig;
//#endregion
//#region src/node/config/getSocialMediaIcons.d.ts
declare const getSocialMediaIcons: (themeData: ThemeData) => Record<string, string>;
//#endregion
//#region src/node/config/getThemeStatus.d.ts
interface BlogTypeInfo {
key: string;
path: string;
}
interface ThemeStatus {
enableBlog: boolean;
enableCatalog: boolean;
enableEncrypt: boolean;
enableIcon: boolean;
enableReadingTime: boolean;
blogTypes: BlogTypeInfo[];
isI18nProject: boolean;
hasRepo: boolean;
}
declare const getThemeStatus: (app: App, themeOptions: ThemeOptions) => ThemeStatus;
//#endregion
//#region src/node/config/getThemeData.d.ts
/**
* Get client-side `themeData`
*
* @param app - VuePress app instance
* @param themeOptions - Theme options
* @param themeStatus - Theme status
* @returns Theme data for client
*/
declare const getThemeData: (app: App, {
encrypt,
...themeOptions
}: ThemeOptions, {
enableBlog,
enableEncrypt
}: ThemeStatus) => ThemeData;
//#endregion
//#region src/node/extendsBundlerOptions.d.ts
declare const extendsBundlerOptions: (bundlerOptions: unknown, app: App, custom?: boolean) => void;
//#endregion
//#region src/node/plugins/getPlugins.d.ts
/**
* Get theme plugins
*
* @param app - VuePress app
* @param themeData - Theme data
* @param options - Theme options
* @param compact - Whether to use compact mode
* @returns Theme plugins
*/
declare const getPlugins: (app: App, themeData: ThemeData, {
markdown: markdownOptions,
plugins: pluginsOptions,
...options
}: Pick<ThemeOptions, "hostname" | "hotReload" | "favicon" | "plugins" | "markdown">, compact?: boolean) => PluginConfig;
//#endregion
//#region src/node/plugins/prismjs.d.ts
/**
* Composition Api to use `@vuepress/plugin-prismjs`
*
* @param app - VuePress app instance
* @param options - User options
*/
declare const usePrismjsPlugin: (app: App, options?: PrismjsPluginOptions) => void;
/**
* Composition Api to remove `@vuepress/plugin-prismjs`
*
* @param app - VuePress app instance
*/
declare const removePrismjsPlugin: (app: App) => void;
//#endregion
//#region src/node/plugins/shiki.d.ts
/**
* Composition Api to use `@vuepress/plugin-shiki`
*
* @param app - VuePress app
* @param options - Shiki plugin options
*/
declare const useShikiPlugin: (app: App, options?: ShikiPluginOptions) => void;
/**
* Composition Api to remove `@vuepress/plugin-shiki`
*
* @param app - VuePress app
*/
declare const removeShikiPlugin: (app: App) => void;
//#endregion
//#region src/node/plugins/usePlugins.d.ts
/**
* Use plugins to ensure they apply first
*
* @param app - VuePress app instance
* @param themeData - Theme data
* @param highlighter - Highlighter options
* @param plugins - User plugins options
* @param hotReload - Is hot reload mode
* @param behavior - Theme behavior options
*/
declare const usePlugins: (app: App, themeData: ThemeData, {
highlighter
}: ThemeMarkdownOptions, plugins: ThemePluginsOptions, hotReload: boolean, behavior: ThemeBehaviorOptions) => void;
//#endregion
//#region src/node/prepare/prepareConfigFile.d.ts
declare const prepareConfigFile: (app: App, {
enableCatalog,
enableBlog,
enableEncrypt,
enableIcon
}: ThemeStatus, {
custom
}: ThemeBehaviorOptions) => Promise<string>;
//#endregion
//#region src/node/prepare/prepareHighLighterScss.d.ts
declare const prepareHighLighterScss: (app: App) => Promise<void>;
//#endregion
//#region src/node/prepare/prepareSocialMediaIcons.d.ts
declare const prepareSocialMediaIcons: (app: App, icons?: Record<string, string> | null) => Promise<void>;
//#endregion
//#region src/node/prepare/sidebar/getSidebarInfo.d.ts
interface ThemeSidebarInfoOptions {
pages: Page[];
sorters: SidebarSorterFunction[];
scope: string;
}
declare const getSidebarInfo: ({
pages,
sorters,
scope
}: ThemeSidebarInfoOptions) => SidebarInfo[];
//#endregion
//#region src/node/prepare/sidebar/getSidebarSorter.d.ts
declare const sidebarReadmeSorter: (infoA: SidebarInfo, infoB: SidebarInfo) => number;
declare const sidebarOrderSorter: (infoA: SidebarInfo, infoB: SidebarInfo) => number;
declare const sidebarDateSorter: (infoA: SidebarInfo, infoB: SidebarInfo) => number;
declare const sidebarDateDescSorter: (infoA: SidebarInfo, infoB: SidebarInfo) => number;
declare const sidebarFilenameSorter: (infoA: SidebarInfo, infoB: SidebarInfo) => number;
declare const sidebarTitleSorter: (infoA: SidebarInfo, infoB: SidebarInfo) => number;
declare const getSidebarSorter: (sorter?: SidebarSorter) => SidebarSorterFunction[];
//#endregion
//#region src/node/prepare/sidebar/getStructureInfo.d.ts
interface FileInfo {
type: "file";
filename: string;
path: string;
}
interface DirInfo {
type: "dir";
dirname: string;
path: string;
children: StructureInfo[];
}
type StructureInfo = DirInfo | FileInfo;
declare const getStructureInfo: (pages: Page[], scope: string) => StructureInfo[];
//#endregion
//#region src/node/prepare/sidebar/getTitleFromFilename.d.ts
declare const getTitleFromFilename: (filename: string) => string;
//#endregion
//#region src/node/prepare/sidebar/prepareSidebarData.d.ts
declare const getSidebarData: (app: App, themeData: ThemeData, sorter?: SidebarSorter) => SidebarOptions;
declare const prepareSidebarData: (app: App, themeData: ThemeData, sorter?: SidebarSorter) => Promise<void>;
//#endregion
export { AppearanceConfig, AppearanceLocaleData, AppearanceOptions, ArticleInfoData, Author, AuthorInfo, AuthorName, AutoLinkOptions, BlogLocaleConfig, BlogLocaleData, BlogLocaleOptions, BlogOptions, BlogTypeInfo, DarkModeOptions, DeprecatedAppearanceOptions, DeprecatedBlogLocaleData, DeprecatedLayoutOptions, DeprecatedThemePluginsOptions, DirInfo, DocsRepoLocaleOptions, EncryptConfig, EncryptLocaleData, EncryptOptions, FeatureConfig, FeatureLocaleConfig, FeatureLocaleData, FeatureLocaleOptions, FeatureOptions, FileInfo, FooterLocaleOptions, InfoConfig, InfoOptions, LayoutLocaleConfig, LayoutLocaleData, LayoutLocaleOptions, LayoutOptions, MarkdownHighlighterOptions, MetaLocaleOptions, MetaLocateData, NavGroup, NavItemOptions, NavbarComponent, NavbarGroupOptions, NavbarLayoutOptions, NavbarLinkOptions, NavbarLocaleData, NavbarLocaleOptions, NavbarOptions, OutlookLocaleData, PageInfoData, PageInfoType, PageType, PaginationLocaleData, PasswordConfig, PasswordOptions, PortfolioMedia, RouteLocaleData, SidebarArrayOptions, SidebarDirInfo, SidebarFileInfo, SidebarGroupOptions, SidebarInfo, SidebarItemOptions, SidebarLinkOptions, SidebarLocaleOptions, SidebarObjectOptions, SidebarOptions, SidebarSorter, SidebarSorterFunction, SidebarSorterKeyword, SidebarStructureOptions, StructureInfo, StructureSidebarDirOptions, ThemeBackToTopPluginHelper, ThemeBasePageFrontmatter, ThemeBehaviorOptions, ThemeBlogHomePageFrontmatter, ThemeBlogHomeProjectOptions, ThemeBlogPluginHelper, ThemeCatalogPluginHelper, ThemeCommentPluginHelper, ThemeComponentPluginHelper, ThemeCopyCodePluginHelper, ThemeCopyrightPluginHelper, ThemeData, ThemeFeedPluginHelper, ThemeGitPluginHelper, ThemeHomePageFrontmatter, ThemeLinksCheckPluginHelper, ThemeLocaleConfig, ThemeLocaleData, ThemeLocaleOptions, ThemeMarkdownOptions, ThemeNavbarHelper, ThemeNormalPageFrontmatter, ThemeNoticePluginHelper, ThemeOptions, ThemePageData, ThemePhotoSwipePluginHelper, ThemePluginsOptions, ThemePortfolioFrontmatter, ThemePrismJsPluginHelper, ThemeProjectHomeActionOptions, ThemeProjectHomeFeatureItem, ThemeProjectHomeFeatureOptions, ThemeProjectHomeHighlightItem, ThemeProjectHomeHighlightOptions, ThemeProjectHomePageFrontmatter, ThemePwaPluginHelper, ThemeReadingTimePluginHelper, ThemeRedirectPluginHelper, ThemeRevealPluginHelper, ThemeSEOPluginHelper, ThemeShikiPluginHelper, ThemeSidebarArrayHelper, ThemeSidebarHelper, ThemeSidebarInfoOptions, ThemeSidebarObjectHelper, ThemeSitemapPluginHelper, ThemeStatus, ThemeWatermarkPluginHelper, arraySidebar, backToTop, blog, catalog, checkLegacyStyle, comment, components, convertFrontmatter, convertNavbarLayoutOptions, convertNavbarOptions, convertSidebarOptions, convertThemeOptions, copyCode, copyright, extendsBundlerOptions, feed, getAuthor, getCategory, getEncryptConfig, getPlugins, getSidebarData, getSidebarInfo, getSidebarSorter, getSocialMediaIcons, getStringArray, getStructureInfo, getTag, getThemeData, getThemeStatus, getTitleFromFilename, git, hopeTheme, linksCheck, navbar, notice, objectSidebar, photoSwipe, prepareConfigFile, prepareHighLighterScss, prepareSidebarData, prepareSocialMediaIcons, prismjs, pwa, readingTime, redirect, removePrismjsPlugin, removeShikiPlugin, revealjs, seo, shiki, sidebar, sidebarDateDescSorter, sidebarDateSorter, sidebarFilenameSorter, sidebarOrderSorter, sidebarReadmeSorter, sidebarTitleSorter, sitemap, themeLocaleInfo, usePlugins, usePrismjsPlugin, useShikiPlugin, watermark };
//# sourceMappingURL=index.d.ts.map