@slidev/parser 0.50.0-beta.9 → 0.50.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.
@@ -5,18 +5,18 @@ function parseRangeString(total, rangeStr) {
5
5
  return range(1, total + 1);
6
6
  if (rangeStr === "none")
7
7
  return [];
8
- const pages = [];
8
+ const indexes = [];
9
9
  for (const part of rangeStr.split(/[,;]/g)) {
10
10
  if (!part.includes("-")) {
11
- pages.push(+part);
11
+ indexes.push(+part);
12
12
  } else {
13
13
  const [start, end] = part.split("-", 2);
14
- pages.push(
14
+ indexes.push(
15
15
  ...range(+start, !end ? total + 1 : +end + 1)
16
16
  );
17
17
  }
18
18
  }
19
- return uniq(pages).filter((i) => i <= total).sort((a, b) => a - b);
19
+ return uniq(indexes).filter((i) => i <= total).sort((a, b) => a - b);
20
20
  }
21
21
  function parseAspectRatio(str) {
22
22
  if (isNumber(str))
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseAspectRatio
3
- } from "./chunk-KUD5POMT.mjs";
3
+ } from "./chunk-47YLTX76.mjs";
4
4
 
5
5
  // src/core.ts
6
6
  import { ensurePrefix } from "@antfu/utils";
@@ -38,9 +38,11 @@ function getDefaultConfig() {
38
38
  drawings: {},
39
39
  plantUmlServer: "https://www.plantuml.com/plantuml",
40
40
  codeCopy: true,
41
+ author: "",
41
42
  record: "dev",
42
43
  css: "unocss",
43
44
  presenter: true,
45
+ browserExporter: "dev",
44
46
  htmlAttrs: {},
45
47
  transition: null,
46
48
  editor: true,
package/dist/core.mjs CHANGED
@@ -11,11 +11,11 @@ import {
11
11
  stringify,
12
12
  stringifySlide,
13
13
  verifyConfig
14
- } from "./chunk-QBSOSQIN.mjs";
14
+ } from "./chunk-JZNWQ6OH.mjs";
15
15
  import {
16
16
  parseAspectRatio,
17
17
  parseRangeString
18
- } from "./chunk-KUD5POMT.mjs";
18
+ } from "./chunk-47YLTX76.mjs";
19
19
  export {
20
20
  detectFeatures,
21
21
  getDefaultConfig,
package/dist/fs.mjs CHANGED
@@ -11,11 +11,11 @@ import {
11
11
  stringify,
12
12
  stringifySlide,
13
13
  verifyConfig
14
- } from "./chunk-QBSOSQIN.mjs";
14
+ } from "./chunk-JZNWQ6OH.mjs";
15
15
  import {
16
16
  parseAspectRatio,
17
17
  parseRangeString
18
- } from "./chunk-KUD5POMT.mjs";
18
+ } from "./chunk-47YLTX76.mjs";
19
19
 
20
20
  // src/fs.ts
21
21
  import fs from "node:fs";
package/dist/index.mjs CHANGED
@@ -11,11 +11,11 @@ import {
11
11
  stringify,
12
12
  stringifySlide,
13
13
  verifyConfig
14
- } from "./chunk-QBSOSQIN.mjs";
14
+ } from "./chunk-JZNWQ6OH.mjs";
15
15
  import {
16
16
  parseAspectRatio,
17
17
  parseRangeString
18
- } from "./chunk-KUD5POMT.mjs";
18
+ } from "./chunk-47YLTX76.mjs";
19
19
  export {
20
20
  detectFeatures,
21
21
  getDefaultConfig,
package/dist/utils.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  parseAspectRatio,
3
3
  parseRangeString
4
- } from "./chunk-KUD5POMT.mjs";
4
+ } from "./chunk-47YLTX76.mjs";
5
5
  export {
6
6
  parseAspectRatio,
7
7
  parseRangeString
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/parser",
3
- "version": "0.50.0-beta.9",
3
+ "version": "0.50.0",
4
4
  "description": "Markdown parser for Slidev",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "dependencies": {
43
43
  "@antfu/utils": "^0.7.10",
44
44
  "yaml": "^2.6.1",
45
- "@slidev/types": "0.50.0-beta.9"
45
+ "@slidev/types": "0.50.0"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "rimraf dist && tsup src/index.ts src/core.ts src/fs.ts src/utils.ts",