@rspress/shared 1.0.2 → 1.1.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/dist/index.d.ts +14 -2
- package/dist/index.js +230 -7253
- package/dist/index.mjs +229 -7253
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
@@ -288,7 +288,10 @@ interface RspressPlugin {
|
|
288
288
|
/**
|
289
289
|
* Modify doc config.
|
290
290
|
*/
|
291
|
-
config?: (config: UserConfig
|
291
|
+
config?: (config: UserConfig, utils: {
|
292
|
+
addPlugin: (plugin: RspressPlugin) => void;
|
293
|
+
removePlugin: (pluginName: string) => void;
|
294
|
+
}) => UserConfig | Promise<UserConfig>;
|
292
295
|
/**
|
293
296
|
* Callback before build
|
294
297
|
*/
|
@@ -620,6 +623,10 @@ interface MarkdownOptions {
|
|
620
623
|
* Register global components in mdx files
|
621
624
|
*/
|
622
625
|
globalComponents?: string[];
|
626
|
+
/**
|
627
|
+
* Register prism languages
|
628
|
+
*/
|
629
|
+
highlightLanguages?: (string | [string, string])[];
|
623
630
|
/**
|
624
631
|
* Whether to enable mdx-rs, default is true
|
625
632
|
*/
|
@@ -657,6 +664,11 @@ declare function replaceLang(rawUrl: string, lang: {
|
|
657
664
|
current: string;
|
658
665
|
default: string;
|
659
666
|
}, base?: string): string;
|
667
|
+
declare function replaceVersion(rawUrl: string, version: {
|
668
|
+
current: string;
|
669
|
+
target: string;
|
670
|
+
default: string;
|
671
|
+
}, base?: string): string;
|
660
672
|
declare const omit: (obj: Record<string, unknown>, keys: string[]) => {
|
661
673
|
[x: string]: unknown;
|
662
674
|
};
|
@@ -672,4 +684,4 @@ declare function removeBase(url: string, base: string): string;
|
|
672
684
|
declare function withoutHash(url: string): string;
|
673
685
|
declare const mergeDocConfig: (...configs: UserConfig[]) => UserConfig;
|
674
686
|
|
675
|
-
export { APPEARANCE_KEY, AdditionalPage, BaseRuntimePageInfo, Config, Config$1 as DefaultThemeConfig, DocFooter, EditLink, Feature, Footer, FrontMatterMeta, HASH_REGEXP, Header, Hero, Image, LocalSearchOptions, Locale, LocaleConfig, LocaleLink, LocaleLinks, MDX_REGEXP, MarkdownOptions, NavItem, NavItemWithChildren, NavItemWithLink, NavItemWithLinkAndChildren, NormalizedConfig, NormalizedConfig as NormalizedDefaultThemeConfig, NormalizedLocales, NormalizedSidebar, NormalizedSidebarGroup, PageData, PageIndexInfo, PageModule, PageType, RspressPlugin as Plugin, QUERY_REGEXP, RSPRESS_TEMP_DIR, RemotePageInfo, RemoteSearchIndexInfo, RemoteSearchOptions, ReplaceRule, Route, RouteMeta, RouteOptions, RspressPlugin, SEARCH_INDEX_NAME, SearchHooks, SearchOptions, Sidebar, SidebarGroup, SidebarItem, SiteData, SocialLink, SocialLinkIcon, UserConfig, addLeadingSlash, cleanUrl, inBrowser, isDebugMode, isExternalUrl, isProduction, isSCM, mergeDocConfig, normalizeHref, normalizePosixPath, normalizeSlash, omit, parseUrl, removeBase, removeLeadingSlash, removeTrailingSlash, replaceLang, slash, withBase, withoutBase, withoutHash, withoutLang };
|
687
|
+
export { APPEARANCE_KEY, AdditionalPage, BaseRuntimePageInfo, Config, Config$1 as DefaultThemeConfig, DocFooter, EditLink, Feature, Footer, FrontMatterMeta, HASH_REGEXP, Header, Hero, Image, LocalSearchOptions, Locale, LocaleConfig, LocaleLink, LocaleLinks, MDX_REGEXP, MarkdownOptions, NavItem, NavItemWithChildren, NavItemWithLink, NavItemWithLinkAndChildren, NormalizedConfig, NormalizedConfig as NormalizedDefaultThemeConfig, NormalizedLocales, NormalizedSidebar, NormalizedSidebarGroup, PageData, PageIndexInfo, PageModule, PageType, RspressPlugin as Plugin, QUERY_REGEXP, RSPRESS_TEMP_DIR, RemotePageInfo, RemoteSearchIndexInfo, RemoteSearchOptions, ReplaceRule, Route, RouteMeta, RouteOptions, RspressPlugin, SEARCH_INDEX_NAME, SearchHooks, SearchOptions, Sidebar, SidebarGroup, SidebarItem, SiteData, SocialLink, SocialLinkIcon, UserConfig, addLeadingSlash, cleanUrl, inBrowser, isDebugMode, isExternalUrl, isProduction, isSCM, mergeDocConfig, normalizeHref, normalizePosixPath, normalizeSlash, omit, parseUrl, removeBase, removeLeadingSlash, removeTrailingSlash, replaceLang, replaceVersion, slash, withBase, withoutBase, withoutHash, withoutLang };
|