@mintlify/cli 4.0.1531 → 4.0.1533

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
  }
@@ -2836,6 +2846,9 @@ function deriveFrontmatterTypeSets() {
2836
2846
  if (unwrapped instanceof z.ZodArray) {
2837
2847
  arrayKeys.add(key);
2838
2848
  }
2849
+ if (unwrapped instanceof z.ZodUnion && unwrapped.options.every((option) => option instanceof z.ZodArray)) {
2850
+ arrayKeys.add(key);
2851
+ }
2839
2852
  }
2840
2853
  return { booleanKeys, arrayKeys };
2841
2854
  }
@@ -3694,7 +3707,9 @@ function renderTableBlockContent(node, options, renderInline2, renderNode2, html
3694
3707
  });
3695
3708
  items.push(`<li>${itemParts.join(" ")}</li>`);
3696
3709
  });
3697
- 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}>`;
3698
3713
  }
3699
3714
  return renderTableNodeContent(node, options, renderNode2, htmlTable);
3700
3715
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.1531",
3
+ "version": "4.0.1533",
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.1167",
49
- "@mintlify/link-rot": "3.0.1371",
50
- "@mintlify/models": "0.0.361",
51
- "@mintlify/prebuild": "1.0.1323",
52
- "@mintlify/previewing": "4.0.1395",
53
- "@mintlify/validation": "0.1.870",
48
+ "@mintlify/common": "1.0.1168",
49
+ "@mintlify/link-rot": "3.0.1372",
50
+ "@mintlify/models": "0.0.362",
51
+ "@mintlify/prebuild": "1.0.1324",
52
+ "@mintlify/previewing": "4.0.1396",
53
+ "@mintlify/validation": "0.1.871",
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.413",
89
+ "@mintlify/editor": "0.0.415",
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": "911e38430b27326a0cc48ddec95d31b0333b26ff"
108
+ "gitHead": "d7e54a284fb9daaf351aec5183f20e68802a48c4"
109
109
  }