@mintlify/cli 4.0.1532 → 4.0.1534

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.
@@ -993,6 +993,14 @@ function parseExpressionValue(raw, estree, staticOnly) {
993
993
  }
994
994
  return raw;
995
995
  }
996
+ function parseOrderedListStart(attributes = []) {
997
+ const value = parseMdxAttributes(attributes, { staticOnly: true }).start;
998
+ if (typeof value === "number")
999
+ return Number.isInteger(value) ? value : 1;
1000
+ if (typeof value === "string" && /^\s*-?\d+\s*$/.test(value))
1001
+ return Number(value);
1002
+ return 1;
1003
+ }
996
1004
  function parseMdxAttributes(attributes = [], options = {}) {
997
1005
  var _a, _b, _c;
998
1006
  const parsed = {};
@@ -1972,6 +1980,7 @@ function convertHtmlTableCellChildren(cell, ctx, transformNode2, mapJsxChildren2
1972
1980
  if (items.length > 0) {
1973
1981
  result.push({
1974
1982
  type: child.name === "ol" ? "orderedList" : "bulletList",
1983
+ attrs: child.name === "ol" ? { start: parseOrderedListStart(child.attributes) } : {},
1975
1984
  content: items
1976
1985
  });
1977
1986
  }
@@ -2375,6 +2384,7 @@ function buildMarkdownTableCellContent(children, ctx, transformNode2) {
2375
2384
  if (items.length > 0) {
2376
2385
  cellContent.push({
2377
2386
  type: child.name === "ol" ? "orderedList" : "bulletList",
2387
+ attrs: child.name === "ol" ? { start: parseOrderedListStart(child.attributes) } : {},
2378
2388
  content: items
2379
2389
  });
2380
2390
  }
@@ -3697,7 +3707,9 @@ function renderTableBlockContent(node, options, renderInline2, renderNode2, html
3697
3707
  });
3698
3708
  items.push(`<li>${itemParts.join(" ")}</li>`);
3699
3709
  });
3700
- return `<${tag}>${items.join("")}</${tag}>`;
3710
+ const start = node.attrs.start;
3711
+ const openTag = tag === "ol" && typeof start === "number" && start !== 1 ? `<ol start="${start}">` : `<${tag}>`;
3712
+ return `${openTag}${items.join("")}</${tag}>`;
3701
3713
  }
3702
3714
  return renderTableNodeContent(node, options, renderNode2, htmlTable);
3703
3715
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.1532",
3
+ "version": "4.0.1534",
4
4
  "description": "The Mintlify CLI",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -45,12 +45,12 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@inquirer/prompts": "7.9.0",
48
- "@mintlify/common": "1.0.1168",
49
- "@mintlify/link-rot": "3.0.1372",
48
+ "@mintlify/common": "1.0.1169",
49
+ "@mintlify/link-rot": "3.0.1373",
50
50
  "@mintlify/models": "0.0.362",
51
- "@mintlify/prebuild": "1.0.1324",
52
- "@mintlify/previewing": "4.0.1396",
53
- "@mintlify/validation": "0.1.871",
51
+ "@mintlify/prebuild": "1.0.1325",
52
+ "@mintlify/previewing": "4.0.1397",
53
+ "@mintlify/validation": "0.1.872",
54
54
  "adm-zip": "0.6.0",
55
55
  "chalk": "5.2.0",
56
56
  "color": "4.2.3",
@@ -86,7 +86,7 @@
86
86
  "keytar": "7.9.0"
87
87
  },
88
88
  "devDependencies": {
89
- "@mintlify/editor": "0.0.414",
89
+ "@mintlify/editor": "0.0.416",
90
90
  "@mintlify/ts-config": "2.0.2",
91
91
  "@tsconfig/recommended": "1.0.2",
92
92
  "@types/detect-port": "1.3.2",
@@ -105,5 +105,5 @@
105
105
  "vitest": "2.1.9",
106
106
  "vitest-mock-process": "1.0.4"
107
107
  },
108
- "gitHead": "31c0fd6a96ce79e4312c7e1ac2e891e26b62af65"
108
+ "gitHead": "2adc4a0cb181ebb7ad7c9c71b8bf25a64c617813"
109
109
  }