vitepress 2.0.0-alpha.20 → 2.0.0-alpha.21
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/README.md +27 -7
- package/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/client/app/components/ClientOnly.d.ts +2 -3
- package/dist/client/app/components/Content.d.ts +2 -3
- package/dist/client/app/composables/codeGroups.d.ts +2 -3
- package/dist/client/app/composables/copyCode.d.ts +2 -3
- package/dist/client/app/composables/copyCode.js +1 -1
- package/dist/client/app/composables/head.d.ts +2 -3
- package/dist/client/app/composables/icon.d.ts +2 -3
- package/dist/client/app/composables/preFetch.d.ts +2 -3
- package/dist/client/app/composables/preFetch.js +29 -28
- package/dist/client/app/data.d.ts +5 -5
- package/dist/client/app/devtools.d.ts +2 -3
- package/dist/client/app/index.d.ts +2 -3
- package/dist/client/app/index.js +4 -6
- package/dist/client/app/router.d.ts +13 -8
- package/dist/client/app/router.js +16 -7
- package/dist/client/app/ssr.d.ts +2 -3
- package/dist/client/app/theme.d.ts +3 -4
- package/dist/client/app/utils.d.ts +9 -9
- package/dist/client/app/utils.js +10 -5
- package/dist/client/shared.d.ts +48 -27
- package/dist/client/shared.js +35 -2
- package/dist/client/theme-default/NotFound.vue +6 -4
- package/dist/client/theme-default/components/VPBackdrop.vue +1 -6
- package/dist/client/theme-default/components/VPBadge.vue +4 -3
- package/dist/client/theme-default/components/VPButton.d.vue.ts +4 -4
- package/dist/client/theme-default/components/VPButton.vue +5 -3
- package/dist/client/theme-default/components/VPContent.vue +3 -3
- package/dist/client/theme-default/components/VPDoc.vue +4 -3
- package/dist/client/theme-default/components/VPDocAsideOutline.vue +3 -3
- package/dist/client/theme-default/components/VPDocFooter.vue +5 -5
- package/dist/client/theme-default/components/VPDocFooterLastUpdated.vue +2 -2
- package/dist/client/theme-default/components/VPDocOutlineItem.vue +3 -4
- package/dist/client/theme-default/components/VPFeature.vue +6 -6
- package/dist/client/theme-default/components/VPFlyout.vue +5 -5
- package/dist/client/theme-default/components/VPFooter.vue +6 -10
- package/dist/client/theme-default/components/VPHero.d.vue.ts +3 -3
- package/dist/client/theme-default/components/VPHero.vue +6 -10
- package/dist/client/theme-default/components/VPHomeContent.vue +1 -2
- package/dist/client/theme-default/components/VPHomeHero.d.vue.ts +7 -7
- package/dist/client/theme-default/components/VPImage.vue +2 -2
- package/dist/client/theme-default/components/VPLink.d.vue.ts +2 -2
- package/dist/client/theme-default/components/VPLink.vue +6 -0
- package/dist/client/theme-default/components/VPLocalNav.vue +4 -5
- package/dist/client/theme-default/components/VPLocalNavOutlineDropdown.vue +4 -7
- package/dist/client/theme-default/components/VPLocalSearchBox.vue +7 -26
- package/dist/client/theme-default/components/VPMenuGroup.vue +4 -3
- package/dist/client/theme-default/components/VPMenuLink.vue +3 -3
- package/dist/client/theme-default/components/VPNav.vue +1 -2
- package/dist/client/theme-default/components/VPNavAppearance.vue +2 -1
- package/dist/client/theme-default/components/VPNavBar.vue +15 -20
- package/dist/client/theme-default/components/VPNavBarExtra.vue +1 -1
- package/dist/client/theme-default/components/VPNavBarHamburger.vue +8 -6
- package/dist/client/theme-default/components/VPNavBarSearch.vue +2 -2
- package/dist/client/theme-default/components/VPNavBarSearchButton.vue +2 -0
- package/dist/client/theme-default/components/VPNavBarTitle.vue +2 -2
- package/dist/client/theme-default/components/VPNavMenu.vue +1 -1
- package/dist/client/theme-default/components/VPNavMenuGroup.vue +3 -3
- package/dist/client/theme-default/components/VPNavMenuLink.vue +1 -1
- package/dist/client/theme-default/components/VPNavScreen.vue +1 -6
- package/dist/client/theme-default/components/VPNavTranslations.vue +7 -5
- package/dist/client/theme-default/components/VPSidebar.vue +5 -6
- package/dist/client/theme-default/components/VPSidebarItem.vue +7 -8
- package/dist/client/theme-default/components/VPSkipLink.vue +2 -2
- package/dist/client/theme-default/components/VPSponsors.d.vue.ts +1 -1
- package/dist/client/theme-default/components/VPSwitch.vue +5 -6
- package/dist/client/theme-default/components/VPSwitchAppearance.vue +1 -2
- package/dist/client/theme-default/components/VPTeamMembersItem.vue +5 -5
- package/dist/client/theme-default/components/VPTeamPageSection.vue +3 -4
- package/dist/client/theme-default/components/VPTeamPageTitle.vue +2 -2
- package/dist/client/theme-default/composables/data.d.ts +2 -3
- package/dist/client/theme-default/composables/edit-link.d.ts +2 -3
- package/dist/client/theme-default/composables/flyout.d.ts +3 -4
- package/dist/client/theme-default/composables/langs.d.ts +4 -5
- package/dist/client/theme-default/composables/layout.d.ts +5 -6
- package/dist/client/theme-default/composables/nav-overflow.d.ts +9 -10
- package/dist/client/theme-default/composables/nav.d.ts +7 -8
- package/dist/client/theme-default/composables/outline.d.ts +5 -6
- package/dist/client/theme-default/composables/prev-next.d.ts +2 -3
- package/dist/client/theme-default/composables/scroll-lock.d.ts +2 -11
- package/dist/client/theme-default/composables/scroll-lock.js +5 -12
- package/dist/client/theme-default/composables/sidebar.d.ts +4 -5
- package/dist/client/theme-default/composables/sponsor-grid.d.ts +5 -6
- package/dist/client/theme-default/fonts/inter-italic-cyrillic-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-cyrillic.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-greek-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-greek.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-latin-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-latin.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-symbols.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-italic-vietnamese.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-cyrillic-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-cyrillic.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-greek-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-greek.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-latin-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-latin.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-symbols.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-roman-vietnamese.woff2 +0 -0
- package/dist/client/theme-default/styles/components/vp-code-group.css +5 -8
- package/dist/client/theme-default/styles/components/vp-doc.css +49 -45
- package/dist/client/theme-default/styles/docsearch.css +3 -2
- package/dist/client/theme-default/styles/fonts.css +22 -9
- package/dist/client/theme-default/styles/icons.css +22 -8
- package/dist/client/theme-default/styles/vars.css +15 -0
- package/dist/client/theme-default/support/docsearch.d.ts +14 -15
- package/dist/client/theme-default/support/local-search.d.ts +9 -0
- package/dist/client/theme-default/support/local-search.js +31 -0
- package/dist/client/theme-default/support/lru.d.ts +2 -3
- package/dist/client/theme-default/support/reactivity.d.ts +2 -3
- package/dist/client/theme-default/support/sidebar.d.ts +6 -7
- package/dist/client/theme-default/support/translation.d.ts +2 -3
- package/dist/client/theme-default/support/utils.d.ts +6 -7
- package/dist/node/{chunk-BYTgXTwz.js → chunk-BjrVv9r8.js} +17133 -17242
- package/dist/node/cli.js +3 -6
- package/dist/node/index.d.ts +64 -50
- package/dist/node/index.js +1 -2
- package/dist/web-types.json +1 -1
- package/package.json +56 -57
- package/types/shared.d.ts +3 -3
package/dist/node/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as __commonJSMin, N as __toESM, T as resolveConfig, d as logVersion, f as clearCache, g as disposeMdItInstance, j as require_picocolors, l as build$1, n as createServer$1, o as init, r as serve } from "./chunk-
|
|
1
|
+
import { M as __commonJSMin, N as __toESM, T as resolveConfig, d as logVersion, f as clearCache, g as disposeMdItInstance, j as require_picocolors, l as build$1, n as createServer$1, o as init, r as serve } from "./chunk-BjrVv9r8.js";
|
|
2
2
|
import { createLogger } from "vite";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/node/shortcuts.ts
|
|
@@ -78,11 +78,8 @@ var import_minimist = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e
|
|
|
78
78
|
} else if (/^--no-.+/.test(arg)) key = arg.match(/^--no-(.+)/)[1], setArg(key, !1, arg);
|
|
79
79
|
else if (/^--.+/.test(arg)) key = arg.match(/^--(.+)/)[1], next = args[i + 1], next !== void 0 && !/^(-|--)[^-]/.test(next) && !flags.bools[key] && !flags.allBools && (!aliases[key] || !aliasIsBoolean(key)) ? (setArg(key, next, arg), i += 1) : /^(true|false)$/.test(next) ? (setArg(key, next === "true", arg), i += 1) : setArg(key, !flags.strings[key] || "", arg);
|
|
80
80
|
else if (/^-[^-]+/.test(arg)) {
|
|
81
|
-
for (var letters = arg.slice(1, -1).split(""), broken = !1, j = 0; j < letters.length; j++)
|
|
82
|
-
|
|
83
|
-
setArg(letters[j], next, arg);
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
81
|
+
for (var letters = arg.slice(1, -1).split(""), broken = !1, j = 0; j < letters.length; j++) if (next = arg.slice(j + 2), next === "-") setArg(letters[j], next, arg);
|
|
82
|
+
else {
|
|
86
83
|
if (/[A-Za-z]/.test(letters[j]) && next[0] === "=") {
|
|
87
84
|
setArg(letters[j], next.slice(1), arg), broken = !0;
|
|
88
85
|
break;
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BuildOptions, ConfigEnv, Logger, Plugin, ServerOptions, UserConfig as UserConfig$1, loadEnv } from "vite";
|
|
2
2
|
import { URL as URL$1 } from "node:url";
|
|
3
|
-
import { BuiltinLanguage, BuiltinTheme, CodeToHastOptions, Highlighter, LanguageInput, ShikiTransformer, ThemeRegistrationAny } from "shiki";
|
|
4
3
|
import { Transform, TransformOptions } from "node:stream";
|
|
4
|
+
import { BuiltinLanguage, BuiltinTheme, CodeToHastOptions, Highlighter, LanguageInput, ShikiTransformer, ThemeRegistrationAny } from "shiki";
|
|
5
5
|
import MarkdownIt, { Options, PluginSimple, PluginWithOptions, PluginWithParams, PresetName } from "markdown-it";
|
|
6
6
|
import { DefaultTheme } from "../../types/default-theme.js";
|
|
7
7
|
import { PageSplitSection } from "../../types/local-search.js";
|
|
@@ -58,7 +58,7 @@ declare class MarkdownItAsync extends MarkdownIt {
|
|
|
58
58
|
* Resolves the site data for a route, layering the matched locale and
|
|
59
59
|
* additional configs over the root config.
|
|
60
60
|
*/
|
|
61
|
-
declare function resolveSiteDataByRoute(siteData: SiteData$1, relativePath: string, filePath?: string): SiteData$1;
|
|
61
|
+
export declare function resolveSiteDataByRoute(siteData: SiteData$1, relativePath: string, filePath?: string): SiteData$1;
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/node/defaultTheme.d.ts
|
|
64
64
|
declare module '../../types/default-theme.js' {
|
|
@@ -641,7 +641,7 @@ interface TocPluginOptions {
|
|
|
641
641
|
linkClass?: string;
|
|
642
642
|
}
|
|
643
643
|
//#endregion
|
|
644
|
-
//#region node_modules/.pnpm/@mdit+plugin-anchor@1.1.3_markdown-it@14.3.
|
|
644
|
+
//#region node_modules/.pnpm/@mdit+plugin-anchor@1.1.3_markdown-it@14.3.2/node_modules/@mdit/plugin-anchor/dist/index.d.ts
|
|
645
645
|
/**
|
|
646
646
|
* Permalink generator function
|
|
647
647
|
*
|
|
@@ -737,7 +737,7 @@ interface AnchorOptions {
|
|
|
737
737
|
*/
|
|
738
738
|
type ResolvedAnchorOptions = AnchorOptions & Required<Pick<AnchorOptions, "getTokensText" | "level" | "slugify" | "tabIndex" | "uniqueSlugStartIndex">>;
|
|
739
739
|
//#endregion
|
|
740
|
-
//#region node_modules/.pnpm/@mdit+plugin-attrs@1.1.1_markdown-it@14.3.
|
|
740
|
+
//#region node_modules/.pnpm/@mdit+plugin-attrs@1.1.1_markdown-it@14.3.2/node_modules/@mdit/plugin-attrs/dist/index.d.ts
|
|
741
741
|
//#region src/helper/types.d.ts
|
|
742
742
|
interface AllowedAttrEntry {
|
|
743
743
|
/**
|
|
@@ -824,7 +824,7 @@ interface MarkdownItAttrsOptions extends Partial<DelimiterConfig> {
|
|
|
824
824
|
fenceAttrsOnPre?: boolean;
|
|
825
825
|
}
|
|
826
826
|
//#endregion
|
|
827
|
-
//#region node_modules/.pnpm/@mdit+plugin-emoji@1.1.1_markdown-it@14.3.
|
|
827
|
+
//#region node_modules/.pnpm/@mdit+plugin-emoji@1.1.1_markdown-it@14.3.2/node_modules/@mdit/plugin-emoji/dist/index.d.ts
|
|
828
828
|
//#region src/options.d.ts
|
|
829
829
|
interface EmojiPluginOptions$1 {
|
|
830
830
|
/**
|
|
@@ -861,7 +861,7 @@ interface EmojiPluginOptions$1 {
|
|
|
861
861
|
//#region src/full.d.ts
|
|
862
862
|
declare const fullEmoji: PluginWithOptions<EmojiPluginOptions$1>;
|
|
863
863
|
//#endregion
|
|
864
|
-
//#region node_modules/.pnpm/@mdit+plugin-tasklist@1.0.2_markdown-it@14.3.
|
|
864
|
+
//#region node_modules/.pnpm/@mdit+plugin-tasklist@1.0.2_markdown-it@14.3.2/node_modules/@mdit/plugin-tasklist/dist/index.d.ts
|
|
865
865
|
//#region src/options.d.ts
|
|
866
866
|
interface MarkdownItTaskListOptions {
|
|
867
867
|
/**
|
|
@@ -960,16 +960,16 @@ interface Options$3 {
|
|
|
960
960
|
//#endregion
|
|
961
961
|
//#region src/node/markdown/markdown.d.ts
|
|
962
962
|
type EmojiPluginOptions = NonNullable<Parameters<typeof fullEmoji>[1]>;
|
|
963
|
-
type ThemeOptions = ThemeRegistrationAny | BuiltinTheme | {
|
|
963
|
+
export type ThemeOptions = ThemeRegistrationAny | BuiltinTheme | {
|
|
964
964
|
light: ThemeRegistrationAny | BuiltinTheme;
|
|
965
965
|
dark: ThemeRegistrationAny | BuiltinTheme;
|
|
966
966
|
};
|
|
967
|
-
type MarkdownRenderer = MarkdownItAsync & {
|
|
967
|
+
export type MarkdownRenderer = MarkdownItAsync & {
|
|
968
968
|
options: {
|
|
969
969
|
highlight?: any;
|
|
970
970
|
};
|
|
971
971
|
};
|
|
972
|
-
interface MarkdownOptions extends MarkdownItAsyncOptions {
|
|
972
|
+
export interface MarkdownOptions extends MarkdownItAsyncOptions {
|
|
973
973
|
/**
|
|
974
974
|
* Configure the markdown-it instance before any plugins are applied.
|
|
975
975
|
*/
|
|
@@ -1218,12 +1218,12 @@ interface MarkdownOptions extends MarkdownItAsyncOptions {
|
|
|
1218
1218
|
*/
|
|
1219
1219
|
sfc?: SfcPluginOptions;
|
|
1220
1220
|
}
|
|
1221
|
-
declare function mergeMarkdownLocales(options?: MarkdownOptions, locales?: LocaleConfig): MarkdownOptions;
|
|
1222
|
-
declare function disposeMdItInstance(): void;
|
|
1221
|
+
export declare function mergeMarkdownLocales(options?: MarkdownOptions, locales?: LocaleConfig): MarkdownOptions;
|
|
1222
|
+
export declare function disposeMdItInstance(): void;
|
|
1223
1223
|
/**
|
|
1224
1224
|
* @experimental
|
|
1225
1225
|
*/
|
|
1226
|
-
declare function createMarkdownRenderer(srcDir: string, options?: MarkdownOptions, base?: string, logger?: Pick<Logger, 'warn'>, publicDir?: string): Promise<MarkdownRenderer>;
|
|
1226
|
+
export declare function createMarkdownRenderer(srcDir: string, options?: MarkdownOptions, base?: string, logger?: Pick<Logger, 'warn'>, publicDir?: string): Promise<MarkdownRenderer>;
|
|
1227
1227
|
//#endregion
|
|
1228
1228
|
//#region src/node/utils/glob.d.ts
|
|
1229
1229
|
interface GlobOptions {
|
|
@@ -1268,19 +1268,19 @@ interface RouteModule {
|
|
|
1268
1268
|
/**
|
|
1269
1269
|
* Helper for defining routes with type inference
|
|
1270
1270
|
*/
|
|
1271
|
-
declare function defineRoutes(loader: RouteModule): RouteModule;
|
|
1271
|
+
export declare function defineRoutes(loader: RouteModule): RouteModule;
|
|
1272
1272
|
type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
1273
|
-
declare function resolvePages(siteConfig: Optional<SiteConfig, 'pages' | 'dynamicRoutes' | 'rewrites'>, rebuildCache?: boolean): Promise<void>;
|
|
1273
|
+
export declare function resolvePages(siteConfig: Optional<SiteConfig, 'pages' | 'dynamicRoutes' | 'rewrites'>, rebuildCache?: boolean): Promise<void>;
|
|
1274
1274
|
//#endregion
|
|
1275
1275
|
//#region src/node/siteConfig.d.ts
|
|
1276
1276
|
/**
|
|
1277
1277
|
* A config object, or a function returning one. Both can be async.
|
|
1278
1278
|
*/
|
|
1279
|
-
type RawConfigExports<ThemeConfig = any> = Awaitable<UserConfig<ThemeConfig>> | (() => Awaitable<UserConfig<ThemeConfig>>);
|
|
1279
|
+
export type RawConfigExports<ThemeConfig = any> = Awaitable<UserConfig<ThemeConfig>> | (() => Awaitable<UserConfig<ThemeConfig>>);
|
|
1280
1280
|
/**
|
|
1281
1281
|
* Context passed to the `transformHead` and `transformHtml` build hooks.
|
|
1282
1282
|
*/
|
|
1283
|
-
interface TransformContext<ThemeConfig = any> {
|
|
1283
|
+
export interface TransformContext<ThemeConfig = any> {
|
|
1284
1284
|
/**
|
|
1285
1285
|
* Name of the output HTML file, relative to the output directory.
|
|
1286
1286
|
*/
|
|
@@ -1321,7 +1321,7 @@ interface TransformContext<ThemeConfig = any> {
|
|
|
1321
1321
|
/**
|
|
1322
1322
|
* Context passed to the `transformPageData` hook.
|
|
1323
1323
|
*/
|
|
1324
|
-
interface TransformPageContext<ThemeConfig = any> {
|
|
1324
|
+
export interface TransformPageContext<ThemeConfig = any> {
|
|
1325
1325
|
/**
|
|
1326
1326
|
* The resolved site config.
|
|
1327
1327
|
*/
|
|
@@ -1330,7 +1330,7 @@ interface TransformPageContext<ThemeConfig = any> {
|
|
|
1330
1330
|
/**
|
|
1331
1331
|
* VitePress config, usually defined in `.vitepress/config.[ext]`.
|
|
1332
1332
|
*/
|
|
1333
|
-
interface UserConfig<ThemeConfig = any> extends LocaleSpecificConfig<ThemeConfig> {
|
|
1333
|
+
export interface UserConfig<ThemeConfig = any> extends LocaleSpecificConfig<ThemeConfig> {
|
|
1334
1334
|
/**
|
|
1335
1335
|
* Config to inherit from. Its values are recursively merged with (and
|
|
1336
1336
|
* overridden by) this config. Commonly used to extend a base config
|
|
@@ -1391,6 +1391,16 @@ interface UserConfig<ThemeConfig = any> extends LocaleSpecificConfig<ThemeConfig
|
|
|
1391
1391
|
* @example 'https://cdn.example.com/'
|
|
1392
1392
|
*/
|
|
1393
1393
|
assetsBase?: string;
|
|
1394
|
+
/**
|
|
1395
|
+
* Number of subdirectories to spread the generated assets over
|
|
1396
|
+
* (`assetsDir/0` ... `assetsDir/N-1`) for hosts that cap the files per
|
|
1397
|
+
* directory. Page chunks and imported assets are distributed by a hash of
|
|
1398
|
+
* their name; shared chunks stay in `assetsDir/chunks`.
|
|
1399
|
+
*
|
|
1400
|
+
* @experimental
|
|
1401
|
+
* @example 4
|
|
1402
|
+
*/
|
|
1403
|
+
assetsShards?: number;
|
|
1394
1404
|
/**
|
|
1395
1405
|
* Options for the generated icon stylesheet (`vp-icons.*.css`).
|
|
1396
1406
|
*/
|
|
@@ -1563,7 +1573,7 @@ interface UserConfig<ThemeConfig = any> extends LocaleSpecificConfig<ThemeConfig
|
|
|
1563
1573
|
/**
|
|
1564
1574
|
* The resolved config, as exposed to build hooks and plugins.
|
|
1565
1575
|
*/
|
|
1566
|
-
interface SiteConfig<ThemeConfig = any> extends Pick<UserConfig<ThemeConfig>, 'markdown' | 'vue' | 'vite' | 'shouldPreload' | 'router' | 'mpa' | 'lastUpdated' | 'ignoreDeadLinks' | 'cleanUrls' | 'useWebFonts' | 'postRender' | 'buildEnd' | 'transformHead' | 'transformHtml' | 'transformPageData' | 'sitemap' | 'icons'> {
|
|
1576
|
+
export interface SiteConfig<ThemeConfig = any> extends Pick<UserConfig<ThemeConfig>, 'markdown' | 'vue' | 'vite' | 'shouldPreload' | 'router' | 'mpa' | 'lastUpdated' | 'ignoreDeadLinks' | 'cleanUrls' | 'useWebFonts' | 'postRender' | 'buildEnd' | 'transformHead' | 'transformHtml' | 'transformPageData' | 'sitemap' | 'icons'> {
|
|
1567
1577
|
/**
|
|
1568
1578
|
* Absolute path of the project root (the directory containing
|
|
1569
1579
|
* `.vitepress`).
|
|
@@ -1607,6 +1617,10 @@ interface SiteConfig<ThemeConfig = any> extends Pick<UserConfig<ThemeConfig>, 'm
|
|
|
1607
1617
|
* URL prefix for built assets, normalized to end with a slash.
|
|
1608
1618
|
*/
|
|
1609
1619
|
assetsBase?: string;
|
|
1620
|
+
/**
|
|
1621
|
+
* Number of subdirectories the generated assets are spread over.
|
|
1622
|
+
*/
|
|
1623
|
+
assetsShards?: number;
|
|
1610
1624
|
/**
|
|
1611
1625
|
* Absolute path of the cache directory.
|
|
1612
1626
|
*/
|
|
@@ -1646,34 +1660,34 @@ interface SiteConfig<ThemeConfig = any> extends Pick<UserConfig<ThemeConfig>, 'm
|
|
|
1646
1660
|
}
|
|
1647
1661
|
//#endregion
|
|
1648
1662
|
//#region src/node/config.d.ts
|
|
1649
|
-
declare function normalizeSiteBase(base?: string): string;
|
|
1650
|
-
declare function normalizeAssetsBase(assetsBase: string): string;
|
|
1651
|
-
type UserConfigFn<ThemeConfig> = (env: ConfigEnv) => Awaitable<UserConfig<ThemeConfig>>;
|
|
1652
|
-
type UserConfigExport<ThemeConfig> = Awaitable<UserConfig<ThemeConfig>> | UserConfigFn<ThemeConfig>;
|
|
1663
|
+
export declare function normalizeSiteBase(base?: string): string;
|
|
1664
|
+
export declare function normalizeAssetsBase(assetsBase: string): string;
|
|
1665
|
+
export type UserConfigFn<ThemeConfig> = (env: ConfigEnv) => Awaitable<UserConfig<ThemeConfig>>;
|
|
1666
|
+
export type UserConfigExport<ThemeConfig> = Awaitable<UserConfig<ThemeConfig>> | UserConfigFn<ThemeConfig>;
|
|
1653
1667
|
/**
|
|
1654
1668
|
* Type config helper
|
|
1655
1669
|
*/
|
|
1656
|
-
declare function defineConfig<ThemeConfig = DefaultTheme.Config>(config: UserConfig<NoInfer<ThemeConfig>>): UserConfig<NoInfer<ThemeConfig>>;
|
|
1657
|
-
type AdditionalConfigFn<ThemeConfig> = (env: ConfigEnv) => Awaitable<AdditionalConfig<ThemeConfig>>;
|
|
1658
|
-
type AdditionalConfigExport<ThemeConfig> = Awaitable<AdditionalConfig<ThemeConfig>> | AdditionalConfigFn<ThemeConfig>;
|
|
1670
|
+
export declare function defineConfig<ThemeConfig = DefaultTheme.Config>(config: UserConfig<NoInfer<ThemeConfig>>): UserConfig<NoInfer<ThemeConfig>>;
|
|
1671
|
+
export type AdditionalConfigFn<ThemeConfig> = (env: ConfigEnv) => Awaitable<AdditionalConfig<ThemeConfig>>;
|
|
1672
|
+
export type AdditionalConfigExport<ThemeConfig> = Awaitable<AdditionalConfig<ThemeConfig>> | AdditionalConfigFn<ThemeConfig>;
|
|
1659
1673
|
/**
|
|
1660
1674
|
* Type config helper for additional/locale-specific config
|
|
1661
1675
|
*/
|
|
1662
|
-
declare function defineAdditionalConfig<ThemeConfig = DefaultTheme.Config>(config: AdditionalConfig<NoInfer<ThemeConfig>>): AdditionalConfig<NoInfer<ThemeConfig>>;
|
|
1676
|
+
export declare function defineAdditionalConfig<ThemeConfig = DefaultTheme.Config>(config: AdditionalConfig<NoInfer<ThemeConfig>>): AdditionalConfig<NoInfer<ThemeConfig>>;
|
|
1663
1677
|
/**
|
|
1664
1678
|
* Type config helper for custom theme config
|
|
1665
1679
|
*
|
|
1666
1680
|
* @deprecated use `defineConfig` instead
|
|
1667
1681
|
*/
|
|
1668
|
-
declare function defineConfigWithTheme<ThemeConfig>(config: UserConfig<ThemeConfig>): UserConfig<ThemeConfig>;
|
|
1669
|
-
declare function resolveConfig(root?: string, command?: 'serve' | 'build', mode?: string): Promise<SiteConfig>;
|
|
1670
|
-
declare function isAdditionalConfigFile(path: string): boolean;
|
|
1671
|
-
declare function resolveUserConfig(root: string, command: 'serve' | 'build', mode: string): Promise<[UserConfig, configPath: string | undefined, configDeps: string[]]>;
|
|
1672
|
-
declare function mergeConfig<A extends object, B extends object>(a: A, b: B, isRoot?: boolean): A & B;
|
|
1673
|
-
declare function resolveSiteData(root: string, userConfig?: UserConfig, command?: 'serve' | 'build', mode?: string): Promise<SiteData$2>;
|
|
1682
|
+
export declare function defineConfigWithTheme<ThemeConfig>(config: UserConfig<ThemeConfig>): UserConfig<ThemeConfig>;
|
|
1683
|
+
export declare function resolveConfig(root?: string, command?: 'serve' | 'build', mode?: string): Promise<SiteConfig>;
|
|
1684
|
+
export declare function isAdditionalConfigFile(path: string): boolean;
|
|
1685
|
+
export declare function resolveUserConfig(root: string, command: 'serve' | 'build', mode: string): Promise<[UserConfig, configPath: string | undefined, configDeps: string[]]>;
|
|
1686
|
+
export declare function mergeConfig<A extends object, B extends object>(a: A, b: B, isRoot?: boolean): A & B;
|
|
1687
|
+
export declare function resolveSiteData(root: string, userConfig?: UserConfig, command?: 'serve' | 'build', mode?: string): Promise<SiteData$2>;
|
|
1674
1688
|
//#endregion
|
|
1675
1689
|
//#region src/node/build/build.d.ts
|
|
1676
|
-
declare function build(root?: string, buildOptions?: BuildOptions & {
|
|
1690
|
+
export declare function build(root?: string, buildOptions?: BuildOptions & {
|
|
1677
1691
|
base?: string;
|
|
1678
1692
|
assetsBase?: string;
|
|
1679
1693
|
mpa?: string;
|
|
@@ -1681,7 +1695,7 @@ declare function build(root?: string, buildOptions?: BuildOptions & {
|
|
|
1681
1695
|
}): Promise<void>;
|
|
1682
1696
|
//#endregion
|
|
1683
1697
|
//#region src/node/contentLoader.d.ts
|
|
1684
|
-
interface ContentOptions<T = ContentData[]> {
|
|
1698
|
+
export interface ContentOptions<T = ContentData[]> {
|
|
1685
1699
|
/**
|
|
1686
1700
|
* Include src?
|
|
1687
1701
|
* @default false
|
|
@@ -1722,7 +1736,7 @@ interface ContentOptions<T = ContentData[]> {
|
|
|
1722
1736
|
*/
|
|
1723
1737
|
globOptions?: GlobOptions;
|
|
1724
1738
|
}
|
|
1725
|
-
interface ContentData {
|
|
1739
|
+
export interface ContentData {
|
|
1726
1740
|
url: string;
|
|
1727
1741
|
src: string | undefined;
|
|
1728
1742
|
html: string | undefined;
|
|
@@ -1733,7 +1747,7 @@ interface ContentData {
|
|
|
1733
1747
|
* Create a loader object that can be directly used as the default export
|
|
1734
1748
|
* of a data loader file.
|
|
1735
1749
|
*/
|
|
1736
|
-
declare function createContentLoader<T = ContentData[]>(
|
|
1750
|
+
export declare function createContentLoader<T = ContentData[]>(
|
|
1737
1751
|
/**
|
|
1738
1752
|
* files to glob / watch - relative to srcDir
|
|
1739
1753
|
*/
|
|
@@ -1746,13 +1760,13 @@ watch: string | string[], options?: ContentOptions<T>): {
|
|
|
1746
1760
|
};
|
|
1747
1761
|
//#endregion
|
|
1748
1762
|
//#region src/node/init/init.d.ts
|
|
1749
|
-
declare const ScaffoldThemeType: {
|
|
1763
|
+
export declare const ScaffoldThemeType: {
|
|
1750
1764
|
readonly Default: "default theme";
|
|
1751
1765
|
readonly DefaultCustom: "default theme + customization";
|
|
1752
1766
|
readonly Custom: "custom theme";
|
|
1753
1767
|
};
|
|
1754
|
-
type ScaffoldThemeType = (typeof ScaffoldThemeType)[keyof typeof ScaffoldThemeType];
|
|
1755
|
-
interface ScaffoldOptions {
|
|
1768
|
+
export type ScaffoldThemeType = (typeof ScaffoldThemeType)[keyof typeof ScaffoldThemeType];
|
|
1769
|
+
export interface ScaffoldOptions {
|
|
1756
1770
|
root?: string;
|
|
1757
1771
|
srcDir?: string;
|
|
1758
1772
|
title?: string;
|
|
@@ -1763,8 +1777,8 @@ interface ScaffoldOptions {
|
|
|
1763
1777
|
addNpmScriptsPrefix?: boolean;
|
|
1764
1778
|
npmScriptsPrefix?: string;
|
|
1765
1779
|
}
|
|
1766
|
-
declare function init(root?: string): Promise<void>;
|
|
1767
|
-
declare function scaffold({ root: root_, srcDir: srcDir_, title, description, theme, useTs, injectNpmScripts, addNpmScriptsPrefix, npmScriptsPrefix }: ScaffoldOptions): Promise<string>;
|
|
1780
|
+
export declare function init(root?: string): Promise<void>;
|
|
1781
|
+
export declare function scaffold({ root: root_, srcDir: srcDir_, title, description, theme, useTs, injectNpmScripts, addNpmScriptsPrefix, npmScriptsPrefix }: ScaffoldOptions): Promise<string>;
|
|
1768
1782
|
//#endregion
|
|
1769
1783
|
//#region src/node/plugins/staticDataPlugin.d.ts
|
|
1770
1784
|
interface LoaderModule<T = any> {
|
|
@@ -1777,7 +1791,7 @@ interface LoaderModule<T = any> {
|
|
|
1777
1791
|
/**
|
|
1778
1792
|
* Helper for defining loaders with type inference
|
|
1779
1793
|
*/
|
|
1780
|
-
declare function defineLoader<T>(loader: LoaderModule<T>): LoaderModule<T>;
|
|
1794
|
+
export declare function defineLoader<T>(loader: LoaderModule<T>): LoaderModule<T>;
|
|
1781
1795
|
//#endregion
|
|
1782
1796
|
//#region src/node/postcss/isolateStyles.d.ts
|
|
1783
1797
|
type Options$2 = {
|
|
@@ -1785,7 +1799,7 @@ type Options$2 = {
|
|
|
1785
1799
|
ignoreFiles?: RegExp[];
|
|
1786
1800
|
prefix?: string;
|
|
1787
1801
|
};
|
|
1788
|
-
declare function postcssIsolateStyles({ includeFiles, ignoreFiles, prefix }?: Options$2): Plugin$1;
|
|
1802
|
+
export declare function postcssIsolateStyles({ includeFiles, ignoreFiles, prefix }?: Options$2): Plugin$1;
|
|
1789
1803
|
//#endregion
|
|
1790
1804
|
//#region node_modules/.pnpm/@polka+url@1.0.0-next.29/node_modules/@polka/url/index.d.ts
|
|
1791
1805
|
interface ParsedURL {
|
|
@@ -1866,22 +1880,22 @@ interface Polka<T extends Request = Request> extends Trouter<Middleware<T>> {
|
|
|
1866
1880
|
}
|
|
1867
1881
|
//#endregion
|
|
1868
1882
|
//#region src/node/serve/serve.d.ts
|
|
1869
|
-
interface ServeOptions {
|
|
1883
|
+
export interface ServeOptions {
|
|
1870
1884
|
base?: string;
|
|
1871
1885
|
assetsBase?: string;
|
|
1872
1886
|
root?: string;
|
|
1873
1887
|
port?: number;
|
|
1874
1888
|
}
|
|
1875
|
-
declare function serve(options?: ServeOptions): Promise<Polka<Request>>;
|
|
1889
|
+
export declare function serve(options?: ServeOptions): Promise<Polka<Request>>;
|
|
1876
1890
|
//#endregion
|
|
1877
1891
|
//#region src/node/server.d.ts
|
|
1878
|
-
declare function createServer(root?: string // for backwards compatibility
|
|
1892
|
+
export declare function createServer(root?: string // for backwards compatibility
|
|
1879
1893
|
, serverOptions?: ServerOptions & {
|
|
1880
1894
|
base?: string;
|
|
1881
1895
|
}, restartServer?: () => Promise<void>, config?: SiteConfig): Promise<import("vite").ViteDevServer>;
|
|
1882
1896
|
//#endregion
|
|
1883
1897
|
//#region src/node/utils/getGitTimestamp.d.ts
|
|
1884
|
-
declare function cacheAllGitTimestamps(root: string, pathspec?: string[]): Promise<void>;
|
|
1885
|
-
declare function getGitTimestamp(file: string): Promise<number>;
|
|
1898
|
+
export declare function cacheAllGitTimestamps(root: string, pathspec?: string[]): Promise<void>;
|
|
1899
|
+
export declare function getGitTimestamp(file: string): Promise<number>;
|
|
1886
1900
|
//#endregion
|
|
1887
|
-
export {
|
|
1901
|
+
export { type ConfigEnv, type DefaultTheme, type HeadConfig, type Header, type LoaderModule, type MarkdownLocaleOptions, type Plugin, type ResolvedRouteConfig, type RouteModule, type SiteData, loadEnv };
|
package/dist/node/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { ScaffoldThemeType, build, cacheAllGitTimestamps, createContentLoader, createMarkdownRenderer, createServer, defineAdditionalConfig, defineConfig, defineConfigWithTheme, defineLoader, defineRoutes, disposeMdItInstance, getGitTimestamp, init, isAdditionalConfigFile, loadEnv, mergeConfig, mergeMarkdownLocales, normalizeAssetsBase, normalizeSiteBase, postcssIsolateStyles, resolveConfig, resolvePages, resolveSiteData, resolveSiteDataByRoute, resolveUserConfig, scaffold, serve };
|
|
1
|
+
export { a as ScaffoldThemeType, l as build, p as cacheAllGitTimestamps, c as createContentLoader, h as createMarkdownRenderer, n as createServer, v as defineAdditionalConfig, y as defineConfig, b as defineConfigWithTheme, u as defineLoader, O as defineRoutes, g as disposeMdItInstance, m as getGitTimestamp, o as init, x as isAdditionalConfigFile, t as loadEnv, S as mergeConfig, _ as mergeMarkdownLocales, C as normalizeAssetsBase, w as normalizeSiteBase, i as postcssIsolateStyles, T as resolveConfig, k as resolvePages, E as resolveSiteData, A as resolveSiteDataByRoute, D as resolveUserConfig, s as scaffold, r as serve } from "./chunk-BjrVv9r8.js";
|
package/dist/web-types.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.21",
|
|
4
4
|
"description": "Vite & Vue powered static site generator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -62,91 +62,90 @@
|
|
|
62
62
|
"*": "prettier --experimental-cli --ignore-unknown --write"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@docsearch/css": "^4.7.
|
|
66
|
-
"@docsearch/js": "^4.7.
|
|
67
|
-
"@docsearch/sidepanel-js": "^4.7.
|
|
68
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
69
|
-
"@shikijs/transformers": "^4.
|
|
70
|
-
"@types/markdown-it": "^14.
|
|
71
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
65
|
+
"@docsearch/css": "^4.7.1",
|
|
66
|
+
"@docsearch/js": "^4.7.1",
|
|
67
|
+
"@docsearch/sidepanel-js": "^4.7.1",
|
|
68
|
+
"@iconify-json/simple-icons": "^1.2.99",
|
|
69
|
+
"@shikijs/transformers": "^4.5.0",
|
|
70
|
+
"@types/markdown-it": "^14.2.0",
|
|
71
|
+
"@vitejs/plugin-vue": "^6.0.9",
|
|
72
72
|
"@vue/devtools-api": "^8.2.1",
|
|
73
|
-
"@vue/shared": "^3.5.
|
|
74
|
-
"@vueuse/core": "^
|
|
75
|
-
"@vueuse/integrations": "^
|
|
76
|
-
"focus-trap": "^8.2.
|
|
73
|
+
"@vue/shared": "^3.5.43",
|
|
74
|
+
"@vueuse/core": "^15.0.0",
|
|
75
|
+
"@vueuse/integrations": "^15.0.0",
|
|
76
|
+
"focus-trap": "^8.2.3",
|
|
77
77
|
"mark.js": "8.11.1",
|
|
78
78
|
"minisearch": "^7.2.0",
|
|
79
|
-
"shiki": "^4.
|
|
80
|
-
"vite": "^8.
|
|
81
|
-
"vue": "^3.5.
|
|
79
|
+
"shiki": "^4.5.0",
|
|
80
|
+
"vite": "^8.3.4",
|
|
81
|
+
"vue": "^3.5.43"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
85
|
-
"@clack/prompts": "^1.
|
|
86
|
-
"@iconify/utils": "^3.1.
|
|
87
|
-
"@mdit-vue/plugin-component": "
|
|
88
|
-
"@mdit-vue/plugin-frontmatter": "
|
|
89
|
-
"@mdit-vue/plugin-headers": "
|
|
90
|
-
"@mdit-vue/plugin-sfc": "
|
|
91
|
-
"@mdit-vue/plugin-title": "
|
|
92
|
-
"@mdit-vue/plugin-toc": "
|
|
93
|
-
"@mdit-vue/shared": "
|
|
94
|
-
"@mdit/plugin-anchor": "
|
|
95
|
-
"@mdit/plugin-attrs": "
|
|
96
|
-
"@mdit/plugin-container": "
|
|
97
|
-
"@mdit/plugin-emoji": "
|
|
98
|
-
"@mdit/plugin-footnote": "
|
|
99
|
-
"@mdit/plugin-tasklist": "
|
|
85
|
+
"@clack/prompts": "^1.8.1",
|
|
86
|
+
"@iconify/utils": "^3.1.7",
|
|
87
|
+
"@mdit-vue/plugin-component": "3.0.2",
|
|
88
|
+
"@mdit-vue/plugin-frontmatter": "3.0.2",
|
|
89
|
+
"@mdit-vue/plugin-headers": "3.0.2",
|
|
90
|
+
"@mdit-vue/plugin-sfc": "3.0.2",
|
|
91
|
+
"@mdit-vue/plugin-title": "3.0.2",
|
|
92
|
+
"@mdit-vue/plugin-toc": "3.0.2",
|
|
93
|
+
"@mdit-vue/shared": "3.0.2",
|
|
94
|
+
"@mdit/plugin-anchor": "1.1.3",
|
|
95
|
+
"@mdit/plugin-attrs": "1.1.1",
|
|
96
|
+
"@mdit/plugin-container": "1.0.2",
|
|
97
|
+
"@mdit/plugin-emoji": "1.1.1",
|
|
98
|
+
"@mdit/plugin-footnote": "1.0.2",
|
|
99
|
+
"@mdit/plugin-tasklist": "1.0.2",
|
|
100
100
|
"@polka/compression": "^1.0.0-next.28",
|
|
101
101
|
"@rolldown/pluginutils": "^1.0.1",
|
|
102
102
|
"@types/cross-spawn": "^6.0.6",
|
|
103
103
|
"@types/mark.js": "^8.11.12",
|
|
104
104
|
"@types/minimist": "^1.2.5",
|
|
105
|
-
"@types/node": "^26.
|
|
105
|
+
"@types/node": "^26.6.5",
|
|
106
106
|
"@types/picomatch": "^4.0.3",
|
|
107
|
-
"@types/semver": "^7.8.0",
|
|
108
107
|
"@volar/typescript": "^2.4.28",
|
|
109
|
-
"@vue/language-core": "^3.3.
|
|
110
|
-
"conventional-changelog": "^8.1.
|
|
111
|
-
"conventional-changelog-angular": "^9.
|
|
108
|
+
"@vue/language-core": "^3.3.12",
|
|
109
|
+
"conventional-changelog": "^8.1.3",
|
|
110
|
+
"conventional-changelog-angular": "^9.4.0",
|
|
112
111
|
"cross-spawn": "^7.0.6",
|
|
113
112
|
"eta": "^4.6.0",
|
|
114
113
|
"get-port": "^7.2.0",
|
|
115
114
|
"gray-matter": "^4.0.3",
|
|
116
|
-
"image-size": "^2.0.
|
|
117
|
-
"lint-staged": "^17.
|
|
118
|
-
"lru-cache": "^11.5.
|
|
119
|
-
"markdown-it": "^14.3.
|
|
115
|
+
"image-size": "^2.0.4",
|
|
116
|
+
"lint-staged": "^17.6.0",
|
|
117
|
+
"lru-cache": "^11.5.3",
|
|
118
|
+
"markdown-it": "^14.3.2",
|
|
120
119
|
"markdown-it-async": "^2.2.0",
|
|
121
|
-
"markdown-it-cjk-friendly": "^2.0.
|
|
120
|
+
"markdown-it-cjk-friendly": "^2.0.3",
|
|
122
121
|
"markdown-it-mathjax3": "^4.3.2",
|
|
123
122
|
"minimist": "^1.2.8",
|
|
124
|
-
"nanoid": "^6.0.
|
|
125
|
-
"obug": "^
|
|
123
|
+
"nanoid": "^6.0.2",
|
|
124
|
+
"obug": "^3.0.0",
|
|
126
125
|
"ora": "^9.4.1",
|
|
127
|
-
"p-map": "^7.0.
|
|
126
|
+
"p-map": "^7.0.8",
|
|
128
127
|
"package-directory": "^8.2.0",
|
|
129
128
|
"path-to-regexp": "^6.3.0",
|
|
130
129
|
"picocolors": "^1.1.1",
|
|
131
|
-
"picomatch": "^4.0.
|
|
132
|
-
"playwright-chromium": "^1.
|
|
130
|
+
"picomatch": "^4.0.7",
|
|
131
|
+
"playwright-chromium": "^1.64.0",
|
|
133
132
|
"polka": "^1.0.0-next.28",
|
|
134
|
-
"postcss": "^8.5.
|
|
135
|
-
"postcss-selector-parser": "^7.1.
|
|
136
|
-
"prettier": "^3.9.
|
|
137
|
-
"publint": "^0.3.
|
|
138
|
-
"rolldown": "^1.2.
|
|
139
|
-
"
|
|
140
|
-
"simple-git-hooks": "^2.13.1",
|
|
133
|
+
"postcss": "^8.5.28",
|
|
134
|
+
"postcss-selector-parser": "^7.1.6",
|
|
135
|
+
"prettier": "^3.9.9",
|
|
136
|
+
"publint": "^0.3.25",
|
|
137
|
+
"rolldown": "^1.2.13",
|
|
138
|
+
"simple-git-hooks": "^2.14.0",
|
|
141
139
|
"sirv": "^3.0.2",
|
|
142
140
|
"sitemap": "^9.0.1",
|
|
143
141
|
"tinyglobby": "^0.2.17",
|
|
144
|
-
"tsdown": "^0.
|
|
142
|
+
"tsdown": "^0.23.0",
|
|
145
143
|
"typescript": "^6.0.3",
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"vue-
|
|
149
|
-
"
|
|
144
|
+
"verkit": "^0.5.0",
|
|
145
|
+
"vitest": "^5.0.3",
|
|
146
|
+
"vue-sfc-transformer": "^0.3.0",
|
|
147
|
+
"vue-tsc": "^3.3.12",
|
|
148
|
+
"wait-on": "^9.5.1"
|
|
150
149
|
},
|
|
151
150
|
"peerDependencies": {
|
|
152
151
|
"markdown-it-mathjax3": "^4",
|
package/types/shared.d.ts
CHANGED
|
@@ -187,7 +187,7 @@ export interface SiteData<ThemeConfig = any> {
|
|
|
187
187
|
* The text direction (`dir` attribute) of the site.
|
|
188
188
|
* @default 'ltr'
|
|
189
189
|
*/
|
|
190
|
-
dir:
|
|
190
|
+
dir: 'ltr' | 'rtl' | 'auto'
|
|
191
191
|
/**
|
|
192
192
|
* The title of the site.
|
|
193
193
|
* @default 'VitePress'
|
|
@@ -295,7 +295,7 @@ export interface VitePressData<T = any> {
|
|
|
295
295
|
/**
|
|
296
296
|
* The text direction of the active locale.
|
|
297
297
|
*/
|
|
298
|
-
dir: Ref<
|
|
298
|
+
dir: Ref<'ltr' | 'rtl' | 'auto'>
|
|
299
299
|
/**
|
|
300
300
|
* The key of the active locale.
|
|
301
301
|
*/
|
|
@@ -381,7 +381,7 @@ export interface LocaleSpecificConfig<ThemeConfig = any> {
|
|
|
381
381
|
/**
|
|
382
382
|
* The text direction of the locale.
|
|
383
383
|
*/
|
|
384
|
-
dir?:
|
|
384
|
+
dir?: 'ltr' | 'rtl' | 'auto'
|
|
385
385
|
/**
|
|
386
386
|
* The title of the site in the locale.
|
|
387
387
|
*/
|