@ox-content/vite-plugin 2.27.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +67 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +10 -3
- package/dist/index.mjs.map +1 -1
- package/dist/pm.cjs +45 -0
- package/dist/pm.cjs.map +1 -0
- package/dist/pm.mjs +2 -0
- package/dist/pm2.mjs +38 -0
- package/dist/pm2.mjs.map +1 -0
- package/dist/tabs.cjs +26 -0
- package/dist/tabs.cjs.map +1 -1
- package/dist/tabs.mjs +1 -1
- package/dist/tabs2.mjs +13 -1
- package/dist/tabs2.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@ const require_chunk = require("./chunk.cjs");
|
|
|
3
3
|
const require_napi = require("./napi.cjs");
|
|
4
4
|
const require_mermaid = require("./mermaid.cjs");
|
|
5
5
|
const require_tabs = require("./tabs.cjs");
|
|
6
|
+
require("./pm.cjs");
|
|
6
7
|
const require_youtube = require("./youtube.cjs");
|
|
7
8
|
const require_github = require("./github.cjs");
|
|
8
9
|
const require_ogp = require("./ogp.cjs");
|
|
@@ -280,13 +281,17 @@ async function highlightCode(html, theme = "github-dark", langs = []) {
|
|
|
280
281
|
* Transform all enabled plugins in HTML content.
|
|
281
282
|
*/
|
|
282
283
|
async function transformAllPlugins(html, options = {}) {
|
|
283
|
-
const { tabs = true, youtube = true, github = true, ogp, openGraph, mermaid = true, githubToken } = options;
|
|
284
|
+
const { tabs = true, pm = true, youtube = true, github = true, ogp, openGraph, mermaid = true, githubToken } = options;
|
|
284
285
|
let result = html;
|
|
285
286
|
const ogpOptions = openGraph ?? ogp ?? true;
|
|
286
287
|
if (tabs) {
|
|
287
288
|
const { transformTabs } = await Promise.resolve().then(() => require("./tabs.cjs")).then((n) => n.tabs_exports);
|
|
288
289
|
result = await transformTabs(result);
|
|
289
290
|
}
|
|
291
|
+
if (pm !== false) {
|
|
292
|
+
const { transformPm } = await Promise.resolve().then(() => require("./pm.cjs")).then((n) => n.pm_exports);
|
|
293
|
+
result = await transformPm(result, typeof pm === "object" ? pm : {});
|
|
294
|
+
}
|
|
290
295
|
if (youtube) {
|
|
291
296
|
const { transformYouTube } = await Promise.resolve().then(() => require("./youtube.cjs")).then((n) => n.youtube_exports);
|
|
292
297
|
result = await transformYouTube(result);
|
|
@@ -656,7 +661,8 @@ function generateMarkdown(docs, options) {
|
|
|
656
661
|
githubUrl: options.githubUrl,
|
|
657
662
|
linkStyle: options.linkStyle,
|
|
658
663
|
basePath: options.basePath,
|
|
659
|
-
pathStrategy: options.pathStrategy
|
|
664
|
+
pathStrategy: options.pathStrategy,
|
|
665
|
+
renderStyle: options.renderStyle
|
|
660
666
|
});
|
|
661
667
|
}
|
|
662
668
|
/**
|
|
@@ -719,6 +725,7 @@ function resolveDocsOptions(options) {
|
|
|
719
725
|
linkStyle: opts.linkStyle ?? "markdown",
|
|
720
726
|
basePath: opts.basePath,
|
|
721
727
|
pathStrategy: opts.pathStrategy ?? "flat",
|
|
728
|
+
renderStyle: opts.renderStyle ?? "html",
|
|
722
729
|
generateNav: opts.generateNav ?? true
|
|
723
730
|
};
|
|
724
731
|
}
|