@mintlify/cli 4.0.1523 → 4.0.1525
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/bin/vendor/converter.js
CHANGED
|
@@ -1263,7 +1263,8 @@ import remarkFrontmatter from "remark-frontmatter";
|
|
|
1263
1263
|
import remarkGfm from "remark-gfm";
|
|
1264
1264
|
import remarkMath from "remark-math";
|
|
1265
1265
|
import remarkMdx from "remark-mdx";
|
|
1266
|
-
var coreRemark = remark().use(remarkMdx).use(remarkGfm).use(remarkFrontmatter, ["yaml", "toml"]).
|
|
1266
|
+
var coreRemark = remark().use(remarkMdx).use(remarkGfm).use(remarkFrontmatter, ["yaml", "toml"]).freeze();
|
|
1267
|
+
var mathRemark = coreRemark().use(remarkMath).freeze();
|
|
1267
1268
|
function convertHtmlCommentsToJsx(mdx) {
|
|
1268
1269
|
const parts = mdx.split(/(```[\s\S]*?```|~~~[\s\S]*?~~~)/);
|
|
1269
1270
|
return parts.map((part, i) => i % 2 === 0 ? part.replace(/<!--([\s\S]*?)-->/g, (_m, c) => `{/* ${c} */}`) : part).join("");
|
|
@@ -1276,13 +1277,13 @@ function preprocessMdxSource(mdx, options = {}) {
|
|
|
1276
1277
|
preprocessed: preprocessCustomHeadingIds(sanitized, { preserveOriginal: true })
|
|
1277
1278
|
};
|
|
1278
1279
|
}
|
|
1279
|
-
function parsePreprocessedMdx(preprocessed) {
|
|
1280
|
-
return coreRemark().parse(preprocessed);
|
|
1280
|
+
function parsePreprocessedMdx(preprocessed, math = true) {
|
|
1281
|
+
return (math ? mathRemark : coreRemark)().parse(preprocessed);
|
|
1281
1282
|
}
|
|
1282
1283
|
function mdxToMdast(mdx, options = {
|
|
1283
1284
|
omitHtmlComments: true
|
|
1284
1285
|
}) {
|
|
1285
|
-
return parsePreprocessedMdx(preprocessMdxSource(mdx, options).preprocessed);
|
|
1286
|
+
return parsePreprocessedMdx(preprocessMdxSource(mdx, options).preprocessed, options.math);
|
|
1286
1287
|
}
|
|
1287
1288
|
|
|
1288
1289
|
// ../editor/dist/converter/parse/handlers/prompt.js
|
|
@@ -2530,7 +2531,7 @@ function mdastToPm(mdast, source = "", options) {
|
|
|
2530
2531
|
return { doc, frontmatter };
|
|
2531
2532
|
}
|
|
2532
2533
|
function transformNode(node, ctx) {
|
|
2533
|
-
var _a, _b, _c, _d;
|
|
2534
|
+
var _a, _b, _c, _d, _e;
|
|
2534
2535
|
if (!node)
|
|
2535
2536
|
return [];
|
|
2536
2537
|
switch (node.type) {
|
|
@@ -2564,7 +2565,7 @@ function transformNode(node, ctx) {
|
|
|
2564
2565
|
};
|
|
2565
2566
|
}
|
|
2566
2567
|
case "list": {
|
|
2567
|
-
const attrs2 = node.ordered ? { start: node.start
|
|
2568
|
+
const attrs2 = node.ordered ? { start: (_a = node.start) !== null && _a !== void 0 ? _a : 1 } : {};
|
|
2568
2569
|
const content = node.children.map((child) => transformNode(child, ctx));
|
|
2569
2570
|
return {
|
|
2570
2571
|
type: node.ordered ? "orderedList" : "bulletList",
|
|
@@ -2576,7 +2577,7 @@ function transformNode(node, ctx) {
|
|
|
2576
2577
|
const content = mapChildren(node, ctx);
|
|
2577
2578
|
return {
|
|
2578
2579
|
type: "listItem",
|
|
2579
|
-
attrs: { checked: (
|
|
2580
|
+
attrs: { checked: (_b = node.checked) !== null && _b !== void 0 ? _b : null },
|
|
2580
2581
|
content: content.length > 0 ? content : [{ type: "paragraph", content: [] }]
|
|
2581
2582
|
};
|
|
2582
2583
|
}
|
|
@@ -2595,8 +2596,8 @@ function transformNode(node, ctx) {
|
|
|
2595
2596
|
attrs: {
|
|
2596
2597
|
imgAttributes: {
|
|
2597
2598
|
src: node.url,
|
|
2598
|
-
alt: (
|
|
2599
|
-
title: (
|
|
2599
|
+
alt: (_c = node.alt) !== null && _c !== void 0 ? _c : void 0,
|
|
2600
|
+
title: (_d = node.title) !== null && _d !== void 0 ? _d : void 0
|
|
2600
2601
|
}
|
|
2601
2602
|
}
|
|
2602
2603
|
};
|
|
@@ -2641,7 +2642,7 @@ function transformNode(node, ctx) {
|
|
|
2641
2642
|
const linkContent = convertLinkComponent(node, [], ctx);
|
|
2642
2643
|
if (linkContent)
|
|
2643
2644
|
return linkContent;
|
|
2644
|
-
if (!node.name || !STRUCTURED_FLOW_COMPONENTS.has(node.name) || isContainerOnlyComponent(node.name, (
|
|
2645
|
+
if (!node.name || !STRUCTURED_FLOW_COMPONENTS.has(node.name) || isContainerOnlyComponent(node.name, (_e = ctx.schema) !== null && _e !== void 0 ? _e : mintlifySchema)) {
|
|
2645
2646
|
return handleInlineJsx(node, ctx, mapChildren);
|
|
2646
2647
|
}
|
|
2647
2648
|
const flowResult = handleFlowJsx(Object.assign(Object.assign({}, node), { type: "mdxJsxFlowElement", children: node.children.length > 0 ? [{ type: "paragraph", children: node.children }] : [] }), ctx, transformNode, mapJsxChildren);
|
|
@@ -3476,7 +3477,7 @@ function renderBlockquote(state, node, renderNode2) {
|
|
|
3476
3477
|
}
|
|
3477
3478
|
function renderList(state, node, ordered, renderContent2) {
|
|
3478
3479
|
var _a, _b;
|
|
3479
|
-
const start = node.attrs.start
|
|
3480
|
+
const start = typeof node.attrs.start === "number" ? node.attrs.start : 1;
|
|
3480
3481
|
const isTight = typeof node.attrs.tight === "boolean" ? node.attrs.tight : state.options.tightLists;
|
|
3481
3482
|
for (let i = 0; i < node.childCount; i++) {
|
|
3482
3483
|
const child = node.child(i);
|
|
@@ -5586,7 +5587,7 @@ ${prefix}`;
|
|
|
5586
5587
|
const fixedNumber = ordered && numbers.length >= 2 && numbers.every((n) => n === numbers[0]) ? numbers[0] : null;
|
|
5587
5588
|
return {
|
|
5588
5589
|
ordered,
|
|
5589
|
-
start: live.attrs.start
|
|
5590
|
+
start: typeof live.attrs.start === "number" ? live.attrs.start : 1,
|
|
5590
5591
|
delimiter,
|
|
5591
5592
|
fixedNumber,
|
|
5592
5593
|
contentIndent: this.continuationIndent(items)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1525",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"keytar": "7.9.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@mintlify/editor": "0.0.
|
|
89
|
+
"@mintlify/editor": "0.0.408",
|
|
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": "
|
|
108
|
+
"gitHead": "199afc175313f48c75d601dbe066195bc2d9e7fe"
|
|
109
109
|
}
|