mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-21 14:13:36 +08:00
docs:更新文档
This commit is contained in:
3
node_modules/vitepress/dist/node/build/build.d.ts
generated
vendored
Normal file
3
node_modules/vitepress/dist/node/build/build.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { BuildConfig as ViteBuildOptions } from 'vite';
|
||||
export declare type BuildOptions = Pick<Partial<ViteBuildOptions>, 'root' | 'rollupInputOptions' | 'rollupOutputOptions' | 'rollupPluginVueOptions'>;
|
||||
export declare function build(buildOptions?: BuildOptions): Promise<void>;
|
||||
34
node_modules/vitepress/dist/node/build/build.js
generated
vendored
Normal file
34
node_modules/vitepress/dist/node/build/build.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.build = void 0;
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
const bundle_1 = require("./bundle");
|
||||
const config_1 = require("../config");
|
||||
const render_1 = require("./render");
|
||||
async function build(buildOptions = {}) {
|
||||
process.env.NODE_ENV = 'production';
|
||||
const siteConfig = await config_1.resolveConfig(buildOptions.root);
|
||||
try {
|
||||
const [clientResult, , pageToHashMap] = await bundle_1.bundle(siteConfig, buildOptions);
|
||||
console.log('rendering pages...');
|
||||
const appChunk = clientResult.assets.find((chunk) => chunk.type === 'chunk' && chunk.fileName.match(/^app\.\w+\.js$/));
|
||||
const cssChunk = clientResult.assets.find((chunk) => chunk.type === 'asset' && chunk.fileName.endsWith('.css'));
|
||||
// We embed the hash map string into each page directly so that it doesn't
|
||||
// alter the main chunk's hash on every build. It's also embedded as a
|
||||
// string and JSON.parsed from the client because it's faster than embedding
|
||||
// as JS object literal.
|
||||
const hashMapStirng = JSON.stringify(JSON.stringify(pageToHashMap));
|
||||
for (const page of siteConfig.pages) {
|
||||
await render_1.renderPage(siteConfig, page, clientResult, appChunk, cssChunk, pageToHashMap, hashMapStirng);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
await fs_extra_1.default.remove(siteConfig.tempDir);
|
||||
}
|
||||
console.log('done.');
|
||||
}
|
||||
exports.build = build;
|
||||
//# sourceMappingURL=build.js.map
|
||||
1
node_modules/vitepress/dist/node/build/build.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/build/build.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/node/build/build.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAyB;AACzB,qCAAiC;AAEjC,sCAAyC;AACzC,qCAAqC;AAW9B,KAAK,UAAU,KAAK,CAAC,eAA6B,EAAE;IACzD,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,YAAY,CAAA;IACnC,MAAM,UAAU,GAAG,MAAM,sBAAa,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;IACzD,IAAI;QACF,MAAM,CAAC,YAAY,EAAE,AAAD,EAAG,aAAa,CAAC,GAAG,MAAM,eAAM,CAClD,UAAU,EACV,YAAY,CACb,CAAA;QACD,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;QAEjC,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CACvC,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,CACpD,CAAA;QAEhB,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CACvC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CACtD,CAAA;QAEhB,0EAA0E;QAC1E,sEAAsE;QACtE,4EAA4E;QAC5E,wBAAwB;QACxB,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAA;QAEnE,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE;YACnC,MAAM,mBAAU,CACd,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,aAAa,CACd,CAAA;SACF;KACF;YAAS;QACR,MAAM,kBAAE,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;KACpC;IACD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;AACtB,CAAC;AAxCD,sBAwCC"}
|
||||
4
node_modules/vitepress/dist/node/build/bundle.d.ts
generated
vendored
Normal file
4
node_modules/vitepress/dist/node/build/bundle.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { BuildOptions } from './build';
|
||||
import { SiteConfig } from '../config';
|
||||
import { BuildResult } from 'vite';
|
||||
export declare function bundle(config: SiteConfig, options: BuildOptions): Promise<[BuildResult, BuildResult, Record<string, string>]>;
|
||||
133
node_modules/vitepress/dist/node/build/bundle.js
generated
vendored
Normal file
133
node_modules/vitepress/dist/node/build/bundle.js
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.bundle = void 0;
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const slash_1 = __importDefault(require("slash"));
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
const resolver_1 = require("../resolver");
|
||||
const config_1 = require("../config");
|
||||
const markdownToVue_1 = require("../markdownToVue");
|
||||
const vite_1 = require("vite");
|
||||
const hashRE = /\.(\w+)\.js$/;
|
||||
const staticInjectMarkerRE = /\b(const _hoisted_\d+ = \/\*#__PURE__\*\/createStaticVNode)\("(.*)", (\d+)\)/g;
|
||||
const staticStripRE = /__VP_STATIC_START__.*?__VP_STATIC_END__/g;
|
||||
const staticRestoreRE = /__VP_STATIC_(START|END)__/g;
|
||||
const isPageChunk = (chunk) => !!(chunk.type === 'chunk' &&
|
||||
chunk.isEntry &&
|
||||
chunk.facadeModuleId &&
|
||||
chunk.facadeModuleId.endsWith('.md'));
|
||||
// bundles the VitePress app for both client AND server.
|
||||
async function bundle(config, options) {
|
||||
const root = config.root;
|
||||
const userConfig = await config_1.resolveUserConfig(root);
|
||||
const resolver = resolver_1.createResolver(config.themeDir, userConfig);
|
||||
const markdownToVue = markdownToVue_1.createMarkdownToVueRenderFn(root);
|
||||
let isClientBuild = true;
|
||||
const pageToHashMap = Object.create(null);
|
||||
const VitePressPlugin = {
|
||||
name: 'vitepress',
|
||||
resolveId(id) {
|
||||
if (id === resolver_1.SITE_DATA_REQUEST_PATH) {
|
||||
return id;
|
||||
}
|
||||
},
|
||||
async load(id) {
|
||||
if (id === resolver_1.SITE_DATA_REQUEST_PATH) {
|
||||
return `export default ${JSON.stringify(JSON.stringify(config.site))}`;
|
||||
}
|
||||
// compile md into vue src
|
||||
if (id.endsWith('.md')) {
|
||||
const content = await fs_extra_1.default.readFile(id, 'utf-8');
|
||||
// TODO use git timestamp
|
||||
const lastUpdated = (await fs_extra_1.default.stat(id)).mtimeMs;
|
||||
const { vueSrc } = markdownToVue(content, id, lastUpdated);
|
||||
return vueSrc;
|
||||
}
|
||||
},
|
||||
renderChunk(code, chunk) {
|
||||
if (isClientBuild && isPageChunk(chunk)) {
|
||||
// For each page chunk, inject marker for start/end of static strings.
|
||||
// we do this here because in generateBundle the chunks would have been
|
||||
// minified and we won't be able to safely locate the strings.
|
||||
// Using a regexp relies on specific output from Vue compiler core,
|
||||
// which is a reasonable trade-off considering the massive perf win over
|
||||
// a full AST parse.
|
||||
code = code.replace(staticInjectMarkerRE, '$1("__VP_STATIC_START__$2__VP_STATIC_END__", $3)');
|
||||
return code;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
generateBundle(_options, bundle) {
|
||||
// for each .md entry chunk, adjust its name to its correct path.
|
||||
for (const name in bundle) {
|
||||
const chunk = bundle[name];
|
||||
if (isPageChunk(chunk) && isClientBuild) {
|
||||
// record page -> hash relations
|
||||
const hash = chunk.fileName.match(hashRE)[1];
|
||||
const pageName = chunk.fileName.replace(hashRE, '');
|
||||
pageToHashMap[pageName] = hash;
|
||||
// inject another chunk with the content stripped
|
||||
bundle[name + '-lean'] = {
|
||||
...chunk,
|
||||
fileName: chunk.fileName.replace(/\.js$/, '.lean.js'),
|
||||
code: chunk.code.replace(staticStripRE, ``)
|
||||
};
|
||||
// remove static markers from orginal code
|
||||
chunk.code = chunk.code.replace(staticRestoreRE, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
// define custom rollup input
|
||||
// this is a multi-entry build - every page is considered an entry chunk
|
||||
// the loading is done via filename conversion rules so that the
|
||||
// metadata doesn't need to be included in the main chunk.
|
||||
const input = {
|
||||
app: path_1.default.resolve(resolver_1.APP_PATH, 'index.js')
|
||||
};
|
||||
config.pages.forEach((file) => {
|
||||
// page filename conversion
|
||||
// foo/bar.md -> foo_bar.md
|
||||
input[slash_1.default(file).replace(/\//g, '_')] = path_1.default.resolve(root, file);
|
||||
});
|
||||
// resolve options to pass to vite
|
||||
const { rollupInputOptions = {}, rollupOutputOptions = {} } = options;
|
||||
const viteOptions = {
|
||||
...options,
|
||||
base: config.site.base,
|
||||
resolvers: [resolver],
|
||||
outDir: config.outDir,
|
||||
// let rollup-plugin-vue compile .md files as well
|
||||
rollupPluginVueOptions: {
|
||||
include: /\.(vue|md)$/
|
||||
},
|
||||
rollupInputOptions: {
|
||||
...rollupInputOptions,
|
||||
input,
|
||||
// important so that each page chunk and the index export things for each
|
||||
// other
|
||||
preserveEntrySignatures: 'allow-extension',
|
||||
plugins: [VitePressPlugin, ...(rollupInputOptions.plugins || [])]
|
||||
},
|
||||
rollupOutputOptions: {
|
||||
...rollupOutputOptions,
|
||||
chunkFileNames: `common-[hash].js`
|
||||
},
|
||||
silent: !process.env.DEBUG,
|
||||
minify: !process.env.DEBUG
|
||||
};
|
||||
console.log('building client bundle...');
|
||||
const clientResult = await vite_1.build(viteOptions);
|
||||
console.log('building server bundle...');
|
||||
isClientBuild = false;
|
||||
const serverResult = await vite_1.ssrBuild({
|
||||
...viteOptions,
|
||||
outDir: config.tempDir
|
||||
});
|
||||
return [clientResult[0], serverResult[0], pageToHashMap];
|
||||
}
|
||||
exports.bundle = bundle;
|
||||
//# sourceMappingURL=bundle.js.map
|
||||
1
node_modules/vitepress/dist/node/build/bundle.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/build/bundle.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../../src/node/build/bundle.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,kDAAyB;AACzB,wDAAyB;AACzB,0CAA8E;AAE9E,sCAAyD;AAEzD,oDAA8D;AAC9D,+BAKa;AAEb,MAAM,MAAM,GAAG,cAAc,CAAA;AAC7B,MAAM,oBAAoB,GAAG,+EAA+E,CAAA;AAC5G,MAAM,aAAa,GAAG,0CAA0C,CAAA;AAChE,MAAM,eAAe,GAAG,4BAA4B,CAAA;AAEpD,MAAM,WAAW,GAAG,CAClB,KAAgC,EACmB,EAAE,CACrD,CAAC,CAAC,CACA,KAAK,CAAC,IAAI,KAAK,OAAO;IACtB,KAAK,CAAC,OAAO;IACb,KAAK,CAAC,cAAc;IACpB,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CACrC,CAAA;AAEH,wDAAwD;AACjD,KAAK,UAAU,MAAM,CAC1B,MAAkB,EAClB,OAAqB;IAErB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAA;IACxB,MAAM,UAAU,GAAG,MAAM,0BAAiB,CAAC,IA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CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAA;AAC1D,CAAC;AA7HD,wBA6HC"}
|
||||
5
node_modules/vitepress/dist/node/build/render.d.ts
generated
vendored
Normal file
5
node_modules/vitepress/dist/node/build/render.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { SiteConfig } from '../config';
|
||||
import { BuildResult } from 'vite';
|
||||
import { OutputChunk, OutputAsset } from 'rollup';
|
||||
export declare function renderPage(config: SiteConfig, page: string, // foo.md
|
||||
result: BuildResult, appChunk: OutputChunk, cssChunk: OutputAsset, pageToHashMap: Record<string, string>, hashMapStirng: string): Promise<void>;
|
||||
99
node_modules/vitepress/dist/node/build/render.js
generated
vendored
Normal file
99
node_modules/vitepress/dist/node/build/render.js
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.renderPage = void 0;
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
const config_1 = require("../config");
|
||||
const escape = require('escape-html');
|
||||
async function renderPage(config, page, // foo.md
|
||||
result, appChunk, cssChunk, pageToHashMap, hashMapStirng) {
|
||||
const { createApp } = require(path_1.default.join(config.tempDir, `_assets/app.js`));
|
||||
const { app, router } = createApp();
|
||||
const routePath = `/${page.replace(/\.md$/, '')}`;
|
||||
const siteData = config_1.resolveSiteDataByRoute(config.site, routePath);
|
||||
router.go(routePath);
|
||||
// lazy require server-renderer for production build
|
||||
const content = await require('@vue/server-renderer').renderToString(app);
|
||||
const pageName = page.replace(/\//g, '_');
|
||||
// server build doesn't need hash
|
||||
const pageServerJsFileName = pageName + '.js';
|
||||
// for any initial page load, we only need the lean version of the page js
|
||||
// since the static content is already on the page!
|
||||
const pageHash = pageToHashMap[pageName];
|
||||
const pageClientJsFileName = pageName + `.` + pageHash + '.lean.js';
|
||||
// resolve page data so we can render head tags
|
||||
const { __pageData } = require(path_1.default.join(config.tempDir, `_assets`, pageServerJsFileName));
|
||||
const pageData = JSON.parse(__pageData);
|
||||
const assetPath = `${siteData.base}_assets/`;
|
||||
const preloadLinks = [
|
||||
// resolve imports for index.js + page.md.js and inject script tags for
|
||||
// them as well so we fetch everything as early as possible without having
|
||||
// to wait for entry chunks to parse
|
||||
...resolvePageImports(config, page, result, appChunk),
|
||||
pageClientJsFileName,
|
||||
appChunk.fileName
|
||||
]
|
||||
.map((file) => {
|
||||
return `<link rel="modulepreload" href="${assetPath}${file}">`;
|
||||
})
|
||||
.join('\n ');
|
||||
const html = `
|
||||
<!DOCTYPE html>
|
||||
<html lang="${siteData.lang}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>
|
||||
${pageData.title ? pageData.title + ` | ` : ``}${siteData.title}
|
||||
</title>
|
||||
<meta name="description" content="${siteData.description}">
|
||||
<link rel="stylesheet" href="${assetPath}${cssChunk.fileName}">
|
||||
${preloadLinks}
|
||||
${renderHead(siteData.head)}
|
||||
${renderHead(pageData.frontmatter.head)}
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">${content}</div>
|
||||
<script>__VP_HASH_MAP__ = JSON.parse(${hashMapStirng})</script>
|
||||
<script type="module" async src="${assetPath}${appChunk.fileName}"></script>
|
||||
</body>
|
||||
</html>`.trim();
|
||||
const htmlFileName = path_1.default.join(config.outDir, page.replace(/\.md$/, '.html'));
|
||||
await fs_extra_1.default.ensureDir(path_1.default.dirname(htmlFileName));
|
||||
await fs_extra_1.default.writeFile(htmlFileName, html);
|
||||
}
|
||||
exports.renderPage = renderPage;
|
||||
function resolvePageImports(config, page, result, indexChunk) {
|
||||
// find the page's js chunk and inject script tags for its imports so that
|
||||
// they are start fetching as early as possible
|
||||
const srcPath = path_1.default.resolve(config.root, page);
|
||||
const pageChunk = result.assets.find((chunk) => chunk.type === 'chunk' && chunk.facadeModuleId === srcPath);
|
||||
return Array.from(new Set([...indexChunk.imports, ...pageChunk.imports]));
|
||||
}
|
||||
function renderHead(head) {
|
||||
if (!head || !head.length) {
|
||||
return '';
|
||||
}
|
||||
return head
|
||||
.map(([tag, attrs = {}, innerHTML = '']) => {
|
||||
const openTag = `<${tag}${renderAttrs(attrs)}>`;
|
||||
if (tag !== 'link' && tag !== 'meta') {
|
||||
return `${openTag}${innerHTML}</${tag}>`;
|
||||
}
|
||||
else {
|
||||
return openTag;
|
||||
}
|
||||
})
|
||||
.join('\n ');
|
||||
}
|
||||
function renderAttrs(attrs) {
|
||||
return Object.keys(attrs)
|
||||
.map((key) => {
|
||||
return ` ${key}="${escape(attrs[key])}"`;
|
||||
})
|
||||
.join('');
|
||||
}
|
||||
//# sourceMappingURL=render.js.map
|
||||
1
node_modules/vitepress/dist/node/build/render.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/build/render.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/node/build/render.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,wDAAyB;AACzB,sCAA8D;AAK9D,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;AAE9B,KAAK,UAAU,UAAU,CAC9B,MAAkB,EAClB,IAAY,EAAE,SAAS;AACvB,MAAmB,EACnB,QAAqB,EACrB,QAAqB,EACrB,aAAqC,EACrC,aAAqB;IAErB,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAA;IAC1E,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAA;IACnC,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,OAAO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AAC,CAAC,CAAC,CAAA;AAC3E,CAAC;AAED,SAAS,UAAU,CAAC,IAAkB;IACpC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QACzB,OAAO,EAAE,CAAA;KACV;IACD,OAAO,IAAI;SACR,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,CAAC,EAAE,EAAE;QACzC,MAAM,OAAO,GAAG,IAAI,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAA;QAC/C,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,MAAM,EAAE;YACpC,OAAO,GAAG,OAAO,GAAG,SAAS,KAAK,GAAG,GAAG,CAAA;SACzC;aAAM;YACL,OAAO,OAAO,CAAA;SACf;IACH,CAAC,CAAC;SACD,IAAI,CAAC,QAAQ,CAAC,CAAA;AACnB,CAAC;AAED,SAAS,WAAW,CAAC,KAA6B;IAChD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACtB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACX,OAAO,IAAI,GAAG,KAAK,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAA;IAC1C,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAA;AACb,CAAC"}
|
||||
26
node_modules/vitepress/dist/node/config.d.ts
generated
vendored
Normal file
26
node_modules/vitepress/dist/node/config.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Resolver } from 'vite';
|
||||
import { SiteData, HeadConfig, LocaleConfig } from '../../types/shared';
|
||||
export { resolveSiteDataByRoute } from './shared/config';
|
||||
export interface UserConfig<ThemeConfig = any> {
|
||||
lang?: string;
|
||||
base?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
head?: HeadConfig[];
|
||||
themeConfig?: ThemeConfig;
|
||||
locales?: Record<string, LocaleConfig>;
|
||||
alias?: Record<string, string>;
|
||||
}
|
||||
export interface SiteConfig<ThemeConfig = any> {
|
||||
root: string;
|
||||
site: SiteData<ThemeConfig>;
|
||||
configPath: string;
|
||||
themeDir: string;
|
||||
outDir: string;
|
||||
tempDir: string;
|
||||
resolver: Resolver;
|
||||
pages: string[];
|
||||
}
|
||||
export declare function resolveConfig(root?: string): Promise<SiteConfig>;
|
||||
export declare function resolveUserConfig(root: string): Promise<UserConfig<any>>;
|
||||
export declare function resolveSiteData(root: string): Promise<SiteData>;
|
||||
66
node_modules/vitepress/dist/node/config.js
generated
vendored
Normal file
66
node_modules/vitepress/dist/node/config.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveSiteData = exports.resolveUserConfig = exports.resolveConfig = void 0;
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
const chalk_1 = __importDefault(require("chalk"));
|
||||
const globby_1 = __importDefault(require("globby"));
|
||||
const resolver_1 = require("./resolver");
|
||||
var config_1 = require("./shared/config");
|
||||
Object.defineProperty(exports, "resolveSiteDataByRoute", { enumerable: true, get: function () { return config_1.resolveSiteDataByRoute; } });
|
||||
const debug = require('debug')('vitepress:config');
|
||||
const resolve = (root, file) => path_1.default.resolve(root, `.vitepress`, file);
|
||||
async function resolveConfig(root = process.cwd()) {
|
||||
const userConfig = await resolveUserConfig(root);
|
||||
const site = await resolveSiteData(root);
|
||||
// resolve theme path
|
||||
const userThemeDir = resolve(root, 'theme');
|
||||
const themeDir = (await fs_extra_1.default.pathExists(userThemeDir))
|
||||
? userThemeDir
|
||||
: path_1.default.join(__dirname, '../client/theme-default');
|
||||
const config = {
|
||||
root,
|
||||
site,
|
||||
themeDir,
|
||||
pages: await globby_1.default(['**.md'], { cwd: root, ignore: ['node_modules'] }),
|
||||
configPath: resolve(root, 'config.js'),
|
||||
outDir: resolve(root, 'dist'),
|
||||
tempDir: path_1.default.resolve(resolver_1.APP_PATH, 'temp'),
|
||||
resolver: resolver_1.createResolver(themeDir, userConfig)
|
||||
};
|
||||
return config;
|
||||
}
|
||||
exports.resolveConfig = resolveConfig;
|
||||
async function resolveUserConfig(root) {
|
||||
// load user config
|
||||
const configPath = resolve(root, 'config.js');
|
||||
const hasUserConfig = await fs_extra_1.default.pathExists(configPath);
|
||||
// always delete cache first before loading config
|
||||
delete require.cache[configPath];
|
||||
const userConfig = hasUserConfig ? require(configPath) : {};
|
||||
if (hasUserConfig) {
|
||||
debug(`loaded config at ${chalk_1.default.yellow(configPath)}`);
|
||||
}
|
||||
else {
|
||||
debug(`no config file found.`);
|
||||
}
|
||||
return userConfig;
|
||||
}
|
||||
exports.resolveUserConfig = resolveUserConfig;
|
||||
async function resolveSiteData(root) {
|
||||
const userConfig = await resolveUserConfig(root);
|
||||
return {
|
||||
lang: userConfig.lang || 'en-US',
|
||||
title: userConfig.title || 'VitePress',
|
||||
description: userConfig.description || 'A VitePress site',
|
||||
base: userConfig.base ? userConfig.base.replace(/([^/])$/, '$1/') : '/',
|
||||
head: userConfig.head || [],
|
||||
themeConfig: userConfig.themeConfig || {},
|
||||
locales: userConfig.locales || {}
|
||||
};
|
||||
}
|
||||
exports.resolveSiteData = resolveSiteData;
|
||||
//# sourceMappingURL=config.js.map
|
||||
1
node_modules/vitepress/dist/node/config.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/config.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/node/config.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,wDAAyB;AACzB,kDAAyB;AACzB,oDAA2B;AAC3B,yCAAqD;AAGrD,0CAAwD;AAA/C,gHAAA,sBAAsB,OAAA;AAE/B,MAAM,KAAK,GAAG,OA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AC,CAAA;IAC7C,MAAM,aAAa,GAAG,MAAM,kBAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;IACrD,kDAAkD;IAClD,OAAO,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAChC,MAAM,UAAU,GAAe,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACvE,IAAI,aAAa,EAAE;QACjB,KAAK,CAAC,oBAAoB,eAAK,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;KACtD;SAAM;QACL,KAAK,CAAC,uBAAuB,CAAC,CAAA;KAC/B;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AAdD,8CAcC;AAEM,KAAK,UAAU,eAAe,CAAC,IAAY;IAChD,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAEhD,OAAO;QACL,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,OAAO;QAChC,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,WAAW;QACtC,WAAW,EAAE,UAAU,CAAC,WAAW,IAAI,kBAAkB;QACzD,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG;QACvE,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,EAAE;QAC3B,WAAW,EAAE,UAAU,CAAC,WAAW,IAAI,EAAE;QACzC,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,EAAE;KAClC,CAAA;AACH,CAAC;AAZD,0CAYC"}
|
||||
3
node_modules/vitepress/dist/node/index.d.ts
generated
vendored
Normal file
3
node_modules/vitepress/dist/node/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export * from './server';
|
||||
export * from './build/build';
|
||||
export * from './config';
|
||||
16
node_modules/vitepress/dist/node/index.js
generated
vendored
Normal file
16
node_modules/vitepress/dist/node/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./server"), exports);
|
||||
__exportStar(require("./build/build"), exports);
|
||||
__exportStar(require("./config"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/vitepress/dist/node/index.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAwB;AACxB,gDAA6B;AAC7B,2CAAwB"}
|
||||
26
node_modules/vitepress/dist/node/markdown/markdown.d.ts
generated
vendored
Normal file
26
node_modules/vitepress/dist/node/markdown/markdown.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
import { Header } from '../../../types/shared';
|
||||
export interface MarkdownOptions extends MarkdownIt.Options {
|
||||
lineNumbers?: boolean;
|
||||
config?: (md: MarkdownIt) => void;
|
||||
anchor?: {
|
||||
permalink?: boolean;
|
||||
permalinkBefore?: boolean;
|
||||
permalinkSymbol?: string;
|
||||
};
|
||||
toc?: any;
|
||||
externalLinks?: Record<string, string>;
|
||||
}
|
||||
export interface MarkdownParsedData {
|
||||
hoistedTags?: string[];
|
||||
links?: string[];
|
||||
headers?: Header[];
|
||||
}
|
||||
export interface MarkdownRenderer {
|
||||
__data: MarkdownParsedData;
|
||||
render: (src: string, env?: any) => {
|
||||
html: string;
|
||||
data: any;
|
||||
};
|
||||
}
|
||||
export declare const createMarkdownRenderer: (options?: MarkdownOptions) => MarkdownRenderer;
|
||||
80
node_modules/vitepress/dist/node/markdown/markdown.js
generated
vendored
Normal file
80
node_modules/vitepress/dist/node/markdown/markdown.js
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createMarkdownRenderer = void 0;
|
||||
const markdown_it_1 = __importDefault(require("markdown-it"));
|
||||
const parseHeader_1 = require("../utils/parseHeader");
|
||||
const highlight_1 = require("./plugins/highlight");
|
||||
const slugify_1 = require("./plugins/slugify");
|
||||
const highlightLines_1 = require("./plugins/highlightLines");
|
||||
const lineNumbers_1 = require("./plugins/lineNumbers");
|
||||
const component_1 = require("./plugins/component");
|
||||
const containers_1 = require("./plugins/containers");
|
||||
const snippet_1 = require("./plugins/snippet");
|
||||
const hoist_1 = require("./plugins/hoist");
|
||||
const preWrapper_1 = require("./plugins/preWrapper");
|
||||
const link_1 = require("./plugins/link");
|
||||
const header_1 = require("./plugins/header");
|
||||
const emoji = require('markdown-it-emoji');
|
||||
const anchor = require('markdown-it-anchor');
|
||||
const toc = require('markdown-it-table-of-contents');
|
||||
exports.createMarkdownRenderer = (options = {}) => {
|
||||
const md = markdown_it_1.default({
|
||||
html: true,
|
||||
linkify: true,
|
||||
highlight: highlight_1.highlight,
|
||||
...options
|
||||
});
|
||||
// custom plugins
|
||||
md.use(component_1.componentPlugin)
|
||||
.use(highlightLines_1.highlightLinePlugin)
|
||||
.use(preWrapper_1.preWrapperPlugin)
|
||||
.use(snippet_1.snippetPlugin)
|
||||
.use(hoist_1.hoistPlugin)
|
||||
.use(containers_1.containerPlugin)
|
||||
.use(header_1.extractHeaderPlugin)
|
||||
.use(link_1.linkPlugin, {
|
||||
target: '_blank',
|
||||
rel: 'noopener noreferrer',
|
||||
...options.externalLinks
|
||||
})
|
||||
// 3rd party plugins
|
||||
.use(emoji)
|
||||
.use(anchor, {
|
||||
slugify: slugify_1.slugify,
|
||||
permalink: true,
|
||||
permalinkBefore: true,
|
||||
permalinkSymbol: '#',
|
||||
permalinkAttrs: () => ({ 'aria-hidden': true }),
|
||||
...options.anchor
|
||||
})
|
||||
.use(toc, {
|
||||
slugify: slugify_1.slugify,
|
||||
includeLevel: [2, 3],
|
||||
format: parseHeader_1.parseHeader,
|
||||
...options.toc
|
||||
});
|
||||
// apply user config
|
||||
if (options.config) {
|
||||
options.config(md);
|
||||
}
|
||||
if (options.lineNumbers) {
|
||||
md.use(lineNumbers_1.lineNumberPlugin);
|
||||
}
|
||||
// wrap render so that we can return both the html and extracted data.
|
||||
const render = md.render;
|
||||
const wrappedRender = (src) => {
|
||||
;
|
||||
md.__data = {};
|
||||
const html = render.call(md, src);
|
||||
return {
|
||||
html,
|
||||
data: md.__data
|
||||
};
|
||||
};
|
||||
md.render = wrappedRender;
|
||||
return md;
|
||||
};
|
||||
//# sourceMappingURL=markdown.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/markdown.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/markdown.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../../src/node/markdown/markdown.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAoC;AACpC,sDAAkD;AAClD,mDAA+C;AAC/C,+CAA2C;AAC3C,6DAA8D;AAC9D,uDAAwD;AACxD,mDAAqD;AACrD,qDAAsD;AACtD,+CAAiD;AACjD,2CAA6C;AAC7C,qDAAuD;AACvD,yCAA2C;AAC3C,6CAAsD;AAGtD,MAAM,KAAK,GAAG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AAE;QAClB,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;KACnB;IAED,IAAI,OAAO,CAAC,WAAW,EAAE;QACvB,EAAE,CAAC,GAAG,CAAC,8BAAgB,CAAC,CAAA;KACzB;IAED,sEAAsE;IACtE,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAA;IACxB,MAAM,aAAa,GAA+B,CAAC,GAAG,EAAE,EAAE;QACxD,CAAC;QAAC,EAAU,CAAC,MAAM,GAAG,EAAE,CAAA;QACxB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;QACjC,OAAO;YACL,IAAI;YACJ,IAAI,EAAG,EAAU,CAAC,MAAM;SACzB,CAAA;IACH,CAAC,CACA;IAAC,EAAU,CAAC,MAAM,GAAG,aAAa,CAAA;IAEnC,OAAO,EAAS,CAAA;AAClB,CAAC,CAAA"}
|
||||
2
node_modules/vitepress/dist/node/markdown/plugins/component.d.ts
generated
vendored
Normal file
2
node_modules/vitepress/dist/node/markdown/plugins/component.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
export declare const componentPlugin: (md: MarkdownIt) => void;
|
||||
83
node_modules/vitepress/dist/node/markdown/plugins/component.js
generated
vendored
Normal file
83
node_modules/vitepress/dist/node/markdown/plugins/component.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.componentPlugin = void 0;
|
||||
// Replacing the default htmlBlock rule to allow using custom components at
|
||||
// root level
|
||||
const blockNames = require('markdown-it/lib/common/html_blocks');
|
||||
const HTML_OPEN_CLOSE_TAG_RE = require('markdown-it/lib/common/html_re')
|
||||
.HTML_OPEN_CLOSE_TAG_RE;
|
||||
// An array of opening and corresponding closing sequences for html tags,
|
||||
// last argument defines whether it can terminate a paragraph or not
|
||||
const HTML_SEQUENCES = [
|
||||
[/^<(script|pre|style)(?=(\s|>|$))/i, /<\/(script|pre|style)>/i, true],
|
||||
[/^<!--/, /-->/, true],
|
||||
[/^<\?/, /\?>/, true],
|
||||
[/^<![A-Z]/, />/, true],
|
||||
[/^<!\[CDATA\[/, /\]\]>/, true],
|
||||
// PascalCase Components
|
||||
[/^<[A-Z]/, />/, true],
|
||||
// custom elements with hyphens
|
||||
[/^<\w+\-/, />/, true],
|
||||
[
|
||||
new RegExp('^</?(' + blockNames.join('|') + ')(?=(\\s|/?>|$))', 'i'),
|
||||
/^$/,
|
||||
true
|
||||
],
|
||||
[new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\s*$'), /^$/, false]
|
||||
];
|
||||
exports.componentPlugin = (md) => {
|
||||
md.block.ruler.at('html_block', htmlBlock);
|
||||
};
|
||||
const htmlBlock = (state, startLine, endLine, silent) => {
|
||||
let i, nextLine, lineText;
|
||||
let pos = state.bMarks[startLine] + state.tShift[startLine];
|
||||
let max = state.eMarks[startLine];
|
||||
// if it's indented more than 3 spaces, it should be a code block
|
||||
if (state.sCount[startLine] - state.blkIndent >= 4) {
|
||||
return false;
|
||||
}
|
||||
if (!state.md.options.html) {
|
||||
return false;
|
||||
}
|
||||
if (state.src.charCodeAt(pos) !== 0x3c /* < */) {
|
||||
return false;
|
||||
}
|
||||
lineText = state.src.slice(pos, max);
|
||||
for (i = 0; i < HTML_SEQUENCES.length; i++) {
|
||||
if (HTML_SEQUENCES[i][0].test(lineText)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i === HTML_SEQUENCES.length) {
|
||||
return false;
|
||||
}
|
||||
if (silent) {
|
||||
// true if this sequence can be a terminator, false otherwise
|
||||
return HTML_SEQUENCES[i][2];
|
||||
}
|
||||
nextLine = startLine + 1;
|
||||
// If we are here - we detected HTML block.
|
||||
// Let's roll down till block end.
|
||||
if (!HTML_SEQUENCES[i][1].test(lineText)) {
|
||||
for (; nextLine < endLine; nextLine++) {
|
||||
if (state.sCount[nextLine] < state.blkIndent) {
|
||||
break;
|
||||
}
|
||||
pos = state.bMarks[nextLine] + state.tShift[nextLine];
|
||||
max = state.eMarks[nextLine];
|
||||
lineText = state.src.slice(pos, max);
|
||||
if (HTML_SEQUENCES[i][1].test(lineText)) {
|
||||
if (lineText.length !== 0) {
|
||||
nextLine++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
state.line = nextLine;
|
||||
const token = state.push('html_block', '', 0);
|
||||
token.map = [startLine, nextLine];
|
||||
token.content = state.getLines(startLine, nextLine, state.blkIndent, true);
|
||||
return true;
|
||||
};
|
||||
//# sourceMappingURL=component.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/component.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/component.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/component.ts"],"names":[],"mappings":";;;AAGA,2EAA2E;AAC3E,aAAa;AAEb,MAAM,UAAU,GAAa,OAAO,CAAC,oCAAoC,CAAC,CAAA;AAC1E,MAAM,sBAAsB,GAAW,OAAO,CAAC,gCAAgC,CAAC;KAC7E,sBAAsB,CAAA;AAEzB,yEAAyE;AACzE,oEAAoE;AACpE,MAAM,cAAc,GAAgC;IAClD,CAAC,mCAAmC,EAAE,yBAAyB,EAAE,IAAI,CAAC;IACtE,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC;IACtB,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC;IACrB,CAAC,UAAU,EAAE,GAAG,EAAE,IAAI,CAAC;IACvB,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC;IAC/B,wBAAwB;IACxB,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC;IACtB,+BAA+B;IAC/B,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC;IACtB;QACE,IAAI,MAAM,CAAC,OAAO,GAAG,UAAU,C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jC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;IAE1E,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|
||||
2
node_modules/vitepress/dist/node/markdown/plugins/containers.d.ts
generated
vendored
Normal file
2
node_modules/vitepress/dist/node/markdown/plugins/containers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
export declare const containerPlugin: (md: MarkdownIt) => void;
|
||||
32
node_modules/vitepress/dist/node/markdown/plugins/containers.js
generated
vendored
Normal file
32
node_modules/vitepress/dist/node/markdown/plugins/containers.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.containerPlugin = void 0;
|
||||
const container = require('markdown-it-container');
|
||||
exports.containerPlugin = (md) => {
|
||||
md.use(...createContainer('tip', 'TIP'))
|
||||
.use(...createContainer('warning', 'WARNING'))
|
||||
.use(...createContainer('danger', 'WARNING'))
|
||||
// explicitly escape Vue syntax
|
||||
.use(container, 'v-pre', {
|
||||
render: (tokens, idx) => tokens[idx].nesting === 1 ? `<div v-pre>\n` : `</div>\n`
|
||||
});
|
||||
};
|
||||
function createContainer(klass, defaultTitle) {
|
||||
return [
|
||||
container,
|
||||
klass,
|
||||
{
|
||||
render(tokens, idx) {
|
||||
const token = tokens[idx];
|
||||
const info = token.info.trim().slice(klass.length).trim();
|
||||
if (token.nesting === 1) {
|
||||
return `<div class="${klass} custom-block"><p class="custom-block-title">${info || defaultTitle}</p>\n`;
|
||||
}
|
||||
else {
|
||||
return `</div>\n`;
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
//# sourceMappingURL=containers.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/containers.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/containers.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"containers.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/containers.ts"],"names":[],"mappings":";;;AAGA,MAAM,SAAS,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AAErC,QAAA,eAAe,GAAG,CAAC,EAAc,EAAE,EAAE;IAChD,EAAE,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC,GAAG,CAAC,GAAG,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;SAC7C,GAAG,CAAC,GAAG,eAAe,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QAC7C,+BAA+B;SAC9B,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE;QACvB,MAAM,EAAE,CAAC,MAAe,EAAE,GAAW,EAAE,EAAE,CACvC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UAAU;KAC3D,CAAC,CAAA;AACN,CAAC,CAAA;AAUD,SAAS,eAAe,CAAC,KAAa,EAAE,YAAoB;IAC1D,OAAO;QACL,SAAS;QACT,KAAK;QACL;YACE,MAAM,CAAC,MAAM,EAAE,GAAG;gBAChB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;gBACzB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAA;gBACzD,IAAI,KAAK,CAAC,OAAO,KAAK,CAAC,EAAE;oBACvB,OAAO,eAAe,KAAK,gDACzB,IAAI,IAAI,YACV,QAAQ,CAAA;iBACT;qBAAM;oBACL,OAAO,UAAU,CAAA;iBAClB;YACH,CAAC;SACF;KACF,CAAA;AACH,CAAC"}
|
||||
2
node_modules/vitepress/dist/node/markdown/plugins/header.d.ts
generated
vendored
Normal file
2
node_modules/vitepress/dist/node/markdown/plugins/header.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
export declare const extractHeaderPlugin: (md: MarkdownIt, include?: string[]) => void;
|
||||
24
node_modules/vitepress/dist/node/markdown/plugins/header.js
generated
vendored
Normal file
24
node_modules/vitepress/dist/node/markdown/plugins/header.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.extractHeaderPlugin = void 0;
|
||||
const parseHeader_1 = require("../../utils/parseHeader");
|
||||
const slugify_1 = require("./slugify");
|
||||
exports.extractHeaderPlugin = (md, include = ['h2', 'h3']) => {
|
||||
md.renderer.rules.heading_open = (tokens, i, options, env, self) => {
|
||||
const token = tokens[i];
|
||||
if (include.includes(token.tag)) {
|
||||
const title = tokens[i + 1].content;
|
||||
const idAttr = token.attrs.find(([name]) => name === 'id');
|
||||
const slug = idAttr && idAttr[1];
|
||||
const data = md.__data;
|
||||
const headers = data.headers || (data.headers = []);
|
||||
headers.push({
|
||||
level: parseInt(token.tag.slice(1), 10),
|
||||
title: parseHeader_1.deeplyParseHeader(title),
|
||||
slug: slug || slugify_1.slugify(title)
|
||||
});
|
||||
}
|
||||
return self.renderToken(tokens, i, options);
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=header.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/header.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/header.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/header.ts"],"names":[],"mappings":";;;AAEA,yDAA2D;AAC3D,uCAAmC;AAEtB,QAAA,mBAAmB,GAAG,CAAC,EAAc,EAAE,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;IAC5E,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QACjE,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;QACvB,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAA;YACnC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;YAC3D,MAAM,IAAI,GAAG,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC,CAAA;YAChC,MAAM,IAAI,GAAI,EAAU,CAAC,MAA4B,CAAA;YACrD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAA;YACnD,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBACvC,KAAK,EAAE,+BAAiB,CAAC,KAAK,CAAC;gBAC/B,IAAI,EAAE,IAAI,IAAI,iBAAO,CAAC,KAAK,CAAC;aAC7B,CAAC,CAAA;SACH;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;IAC7C,CAAC,CAAA;AACH,CAAC,CAAA"}
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/highlight.d.ts
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/highlight.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const highlight: (str: string, lang: string) => string;
|
||||
48
node_modules/vitepress/dist/node/markdown/plugins/highlight.js
generated
vendored
Normal file
48
node_modules/vitepress/dist/node/markdown/plugins/highlight.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.highlight = void 0;
|
||||
const chalk = require('chalk');
|
||||
const prism = require('prismjs');
|
||||
const loadLanguages = require('prismjs/components/index');
|
||||
const escapeHtml = require('escape-html');
|
||||
// required to make embedded highlighting work...
|
||||
loadLanguages(['markup', 'css', 'javascript']);
|
||||
function wrap(code, lang) {
|
||||
if (lang === 'text') {
|
||||
code = escapeHtml(code);
|
||||
}
|
||||
return `<pre v-pre><code>${code}</code></pre>`;
|
||||
}
|
||||
exports.highlight = (str, lang) => {
|
||||
if (!lang) {
|
||||
return wrap(str, 'text');
|
||||
}
|
||||
lang = lang.toLowerCase();
|
||||
const rawLang = lang;
|
||||
if (lang === 'vue' || lang === 'html') {
|
||||
lang = 'markup';
|
||||
}
|
||||
if (lang === 'md') {
|
||||
lang = 'markdown';
|
||||
}
|
||||
if (lang === 'ts') {
|
||||
lang = 'typescript';
|
||||
}
|
||||
if (lang === 'py') {
|
||||
lang = 'python';
|
||||
}
|
||||
if (!prism.languages[lang]) {
|
||||
try {
|
||||
loadLanguages([lang]);
|
||||
}
|
||||
catch (e) {
|
||||
console.warn(chalk.yellow(`[vuepress] Syntax highlight for language "${lang}" is not supported.`));
|
||||
}
|
||||
}
|
||||
if (prism.languages[lang]) {
|
||||
const code = prism.highlight(str, prism.languages[lang], lang);
|
||||
return wrap(code, rawLang);
|
||||
}
|
||||
return wrap(str, 'text');
|
||||
};
|
||||
//# sourceMappingURL=highlight.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/highlight.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/highlight.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"highlight.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/high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CACV,KAAK,CAAC,MAAM,CACV,6CAA6C,IAAI,qBAAqB,CACvE,CACF,CAAA;SACF;KACF;IACD,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACzB,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;QAC9D,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;KAC3B;IACD,OAAO,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;AAC1B,CAAC,CAAA"}
|
||||
2
node_modules/vitepress/dist/node/markdown/plugins/highlightLines.d.ts
generated
vendored
Normal file
2
node_modules/vitepress/dist/node/markdown/plugins/highlightLines.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
export declare const highlightLinePlugin: (md: MarkdownIt) => void;
|
||||
45
node_modules/vitepress/dist/node/markdown/plugins/highlightLines.js
generated
vendored
Normal file
45
node_modules/vitepress/dist/node/markdown/plugins/highlightLines.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.highlightLinePlugin = void 0;
|
||||
const RE = /{([\d,-]+)}/;
|
||||
const wrapperRE = /^<pre .*?><code>/;
|
||||
exports.highlightLinePlugin = (md) => {
|
||||
const fence = md.renderer.rules.fence;
|
||||
md.renderer.rules.fence = (...args) => {
|
||||
const [tokens, idx, options] = args;
|
||||
const token = tokens[idx];
|
||||
const rawInfo = token.info;
|
||||
if (!rawInfo || !RE.test(rawInfo)) {
|
||||
return fence(...args);
|
||||
}
|
||||
const langName = rawInfo.replace(RE, '').trim();
|
||||
// ensure the next plugin get the correct lang.
|
||||
token.info = langName;
|
||||
const lineNumbers = RE.exec(rawInfo)[1]
|
||||
.split(',')
|
||||
.map((v) => v.split('-').map((v) => parseInt(v, 10)));
|
||||
const code = options.highlight
|
||||
? options.highlight(token.content, langName)
|
||||
: token.content;
|
||||
const rawCode = code.replace(wrapperRE, '');
|
||||
const highlightLinesCode = rawCode
|
||||
.split('\n')
|
||||
.map((split, index) => {
|
||||
const lineNumber = index + 1;
|
||||
const inRange = lineNumbers.some(([start, end]) => {
|
||||
if (start && end) {
|
||||
return lineNumber >= start && lineNumber <= end;
|
||||
}
|
||||
return lineNumber === start;
|
||||
});
|
||||
if (inRange) {
|
||||
return `<div class="highlighted"> </div>`;
|
||||
}
|
||||
return '<br>';
|
||||
})
|
||||
.join('');
|
||||
const highlightLinesWrapperCode = `<div class="highlight-lines">${highlightLinesCode}</div>`;
|
||||
return highlightLinesWrapperCode + code;
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=highlightLines.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/highlightLines.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/highlightLines.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"highlightLines.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/highlightLines.ts"],"names":[],"mappings":";;;AAGA,MAAM,EAAE,GAAG,aAAa,CAAA;AACxB,MAAM,SAAS,GAAG,kBAAkB,CAAA;AAEvB,QAAA,mBAAmB,GAAG,CAAC,EAAc,EAAE,EAAE;IACpD,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAM,CAAA;IACtC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE;QACpC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;QACnC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QAEzB,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAA;QAC1B,IAAI,CAAC,OAAO,IAAI,CAAC,EAAE,C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O,EAAE;gBACX,OAAO,uCAAuC,CAAA;aAC/C;YACD,OAAO,MAAM,CAAA;QACf,CAAC,CAAC;aACD,IAAI,CAAC,EAAE,CAAC,CAAA;QAEX,MAAM,yBAAyB,GAAG,gCAAgC,kBAAkB,QAAQ,CAAA;QAE5F,OAAO,yBAAyB,GAAG,IAAI,CAAA;IACzC,CAAC,CAAA;AACH,CAAC,CAAA"}
|
||||
2
node_modules/vitepress/dist/node/markdown/plugins/hoist.d.ts
generated
vendored
Normal file
2
node_modules/vitepress/dist/node/markdown/plugins/hoist.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
export declare const hoistPlugin: (md: MarkdownIt) => void;
|
||||
21
node_modules/vitepress/dist/node/markdown/plugins/hoist.js
generated
vendored
Normal file
21
node_modules/vitepress/dist/node/markdown/plugins/hoist.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.hoistPlugin = void 0;
|
||||
// hoist <script> and <style> tags out of the returned html
|
||||
// so that they can be placed outside as SFC blocks.
|
||||
exports.hoistPlugin = (md) => {
|
||||
const RE = /^<(script|style)(?=(\s|>|$))/i;
|
||||
md.renderer.rules.html_block = (tokens, idx) => {
|
||||
const content = tokens[idx].content;
|
||||
const data = md.__data;
|
||||
const hoistedTags = data.hoistedTags || (data.hoistedTags = []);
|
||||
if (RE.test(content.trim())) {
|
||||
hoistedTags.push(content);
|
||||
return '';
|
||||
}
|
||||
else {
|
||||
return content;
|
||||
}
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=hoist.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/hoist.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/hoist.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"hoist.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/hoist.ts"],"names":[],"mappings":";;;AAGA,2DAA2D;AAC3D,oDAAoD;AACvC,QAAA,WAAW,GAAG,CAAC,EAAc,EAAE,EAAE;IAC5C,MAAM,EAAE,GAAG,+BAA+B,CAAA;IAE1C,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QAC7C,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAA;QACnC,MAAM,IAAI,GAAI,EAAU,CAAC,MAA4B,CAAA;QACrD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAA;QAC/D,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE;YAC3B,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YACzB,OAAO,EAAE,CAAA;SACV;aAAM;YACL,OAAO,OAAO,CAAA;SACf;IACH,CAAC,CAAA;AACH,CAAC,CAAA"}
|
||||
2
node_modules/vitepress/dist/node/markdown/plugins/lineNumbers.d.ts
generated
vendored
Normal file
2
node_modules/vitepress/dist/node/markdown/plugins/lineNumbers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
export declare const lineNumberPlugin: (md: MarkdownIt) => void;
|
||||
22
node_modules/vitepress/dist/node/markdown/plugins/lineNumbers.js
generated
vendored
Normal file
22
node_modules/vitepress/dist/node/markdown/plugins/lineNumbers.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
// markdown-it plugin for generating line numbers.
|
||||
// It depends on preWrapper plugin.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.lineNumberPlugin = void 0;
|
||||
exports.lineNumberPlugin = (md) => {
|
||||
const fence = md.renderer.rules.fence;
|
||||
md.renderer.rules.fence = (...args) => {
|
||||
const rawCode = fence(...args);
|
||||
const code = rawCode.slice(rawCode.indexOf('<code>'), rawCode.indexOf('</code>'));
|
||||
const lines = code.split('\n');
|
||||
const lineNumbersCode = [...Array(lines.length - 1)]
|
||||
.map((line, index) => `<span class="line-number">${index + 1}</span><br>`)
|
||||
.join('');
|
||||
const lineNumbersWrapperCode = `<div class="line-numbers-wrapper">${lineNumbersCode}</div>`;
|
||||
const finalCode = rawCode
|
||||
.replace(/<\/div>$/, `${lineNumbersWrapperCode}</div>`)
|
||||
.replace(/"(language-\w+)"/, '"$1 line-numbers-mode"');
|
||||
return finalCode;
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=lineNumbers.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/lineNumbers.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/lineNumbers.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"lineNumbers.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/lineNumbers.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,mCAAmC;;;AAItB,QAAA,gBAAgB,GAAG,CAAC,EAAc,EAAE,EAAE;IACjD,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAM,CAAA;IACtC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE;QACpC,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CACxB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EACzB,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAC3B,CAAA;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC9B,MAAM,eAAe,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;aACjD,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,6BAA6B,KAAK,GAAG,CAAC,aAAa,CAAC;aACzE,IAAI,CAAC,EAAE,CAAC,CAAA;QAEX,MAAM,sBAAsB,GAAG,qCAAqC,eAAe,QAAQ,CAAA;QAE3F,MAAM,SAAS,GAAG,OAAO;aACtB,OAAO,CAAC,UAAU,EAAE,GAAG,sBAAsB,QAAQ,CAAC;aACtD,OAAO,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,CAAA;QAExD,OAAO,SAAS,CAAA;IAClB,CAAC,CAAA;AACH,CAAC,CAAA"}
|
||||
2
node_modules/vitepress/dist/node/markdown/plugins/link.d.ts
generated
vendored
Normal file
2
node_modules/vitepress/dist/node/markdown/plugins/link.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
export declare const linkPlugin: (md: MarkdownIt, externalAttrs: Record<string, string>) => void;
|
||||
60
node_modules/vitepress/dist/node/markdown/plugins/link.js
generated
vendored
Normal file
60
node_modules/vitepress/dist/node/markdown/plugins/link.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
// markdown-it plugin for:
|
||||
// 1. adding target="_blank" to external links
|
||||
// 2. normalize internal links to end with `.html`
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.linkPlugin = void 0;
|
||||
const url_1 = require("url");
|
||||
const indexRE = /(^|.*\/)index.md(#?.*)$/i;
|
||||
exports.linkPlugin = (md, externalAttrs) => {
|
||||
md.renderer.rules.link_open = (tokens, idx, options, env, self) => {
|
||||
const token = tokens[idx];
|
||||
const hrefIndex = token.attrIndex('href');
|
||||
if (hrefIndex >= 0) {
|
||||
const hrefAttr = token.attrs[hrefIndex];
|
||||
const url = hrefAttr[1];
|
||||
const isExternal = /^https?:/.test(url);
|
||||
if (isExternal) {
|
||||
Object.entries(externalAttrs).forEach(([key, val]) => {
|
||||
token.attrSet(key, val);
|
||||
});
|
||||
}
|
||||
else if (!url.startsWith('#')) {
|
||||
normalizeHref(hrefAttr);
|
||||
}
|
||||
}
|
||||
return self.renderToken(tokens, idx, options);
|
||||
};
|
||||
function normalizeHref(hrefAttr) {
|
||||
let url = hrefAttr[1];
|
||||
const indexMatch = url.match(indexRE);
|
||||
if (indexMatch) {
|
||||
const [, path, hash] = indexMatch;
|
||||
url = path + hash;
|
||||
}
|
||||
else {
|
||||
let cleanUrl = url.replace(/\#.*$/, '').replace(/\?.*$/, '');
|
||||
// .md -> .html
|
||||
if (cleanUrl.endsWith('.md')) {
|
||||
cleanUrl = cleanUrl.replace(/\.md$/, '.html');
|
||||
}
|
||||
// ./foo -> ./foo.html
|
||||
if (!cleanUrl.endsWith('.html') && !cleanUrl.endsWith('/')) {
|
||||
cleanUrl += '.html';
|
||||
}
|
||||
const parsed = new url_1.URL(url, 'http://a.com');
|
||||
url = cleanUrl + parsed.search + parsed.hash;
|
||||
}
|
||||
// ensure leading . for relative paths
|
||||
if (!url.startsWith('/') && !/^\.\//.test(url)) {
|
||||
url = './' + url;
|
||||
}
|
||||
// export it for existence check
|
||||
const data = md.__data;
|
||||
const links = data.links || (data.links = []);
|
||||
links.push(url.replace(/\.html$/, ''));
|
||||
// markdown-it encodes the uri
|
||||
hrefAttr[1] = decodeURI(url);
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=link.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/link.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/link.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/link.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,8CAA8C;AAC9C,kDAAkD;;;AAIlD,6BAAyB;AAEzB,MAAM,OAAO,GAAG,0BAA0B,CAAA;AAE7B,QAAA,UAAU,GAAG,CACxB,EAAc,EACd,a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vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
export declare const preWrapperPlugin: (md: MarkdownIt) => void;
|
||||
21
node_modules/vitepress/dist/node/markdown/plugins/preWrapper.js
generated
vendored
Normal file
21
node_modules/vitepress/dist/node/markdown/plugins/preWrapper.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
// markdown-it plugin for wrapping <pre> ... </pre>.
|
||||
//
|
||||
// If your plugin was chained before preWrapper, you can add additional eleemnt directly.
|
||||
// If your plugin was chained after preWrapper, you can use these slots:
|
||||
// 1. <!--beforebegin-->
|
||||
// 2. <!--afterbegin-->
|
||||
// 3. <!--beforeend-->
|
||||
// 4. <!--afterend-->
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.preWrapperPlugin = void 0;
|
||||
exports.preWrapperPlugin = (md) => {
|
||||
const fence = md.renderer.rules.fence;
|
||||
md.renderer.rules.fence = (...args) => {
|
||||
const [tokens, idx] = args;
|
||||
const token = tokens[idx];
|
||||
const rawCode = fence(...args);
|
||||
return `<div class="language-${token.info.trim()}">${rawCode}</div>`;
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=preWrapper.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/preWrapper.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/preWrapper.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"preWrapper.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/preWrapper.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,EAAE;AACF,yFAAyF;AACzF,wEAAwE;AACxE,0BAA0B;AAC1B,yBAAyB;AACzB,wBAAwB;AACxB,uBAAuB;;;AAIV,QAAA,gBAAgB,GAAG,CAAC,EAAc,EAAE,EAAE;IACjD,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAM,CAAA;IACtC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE;QACpC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAA;QAC1B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QACzB,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,CAAA;QAC9B,OAAO,wBAAwB,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,OAAO,QAAQ,CAAA;IACtE,CAAC,CAAA;AACH,CAAC,CAAA"}
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/slugify.d.ts
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/slugify.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const slugify: (str: string) => string;
|
||||
25
node_modules/vitepress/dist/node/markdown/plugins/slugify.js
generated
vendored
Normal file
25
node_modules/vitepress/dist/node/markdown/plugins/slugify.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.slugify = void 0;
|
||||
// string.js slugify drops non ascii chars so we have to
|
||||
// use a custom implementation here
|
||||
const removeDiacritics = require('diacritics').remove;
|
||||
// eslint-disable-next-line no-control-regex
|
||||
const rControl = /[\u0000-\u001f]/g;
|
||||
const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g;
|
||||
exports.slugify = (str) => {
|
||||
return (removeDiacritics(str)
|
||||
// Remove control characters
|
||||
.replace(rControl, '')
|
||||
// Replace special characters
|
||||
.replace(rSpecial, '-')
|
||||
// Remove continous separators
|
||||
.replace(/\-{2,}/g, '-')
|
||||
// Remove prefixing and trailing separtors
|
||||
.replace(/^\-+|\-+$/g, '')
|
||||
// ensure it doesn't start with a number (#121)
|
||||
.replace(/^(\d)/, '_$1')
|
||||
// lowercase
|
||||
.toLowerCase());
|
||||
};
|
||||
//# sourceMappingURL=slugify.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/slugify.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/slugify.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"slugify.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/slugify.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,mCAAmC;AACnC,MAAM,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,MAAM,CAAA;AACrD,4CAA4C;AAC5C,MAAM,QAAQ,GAAG,kBAAkB,CAAA;AACnC,MAAM,QAAQ,GAAG,2CAA2C,CAAA;AAE/C,QAAA,OAAO,GAAG,CAAC,GAAW,EAAU,EAAE;IAC7C,OAAO,CACL,gBAAgB,CAAC,GAAG,CAAC;QACnB,4BAA4B;SAC3B,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QACtB,6BAA6B;SAC5B,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;QACvB,8BAA8B;SAC7B,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;QACxB,0CAA0C;SACzC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;QAC1B,+CAA+C;SAC9C,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC;QACxB,YAAY;SACX,WAAW,EAAE,CACjB,CAAA;AACH,CAAC,CAAA"}
|
||||
2
node_modules/vitepress/dist/node/markdown/plugins/snippet.d.ts
generated
vendored
Normal file
2
node_modules/vitepress/dist/node/markdown/plugins/snippet.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import MarkdownIt from 'markdown-it';
|
||||
export declare const snippetPlugin: (md: MarkdownIt, root: string) => void;
|
||||
43
node_modules/vitepress/dist/node/markdown/plugins/snippet.js
generated
vendored
Normal file
43
node_modules/vitepress/dist/node/markdown/plugins/snippet.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.snippetPlugin = void 0;
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
exports.snippetPlugin = (md, root) => {
|
||||
const parser = (state, startLine, endLine, silent) => {
|
||||
const CH = '<'.charCodeAt(0);
|
||||
const pos = state.bMarks[startLine] + state.tShift[startLine];
|
||||
const max = state.eMarks[startLine];
|
||||
// if it's indented more than 3 spaces, it should be a code block
|
||||
if (state.sCount[startLine] - state.blkIndent >= 4) {
|
||||
return false;
|
||||
}
|
||||
for (let i = 0; i < 3; ++i) {
|
||||
const ch = state.src.charCodeAt(pos + i);
|
||||
if (ch !== CH || pos + i >= max)
|
||||
return false;
|
||||
}
|
||||
if (silent) {
|
||||
return true;
|
||||
}
|
||||
const start = pos + 3;
|
||||
const end = state.skipSpacesBack(max, pos);
|
||||
const rawPath = state.src.slice(start, end).trim().replace(/^@/, root);
|
||||
const filename = rawPath.split(/{/).shift().trim();
|
||||
const content = fs_1.default.existsSync(filename)
|
||||
? fs_1.default.readFileSync(filename).toString()
|
||||
: 'Not found: ' + filename;
|
||||
const meta = rawPath.replace(filename, '');
|
||||
state.line = startLine + 1;
|
||||
const token = state.push('fence', 'code', 0);
|
||||
token.info = filename.split('.').pop() + meta;
|
||||
token.content = content;
|
||||
token.markup = '```';
|
||||
token.map = [startLine, startLine + 1];
|
||||
return true;
|
||||
};
|
||||
md.block.ruler.before('fence', 'snippet', parser);
|
||||
};
|
||||
//# sourceMappingURL=snippet.js.map
|
||||
1
node_modules/vitepress/dist/node/markdown/plugins/snippet.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdown/plugins/snippet.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../../../src/node/markdown/plugins/snippet.ts"],"names":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AG,CAAC,IAAI,EAAE,CAAA;QACnD,MAAM,OAAO,GAAG,YAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;YACrC,CAAC,CAAC,YAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE;YACtC,CAAC,CAAC,aAAa,GAAG,QAAQ,CAAA;QAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;QAE1C,KAAK,CAAC,IAAI,GAAG,SAAS,GAAG,CAAC,CAAA;QAE1B,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;QAC5C,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,CAAA;QAC7C,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;QACvB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAA;QACpB,KAAK,CAAC,GAAG,GAAG,CAAC,SAAS,EAAE,SAAS,GAAG,CAAC,CAAC,CAAA;QAEtC,OAAO,IAAI,CAAA;IACb,CAAC,CAAA;IAED,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;AACnD,CAAC,CAAA"}
|
||||
8
node_modules/vitepress/dist/node/markdownToVue.d.ts
generated
vendored
Normal file
8
node_modules/vitepress/dist/node/markdownToVue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { MarkdownOptions } from './markdown/markdown';
|
||||
import { PageData } from '../../types/shared';
|
||||
interface MarkdownCompileResult {
|
||||
vueSrc: string;
|
||||
pageData: PageData;
|
||||
}
|
||||
export declare function createMarkdownToVueRenderFn(root: string, options?: MarkdownOptions): (src: string, file: string, lastUpdated: number, injectData?: boolean) => MarkdownCompileResult;
|
||||
export {};
|
||||
77
node_modules/vitepress/dist/node/markdownToVue.js
generated
vendored
Normal file
77
node_modules/vitepress/dist/node/markdownToVue.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createMarkdownToVueRenderFn = void 0;
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const gray_matter_1 = __importDefault(require("gray-matter"));
|
||||
const lru_cache_1 = __importDefault(require("lru-cache"));
|
||||
const markdown_1 = require("./markdown/markdown");
|
||||
const parseHeader_1 = require("./utils/parseHeader");
|
||||
const debug = require('debug')('vitepress:md');
|
||||
const cache = new lru_cache_1.default({ max: 1024 });
|
||||
function createMarkdownToVueRenderFn(root, options = {}) {
|
||||
const md = markdown_1.createMarkdownRenderer(options);
|
||||
return (src, file, lastUpdated, injectData = true) => {
|
||||
file = path_1.default.relative(root, file);
|
||||
const cached = cache.get(src);
|
||||
if (cached) {
|
||||
debug(`[cache hit] ${file}`);
|
||||
return cached;
|
||||
}
|
||||
const start = Date.now();
|
||||
const { content, data: frontmatter } = gray_matter_1.default(src);
|
||||
const { html, data } = md.render(content);
|
||||
// TODO validate data.links?
|
||||
// inject page data
|
||||
const pageData = {
|
||||
title: inferTitle(frontmatter, content),
|
||||
frontmatter,
|
||||
headers: data.headers,
|
||||
relativePath: file.replace(/\\/g, '/'),
|
||||
lastUpdated
|
||||
};
|
||||
const additionalBlocks = injectData
|
||||
? injectPageData(data.hoistedTags || [], pageData)
|
||||
: data.hoistedTags || [];
|
||||
const vueSrc = additionalBlocks.join('\n') + `\n<template><div>${html}</div></template>`;
|
||||
debug(`[render] ${file} in ${Date.now() - start}ms.`);
|
||||
const result = { vueSrc, pageData };
|
||||
cache.set(src, result);
|
||||
return result;
|
||||
};
|
||||
}
|
||||
exports.createMarkdownToVueRenderFn = createMarkdownToVueRenderFn;
|
||||
const scriptRE = /<\/script>/;
|
||||
const defaultExportRE = /((?:^|\n|;)\s*)export(\s*)default/;
|
||||
const namedDefaultExportRE = /((?:^|\n|;)\s*)export(.+)as(\s*)default/;
|
||||
function injectPageData(tags, data) {
|
||||
const code = `\nexport const __pageData = ${JSON.stringify(JSON.stringify(data))}`;
|
||||
const existingScriptIndex = tags.findIndex((tag) => scriptRE.test(tag));
|
||||
if (existingScriptIndex > -1) {
|
||||
const tagSrc = tags[existingScriptIndex];
|
||||
// user has <script> tag inside markdown
|
||||
// if it doesn't have export default it will error out on build
|
||||
const hasDefaultExport = defaultExportRE.test(tagSrc) || namedDefaultExportRE.test(tagSrc);
|
||||
tags[existingScriptIndex] = tagSrc.replace(scriptRE, code + (hasDefaultExport ? `` : `\nexport default{}\n`) + `</script>`);
|
||||
}
|
||||
else {
|
||||
tags.push(`<script>${code}\nexport default {}</script>`);
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
const inferTitle = (frontmatter, content) => {
|
||||
if (frontmatter.home) {
|
||||
return 'Home';
|
||||
}
|
||||
if (frontmatter.title) {
|
||||
return parseHeader_1.deeplyParseHeader(frontmatter.title);
|
||||
}
|
||||
const match = content.match(/^\s*#+\s+(.*)/m);
|
||||
if (match) {
|
||||
return parseHeader_1.deeplyParseHeader(match[1].trim());
|
||||
}
|
||||
return '';
|
||||
};
|
||||
//# sourceMappingURL=markdownToVue.js.map
|
||||
1
node_modules/vitepress/dist/node/markdownToVue.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/markdownToVue.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"markdownToVue.js","sourceRoot":"","sources":["../../src/node/markdownToVue.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,8DAAgC;AAChC,0DAAgC;AAChC,kDAA6E;AAC7E,qDAAuD;AAGvD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAA;AAC9C,MAAM,KAA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ACb,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,WAAgB,EAAE,OAAe,EAAE,EAAE;IACvD,IAAI,WAAW,CAAC,IAAI,EAAE;QACpB,OAAO,MAAM,CAAA;KACd;IACD,IAAI,WAAW,CAAC,KAAK,EAAE;QACrB,OAAO,+BAAiB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;KAC5C;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC7C,IAAI,KAAK,EAAE;QACT,OAAO,+BAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;KAC1C;IACD,OAAO,EAAE,CAAA;AACX,CAAC,CAAA"}
|
||||
7
node_modules/vitepress/dist/node/resolver.d.ts
generated
vendored
Normal file
7
node_modules/vitepress/dist/node/resolver.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Resolver } from 'vite';
|
||||
import { UserConfig } from './config';
|
||||
export declare const APP_PATH: string;
|
||||
export declare const SHARED_PATH: string;
|
||||
export declare const SITE_DATA_ID = "@siteData";
|
||||
export declare const SITE_DATA_REQUEST_PATH: string;
|
||||
export declare function createResolver(themeDir: string, userConfig: UserConfig): Resolver;
|
||||
43
node_modules/vitepress/dist/node/resolver.js
generated
vendored
Normal file
43
node_modules/vitepress/dist/node/resolver.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createResolver = exports.SITE_DATA_REQUEST_PATH = exports.SITE_DATA_ID = exports.SHARED_PATH = exports.APP_PATH = void 0;
|
||||
const path_1 = __importDefault(require("path"));
|
||||
exports.APP_PATH = path_1.default.join(__dirname, '../client/app');
|
||||
exports.SHARED_PATH = path_1.default.join(__dirname, '../client/shared');
|
||||
// special virtual file
|
||||
// we can't directly import '/@siteData' becase
|
||||
// - it's not an actual file so we can't use tsconfig paths to redirect it
|
||||
// - TS doesn't allow shimming a module that starts with '/'
|
||||
exports.SITE_DATA_ID = '@siteData';
|
||||
exports.SITE_DATA_REQUEST_PATH = '/' + exports.SITE_DATA_ID;
|
||||
// this is a path resolver that is passed to vite
|
||||
// so that we can resolve custom requests that start with /@app or /@theme
|
||||
// we also need to map file paths back to their public served paths so that
|
||||
// vite HMR can send the correct update notifications to the client.
|
||||
function createResolver(themeDir, userConfig) {
|
||||
return {
|
||||
alias: {
|
||||
...userConfig.alias,
|
||||
'/@app/': exports.APP_PATH,
|
||||
'/@theme/': themeDir,
|
||||
'/@shared/': exports.SHARED_PATH,
|
||||
vitepress: '/@app/exports.js',
|
||||
[exports.SITE_DATA_ID]: exports.SITE_DATA_REQUEST_PATH
|
||||
},
|
||||
requestToFile(publicPath) {
|
||||
if (publicPath === exports.SITE_DATA_REQUEST_PATH) {
|
||||
return exports.SITE_DATA_REQUEST_PATH;
|
||||
}
|
||||
},
|
||||
fileToRequest(filePath) {
|
||||
if (filePath === exports.SITE_DATA_REQUEST_PATH) {
|
||||
return exports.SITE_DATA_REQUEST_PATH;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
exports.createResolver = createResolver;
|
||||
//# sourceMappingURL=resolver.js.map
|
||||
1
node_modules/vitepress/dist/node/resolver.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/resolver.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../src/node/resolver.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AAIV,QAAA,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,CAAA;AAChD,QAAA,WAAW,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAA;AAEnE,uBAAuB;AACvB,+CAA+C;AAC/C,0EAA0E;AAC1E,4DAA4D;AAC/C,QAAA,YAAY,GAAG,WAAW,CAAA;AAC1B,QAAA,sBAAsB,GAAG,GAAG,GAAG,oBAAY,CAAA;AAExD,iDAAiD;AACjD,0EAA0E;AAC1E,2EAA2E;AAC3E,oEAAoE;AACpE,SAAgB,cAAc,CAC5B,QAAgB,EAChB,UAAsB;IAEtB,OAAO;QACL,KAAK,EAAE;YACL,GAAG,UAAU,CAAC,KAAK;YACnB,QAAQ,EAAE,gBAAQ;YAClB,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,mBAAW;YACxB,SAAS,EAAE,kBAAkB;YAC7B,CAAC,oBAAY,CAAC,EAAE,8BAAsB;SACvC;QACD,aAAa,CAAC,UAAU;YACtB,IAAI,UAAU,KAAK,8BAAsB,EAAE;gBACzC,OAAO,8BAAsB,CAAA;aAC9B;QACH,CAAC;QACD,aAAa,CAAC,QAAQ;YACpB,IAAI,QAAQ,KAAK,8BAAsB,EAAE;gBACvC,OAAO,8BAAsB,CAAA;aAC9B;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAxBD,wCAwBC"}
|
||||
3
node_modules/vitepress/dist/node/server.d.ts
generated
vendored
Normal file
3
node_modules/vitepress/dist/node/server.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { ServerConfig } from 'vite';
|
||||
export declare function createServer(options?: ServerConfig): Promise<import("http").Server>;
|
||||
145
node_modules/vitepress/dist/node/server.js
generated
vendored
Normal file
145
node_modules/vitepress/dist/node/server.js
generated
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createServer = void 0;
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const vite_1 = require("vite");
|
||||
const config_1 = require("./config");
|
||||
const markdownToVue_1 = require("./markdownToVue");
|
||||
const resolver_1 = require("./resolver");
|
||||
const fs_1 = require("fs");
|
||||
const debug = require('debug')('vitepress:serve');
|
||||
const debugHmr = require('debug')('vitepress:hmr');
|
||||
function createVitePressPlugin({ configPath, site: initialSiteData }) {
|
||||
return ({ app, root, watcher, resolver }) => {
|
||||
const markdownToVue = markdownToVue_1.createMarkdownToVueRenderFn(root);
|
||||
// hot reload .md files as .vue files
|
||||
watcher.on('change', async (file) => {
|
||||
if (file.endsWith('.md')) {
|
||||
debugHmr(`reloading ${file}`);
|
||||
const content = await vite_1.cachedRead(null, file);
|
||||
const timestamp = Date.now();
|
||||
const { pageData, vueSrc } = markdownToVue(content.toString(), file, timestamp,
|
||||
// do not inject pageData on HMR
|
||||
// it leads to vite to think <script> has changed and reloads the
|
||||
// component instead of re-rendering.
|
||||
// pageData needs separate HMR logic anyway (see below)
|
||||
false);
|
||||
// notify the client to update page data
|
||||
watcher.send({
|
||||
type: 'custom',
|
||||
id: 'vitepress:pageData',
|
||||
customData: {
|
||||
path: resolver.fileToRequest(file),
|
||||
pageData
|
||||
}
|
||||
});
|
||||
// reload the content component
|
||||
watcher.handleVueReload(file, timestamp, vueSrc);
|
||||
}
|
||||
});
|
||||
// hot reload handling for siteData
|
||||
// the data is stringified twice so it is sent to the client as a string
|
||||
// it is then parsed on the client via JSON.parse() which is faster than
|
||||
// parsing the object literal as JavaScript.
|
||||
let siteData = initialSiteData;
|
||||
let stringifiedData = JSON.stringify(JSON.stringify(initialSiteData));
|
||||
watcher.add(configPath);
|
||||
watcher.on('change', async (file) => {
|
||||
if (file === configPath) {
|
||||
const newData = await config_1.resolveSiteData(root);
|
||||
stringifiedData = JSON.stringify(JSON.stringify(newData));
|
||||
if (newData.base !== siteData.base) {
|
||||
console.warn(`[vitepress]: config.base has changed. Please restart the dev server.`);
|
||||
}
|
||||
siteData = newData;
|
||||
watcher.handleJSReload(resolver_1.SITE_DATA_REQUEST_PATH);
|
||||
}
|
||||
});
|
||||
// inject Koa middleware
|
||||
app.use(async (ctx, next) => {
|
||||
// serve siteData (which is a virtual file)
|
||||
if (ctx.path === resolver_1.SITE_DATA_REQUEST_PATH) {
|
||||
ctx.type = 'js';
|
||||
ctx.body = `export default ${stringifiedData}`;
|
||||
debug(ctx.url);
|
||||
return;
|
||||
}
|
||||
// handle .md -> vue transforms
|
||||
if (ctx.path.endsWith('.md')) {
|
||||
const file = resolver.requestToFile(ctx.path);
|
||||
if (!fs_1.existsSync(file)) {
|
||||
return next();
|
||||
}
|
||||
await vite_1.cachedRead(ctx, file);
|
||||
// let vite know this is supposed to be treated as vue file
|
||||
ctx.vue = true;
|
||||
const { vueSrc, pageData } = markdownToVue(ctx.body, file, ctx.lastModified.getTime(), false);
|
||||
ctx.body = vueSrc;
|
||||
debug(ctx.url, ctx.status);
|
||||
const pageDataWithLinks = {
|
||||
...pageData,
|
||||
// TODO: this doesn't work with locales
|
||||
...getNextAndPrev(siteData.themeConfig, ctx.path)
|
||||
};
|
||||
await next();
|
||||
// make sure this is the main <script> block
|
||||
if (!ctx.query.type) {
|
||||
// inject pageData to generated script
|
||||
ctx.body += `\nexport const __pageData = ${JSON.stringify(JSON.stringify(pageDataWithLinks))}`;
|
||||
}
|
||||
return;
|
||||
}
|
||||
await next();
|
||||
// serve our index.html after vite history fallback
|
||||
if (ctx.url.endsWith('.html')) {
|
||||
await vite_1.cachedRead(ctx, path_1.default.join(resolver_1.APP_PATH, 'index.html'));
|
||||
ctx.status = 200;
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
function getNextAndPrev(themeConfig, pagePath) {
|
||||
if (!themeConfig.sidebar) {
|
||||
return;
|
||||
}
|
||||
const sidebar = themeConfig.sidebar;
|
||||
let candidates = [];
|
||||
Object.keys(sidebar).forEach((k) => {
|
||||
if (!pagePath.startsWith(k)) {
|
||||
return;
|
||||
}
|
||||
sidebar[k].forEach((sidebarItem) => {
|
||||
if (!sidebarItem.children) {
|
||||
return;
|
||||
}
|
||||
sidebarItem.children.forEach((candidate) => {
|
||||
candidates.push(candidate);
|
||||
});
|
||||
});
|
||||
});
|
||||
const path = pagePath.replace(/\.(md|html)$/, '');
|
||||
const currentLinkIndex = candidates.findIndex((v) => v.link === path);
|
||||
const nextAndPrev = {};
|
||||
if (themeConfig.nextLinks !== false &&
|
||||
currentLinkIndex > -1 &&
|
||||
currentLinkIndex < candidates.length - 1) {
|
||||
nextAndPrev.next = candidates[currentLinkIndex + 1];
|
||||
}
|
||||
if (themeConfig.prevLinks !== false && currentLinkIndex > 0) {
|
||||
nextAndPrev.next = candidates[currentLinkIndex - 1];
|
||||
}
|
||||
return nextAndPrev;
|
||||
}
|
||||
async function createServer(options = {}) {
|
||||
const config = await config_1.resolveConfig(options.root);
|
||||
return vite_1.createServer({
|
||||
...options,
|
||||
configureServer: createVitePressPlugin(config),
|
||||
resolvers: [config.resolver]
|
||||
});
|
||||
}
|
||||
exports.createServer = createServer;
|
||||
//# sourceMappingURL=server.js.map
|
||||
1
node_modules/vitepress/dist/node/server.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/server.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/node/server.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,+BAKa;AACb,qCAAqE;AACrE,mDAA6D;AAC7D,yCAA6D;AAC7D,2BAA+B;AAE/B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAAA;AACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAA;AAElD,SAAS,qBAAqB,CAAC,EAC7B,UAAU,EACV,IAAI,EAAE,eAAe,EACV;IACX,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,MAAM,aAAa,GAAG,2CAA2B,CAAC,IAAI,CAAC,CAAA;QAEv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ared/config.d.ts
generated
vendored
Normal file
10
node_modules/vitepress/dist/node/shared/config.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { SiteData } from '/@types/shared';
|
||||
export declare function resolveSiteDataByRoute(siteData: SiteData, route: string): {
|
||||
themeConfig: any;
|
||||
locales: {};
|
||||
lang: string;
|
||||
title: string;
|
||||
description: string;
|
||||
base: string;
|
||||
head: import("../../../types/shared").HeadConfig[];
|
||||
};
|
||||
55
node_modules/vitepress/dist/node/shared/config.js
generated
vendored
Normal file
55
node_modules/vitepress/dist/node/shared/config.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveSiteDataByRoute = void 0;
|
||||
const inBrowser = typeof window !== 'undefined';
|
||||
function findMatchRoot(route, roots) {
|
||||
// first match to the routes with the most deep level.
|
||||
roots.sort((a, b) => {
|
||||
const levelDelta = b.split('/').length - a.split('/').length;
|
||||
if (levelDelta !== 0) {
|
||||
return levelDelta;
|
||||
}
|
||||
else {
|
||||
return b.length - a.length;
|
||||
}
|
||||
});
|
||||
for (const r of roots) {
|
||||
if (route.startsWith(r))
|
||||
return r;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
function resolveLocales(locales, route) {
|
||||
const localeRoot = findMatchRoot(route, Object.keys(locales));
|
||||
return localeRoot ? locales[localeRoot] : undefined;
|
||||
}
|
||||
// this merges the locales data to the main data by the route
|
||||
function resolveSiteDataByRoute(siteData, route) {
|
||||
route = cleanRoute(siteData, route);
|
||||
const localeData = resolveLocales(siteData.locales || {}, route) || {};
|
||||
const localeThemeConfig = resolveLocales((siteData.themeConfig && siteData.themeConfig.locales) || {}, route) || {};
|
||||
return {
|
||||
...siteData,
|
||||
...localeData,
|
||||
themeConfig: {
|
||||
...siteData.themeConfig,
|
||||
...localeThemeConfig,
|
||||
// clean the locales to reduce the bundle size
|
||||
locales: {}
|
||||
},
|
||||
locales: {}
|
||||
};
|
||||
}
|
||||
exports.resolveSiteDataByRoute = resolveSiteDataByRoute;
|
||||
/**
|
||||
* Clean up the route by removing the `base` path if it's set in config.
|
||||
*/
|
||||
function cleanRoute(siteData, route) {
|
||||
if (!inBrowser) {
|
||||
return route;
|
||||
}
|
||||
const base = siteData.base;
|
||||
const baseWithoutSuffix = base.endsWith('/') ? base.slice(0, -1) : base;
|
||||
return route.slice(baseWithoutSuffix.length);
|
||||
}
|
||||
//# sourceMappingURL=config.js.map
|
||||
1
node_modules/vitepress/dist/node/shared/config.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/shared/config.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/node/shared/config.ts"],"names":[],"mappings":";;;AAEA,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,CAAA;AAE/C,SAAS,aAAa,CAAC,KAAa,EAAE,KAAe;IACnD,sDAAsD;IACtD,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAClB,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAA;QAC5D,IAAI,UAAU,KAAK,CAAC,EAAE;YACpB,OAAO,UAAU,CAAA;SAClB;aAAM;YACL,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAA;SAC3B;IACH,CAAC,CAAC,CAAA;IAEF,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE;QACrB,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAA;KAClC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,SAAS,cAAc,CACrB,OAA0B,EAC1B,KAAa;IAEb,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC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d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare const removeNonCodeWrappedHTML: (str: string) => string;
|
||||
export declare const parseHeader: (str: string) => string;
|
||||
export declare const deeplyParseHeader: (str: string) => string;
|
||||
52
node_modules/vitepress/dist/node/utils/parseHeader.js
generated
vendored
Normal file
52
node_modules/vitepress/dist/node/utils/parseHeader.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
// Since VuePress needs to extract the header from the markdown source
|
||||
// file and display it in the sidebar or title (#238), this file simply
|
||||
// removes some unnecessary elements to make header displays well at
|
||||
// sidebar or title.
|
||||
//
|
||||
// But header's parsing in the markdown content is done by the markdown
|
||||
// loader based on markdown-it. markdown-it parser will will always keep
|
||||
// HTML in headers, so in VuePress, after being parsed by the markdiwn
|
||||
// loader, the raw HTML in headers will finally be parsed by Vue-loader.
|
||||
// so that we can write HTML/Vue in the header. One exception is the HTML
|
||||
// wrapped by <code>(markdown token: '`') tag.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.deeplyParseHeader = exports.parseHeader = exports.removeNonCodeWrappedHTML = void 0;
|
||||
const parseEmojis = (str) => {
|
||||
const emojiData = require('markdown-it-emoji/lib/data/full.json');
|
||||
return String(str).replace(/:(.+?):/g, (placeholder, key) => emojiData[key] || placeholder);
|
||||
};
|
||||
const unescapeHtml = (html) => String(html)
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, "'")
|
||||
.replace(/:/g, ':')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
const removeMarkdownTokens = (str) => String(str)
|
||||
.replace(/\[(.*)\]\(.*\)/, '$1') // []()
|
||||
.replace(/(`|\*{1,3}|_)(.*?[^\\])\1/g, '$2') // `{t}` | *{t}* | **{t}** | ***{t}*** | _{t}_
|
||||
.replace(/(\\)(\*|_|`|\!)/g, '$2'); // remove escape char '\'
|
||||
const trim = (str) => str.trim();
|
||||
// This method remove the raw HTML but reserve the HTML wrapped by `<code>`.
|
||||
// e.g.
|
||||
// Input: "<a> b", Output: "b"
|
||||
// Input: "`<a>` b", Output: "`<a>` b"
|
||||
exports.removeNonCodeWrappedHTML = (str) => {
|
||||
return String(str).replace(/(^|[^><`])<.*>([^><`]|$)/g, '$1$2');
|
||||
};
|
||||
const compose = (...processors) => {
|
||||
if (processors.length === 0)
|
||||
return (input) => input;
|
||||
if (processors.length === 1)
|
||||
return processors[0];
|
||||
return processors.reduce((prev, next) => {
|
||||
return (str) => next(prev(str));
|
||||
});
|
||||
};
|
||||
// Unescape html, parse emojis and remove some md tokens.
|
||||
exports.parseHeader = compose(unescapeHtml, parseEmojis, removeMarkdownTokens, trim);
|
||||
// Also clean the html that isn't wrapped by code.
|
||||
// Because we want to support using VUE components in headers.
|
||||
// e.g. https://vuepress.vuejs.org/guide/using-vue.html#badge
|
||||
exports.deeplyParseHeader = compose(exports.removeNonCodeWrappedHTML, exports.parseHeader);
|
||||
//# sourceMappingURL=parseHeader.js.map
|
||||
1
node_modules/vitepress/dist/node/utils/parseHeader.js.map
generated
vendored
Normal file
1
node_modules/vitepress/dist/node/utils/parseHeader.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"parseHeader.js","sourceRoot":"","sources":["../../../src/node/utils/parseHeader.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,uEAAuE;AACvE,oEAAoE;AACpE,oBAAoB;AACpB,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,sEAAsE;AACtE,wEAAwE;AACxE,yEAAyE;AACzE,8CAA8C;;;AAE9C,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;IAClC,MAAM,SAAS,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAA;IACjE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CACxB,UAAU,EACV,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,WAAW,CACp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