@slidev/cli 52.3.0 → 52.4.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.
@@ -1,4 +1,4 @@
1
- import { resolveViteConfigs } from "./shared-BprRGKGN.js";
1
+ import { resolveViteConfigs } from "./shared-Dgsw_Krn.js";
2
2
  import "./resolver-BVx3X6zp.js";
3
3
  import fs from "node:fs/promises";
4
4
  import { join, resolve } from "node:path";
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
- import { getThemeMeta, loadSetups, parser, resolveAddons, resolveOptions, resolveTheme, updateFrontmatterPatch, version } from "./shared-BprRGKGN.js";
1
+ import { getThemeMeta, loadSetups, parser, resolveAddons, resolveOptions, resolveTheme, updateFrontmatterPatch, version } from "./shared-Dgsw_Krn.js";
2
2
  import { getRoots, isInstalledGlobally, resolveEntry } from "./resolver-BVx3X6zp.js";
3
- import { createServer } from "./serve-BRMU89Km.js";
3
+ import { createServer } from "./serve-DmyF8x-T.js";
4
4
  import { exec } from "node:child_process";
5
5
  import fs from "node:fs/promises";
6
6
  import os from "node:os";
@@ -292,7 +292,7 @@ cli.command("build [entry..]", "Build hostable SPA", (args) => exportOptions(com
292
292
  describe: "enable the inspect plugin for debugging"
293
293
  }).strict().help(), async (args) => {
294
294
  const { entry, theme, base, download, out, inspect } = args;
295
- const { build } = await import("./build-DXIZjHJg.js");
295
+ const { build } = await import("./build-C0y3jflF.js");
296
296
  for (const entryFile of entry) {
297
297
  const options = await resolveOptions({
298
298
  entry: entryFile,
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { ViteSlidevPlugin, createDataUtils, parser, resolveOptions } from "./shared-BprRGKGN.js";
1
+ import { ViteSlidevPlugin, createDataUtils, parser, resolveOptions } from "./shared-Dgsw_Krn.js";
2
2
  import "./resolver-BVx3X6zp.js";
3
- import { createServer } from "./serve-BRMU89Km.js";
3
+ import { createServer } from "./serve-DmyF8x-T.js";
4
4
 
5
5
  export { ViteSlidevPlugin, createDataUtils, createServer, parser, resolveOptions };
@@ -1,4 +1,4 @@
1
- import { resolveViteConfigs } from "./shared-BprRGKGN.js";
1
+ import { resolveViteConfigs } from "./shared-Dgsw_Krn.js";
2
2
  import { join } from "node:path";
3
3
  import process from "node:process";
4
4
  import { createServer } from "vite";
@@ -42,7 +42,7 @@ import Vue from "@vitejs/plugin-vue";
42
42
  import VueJsx from "@vitejs/plugin-vue-jsx";
43
43
 
44
44
  //#region package.json
45
- var version = "52.3.0";
45
+ var version = "52.4.0";
46
46
 
47
47
  //#endregion
48
48
  //#region node/syntax/markdown-it/markdown-it-link.ts
@@ -1513,10 +1513,20 @@ function createSlidesLoader(options, serverOptions) {
1513
1513
  };
1514
1514
  function renderNote(text = "") {
1515
1515
  let clickCount = 0;
1516
- return notesMd.render(text.replace(/\[click(?::(\d+))?\]/gi, (_, count = 1) => {
1516
+ const notesAutoRuby = data.headmatter.notesAutoRuby || {};
1517
+ let md = text.replace(/\[click(?::(\d+))?\]/gi, (_, count = 1) => {
1517
1518
  clickCount += Number(count);
1518
1519
  return `<span class="slidev-note-click-mark" data-clicks="${clickCount}"></span>`;
1519
- }));
1520
+ });
1521
+ const keys = Object.keys(notesAutoRuby).sort((b, a) => b.length - a.length).map((i) => /^[\w-]+$/.test(i) ? `\\b${i}\\b` : i);
1522
+ if (keys.length) {
1523
+ const regex = new RegExp(`(${keys.join("|")})`, "g");
1524
+ md = md.replace(regex, (match) => {
1525
+ if (notesAutoRuby[match]) return `<ruby>${match}<rt>${notesAutoRuby[match]}</rt></ruby>`;
1526
+ return match;
1527
+ });
1528
+ }
1529
+ return notesMd.render(md);
1520
1530
  }
1521
1531
  function withRenderedNote(data$1) {
1522
1532
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
3
  "type": "module",
4
- "version": "52.3.0",
4
+ "version": "52.4.0",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -109,9 +109,9 @@
109
109
  "vue": "^3.5.22",
110
110
  "yaml": "^2.8.1",
111
111
  "yargs": "^18.0.0",
112
- "@slidev/types": "52.3.0",
113
- "@slidev/client": "52.3.0",
114
- "@slidev/parser": "52.3.0"
112
+ "@slidev/client": "52.4.0",
113
+ "@slidev/parser": "52.4.0",
114
+ "@slidev/types": "52.4.0"
115
115
  },
116
116
  "devDependencies": {
117
117
  "@hedgedoc/markdown-it-plugins": "^2.1.4",