@mintlify/cli 4.0.1803 → 4.0.1805
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/tsconfig.build.tsbuildinfo +1 -1
- package/bin/vendor/converter.js +55 -12
- package/package.json +10 -10
package/bin/vendor/converter.js
CHANGED
|
@@ -6661,7 +6661,10 @@ function serializeCommentThreadIds(ids) {
|
|
|
6661
6661
|
}
|
|
6662
6662
|
|
|
6663
6663
|
// ../editor/dist/converter/utils/static-html-source.js
|
|
6664
|
-
var STATIC_HTML_TYPES = /* @__PURE__ */ new Set([
|
|
6664
|
+
var STATIC_HTML_TYPES = /* @__PURE__ */ new Set([
|
|
6665
|
+
BLOCK_TYPES.staticHTML,
|
|
6666
|
+
BLOCK_TYPES.inlineStaticHTML
|
|
6667
|
+
]);
|
|
6665
6668
|
function keepsStaticHtmlSource(tagName, hasStaticHtmlParent) {
|
|
6666
6669
|
return !hasStaticHtmlParent || tagName === "svg";
|
|
6667
6670
|
}
|
|
@@ -28472,21 +28475,58 @@ function renderTooltip(state, node2, renderInline2) {
|
|
|
28472
28475
|
state.write(`<${BLOCK_TYPES.tooltip}${attrs2 ? ` ${attrs2}` : ""} />`);
|
|
28473
28476
|
}
|
|
28474
28477
|
}
|
|
28475
|
-
|
|
28478
|
+
var sourceTexts = /* @__PURE__ */ new WeakMap();
|
|
28479
|
+
function parsedText(node2, source) {
|
|
28480
|
+
try {
|
|
28481
|
+
let text2;
|
|
28482
|
+
mdxToPm(source, { schema: node2.type.schema }).doc.descendants((child) => {
|
|
28483
|
+
if (text2 === void 0 && STATIC_HTML_TYPES.has(child.type.name))
|
|
28484
|
+
text2 = child.textContent;
|
|
28485
|
+
return text2 === void 0;
|
|
28486
|
+
});
|
|
28487
|
+
return text2;
|
|
28488
|
+
} catch (_a2) {
|
|
28489
|
+
return void 0;
|
|
28490
|
+
}
|
|
28491
|
+
}
|
|
28492
|
+
function sourceText(node2, mdxJsxNode, source) {
|
|
28493
|
+
if (!sourceTexts.has(mdxJsxNode))
|
|
28494
|
+
sourceTexts.set(mdxJsxNode, parsedText(node2, source));
|
|
28495
|
+
return sourceTexts.get(mdxJsxNode);
|
|
28496
|
+
}
|
|
28497
|
+
function textDiffersFromSource(node2, mdxJsxNode, source) {
|
|
28498
|
+
if (node2.childCount === 0 && !node2.inlineContent)
|
|
28499
|
+
return false;
|
|
28500
|
+
const text2 = sourceText(node2, mdxJsxNode, source);
|
|
28501
|
+
return text2 !== void 0 && text2 !== node2.textContent;
|
|
28502
|
+
}
|
|
28503
|
+
function sourceOpeningTag(mdxJsxNode) {
|
|
28504
|
+
return stringifyMdxNode([Object.assign(Object.assign({}, mdxJsxNode), { children: [], data: void 0 })]).trim().replace(/^<|\s*\/>$/g, "");
|
|
28505
|
+
}
|
|
28506
|
+
function renderStaticHTML(state, node2, renderContent2, renderInline2) {
|
|
28476
28507
|
var _a2;
|
|
28477
28508
|
const inline = state.inTable || node2.type.name === BLOCK_TYPES.inlineStaticHTML;
|
|
28478
28509
|
const escapeTablePipes = (value) => state.escapesPipes ? value.replace(/\|/g, "|") : value;
|
|
28510
|
+
const inlineSource = (value) => escapeTablePipes(value.replace(/\s*\n\s*/g, " ").trim());
|
|
28479
28511
|
const mdxJsxNode = node2.attrs.mdxJsxNode;
|
|
28512
|
+
let sourceTag;
|
|
28480
28513
|
if (mdxJsxNode) {
|
|
28481
28514
|
try {
|
|
28482
28515
|
const str = stringifyMdxNode([mdxJsxNode]);
|
|
28483
|
-
if (
|
|
28484
|
-
|
|
28485
|
-
|
|
28486
|
-
|
|
28487
|
-
|
|
28516
|
+
if (!textDiffersFromSource(node2, mdxJsxNode, str)) {
|
|
28517
|
+
if (inline) {
|
|
28518
|
+
state.write(inlineSource(str));
|
|
28519
|
+
} else {
|
|
28520
|
+
state.write(str);
|
|
28521
|
+
state.closeBlock();
|
|
28522
|
+
}
|
|
28523
|
+
return;
|
|
28524
|
+
}
|
|
28525
|
+
if (mdxJsxNode.name) {
|
|
28526
|
+
sourceTag = sourceOpeningTag(mdxJsxNode);
|
|
28527
|
+
if (inline)
|
|
28528
|
+
sourceTag = inlineSource(sourceTag);
|
|
28488
28529
|
}
|
|
28489
|
-
return;
|
|
28490
28530
|
} catch (_b) {
|
|
28491
28531
|
}
|
|
28492
28532
|
}
|
|
@@ -28499,13 +28539,16 @@ function renderStaticHTML(state, node2, renderContent2) {
|
|
|
28499
28539
|
}).filter(Boolean);
|
|
28500
28540
|
const expressionProps = getExpressionAttrStrings(attributes);
|
|
28501
28541
|
const attrs2 = [...namedAttrs, ...expressionProps].join(" ");
|
|
28502
|
-
const tag2 = attrs2 ? `${tagName} ${attrs2}` : tagName;
|
|
28542
|
+
const tag2 = sourceTag !== null && sourceTag !== void 0 ? sourceTag : attrs2 ? `${tagName} ${attrs2}` : tagName;
|
|
28503
28543
|
if (node2.childCount > 0) {
|
|
28504
28544
|
state.write(`<${tag2}>`);
|
|
28505
28545
|
if (!inline)
|
|
28506
28546
|
state.ensureNewLine();
|
|
28507
|
-
|
|
28508
|
-
|
|
28547
|
+
if (node2.inlineContent)
|
|
28548
|
+
renderInline2(state, node2);
|
|
28549
|
+
else
|
|
28550
|
+
renderContent2(state, node2);
|
|
28551
|
+
state.write(`</${sourceTag ? mdxJsxNode.name : tagName}>`);
|
|
28509
28552
|
} else {
|
|
28510
28553
|
state.write(`<${tag2} />`);
|
|
28511
28554
|
}
|
|
@@ -29116,7 +29159,7 @@ function renderNode(state, node2, _parent, _index) {
|
|
|
29116
29159
|
break;
|
|
29117
29160
|
case BLOCK_TYPES.staticHTML:
|
|
29118
29161
|
case BLOCK_TYPES.inlineStaticHTML:
|
|
29119
|
-
renderStaticHTML(state, node2, renderContent);
|
|
29162
|
+
renderStaticHTML(state, node2, renderContent, boundRenderInline);
|
|
29120
29163
|
break;
|
|
29121
29164
|
case BLOCK_TYPES.unknownTag:
|
|
29122
29165
|
case BLOCK_TYPES.inlineUnknownTag:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1805",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@inquirer/prompts": "7.9.0",
|
|
48
|
-
"@mintlify/common": "1.0.
|
|
49
|
-
"@mintlify/link-rot": "3.0.
|
|
50
|
-
"@mintlify/models": "0.0.
|
|
51
|
-
"@mintlify/og": "0.0.
|
|
52
|
-
"@mintlify/prebuild": "1.0.
|
|
53
|
-
"@mintlify/previewing": "4.0.
|
|
54
|
-
"@mintlify/validation": "0.1.
|
|
48
|
+
"@mintlify/common": "1.0.1343",
|
|
49
|
+
"@mintlify/link-rot": "3.0.1584",
|
|
50
|
+
"@mintlify/models": "0.0.388",
|
|
51
|
+
"@mintlify/og": "0.0.142",
|
|
52
|
+
"@mintlify/prebuild": "1.0.1516",
|
|
53
|
+
"@mintlify/previewing": "4.0.1602",
|
|
54
|
+
"@mintlify/validation": "0.1.961",
|
|
55
55
|
"adm-zip": "0.6.0",
|
|
56
56
|
"chalk": "5.2.0",
|
|
57
57
|
"color": "4.2.3",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"keytar": "7.9.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@mintlify/editor": "0.0.
|
|
90
|
+
"@mintlify/editor": "0.0.621",
|
|
91
91
|
"@mintlify/ts-config": "2.0.2",
|
|
92
92
|
"@tsconfig/recommended": "1.0.2",
|
|
93
93
|
"@types/detect-port": "1.3.2",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"vitest": "2.1.9",
|
|
107
107
|
"vitest-mock-process": "1.0.4"
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "4f04b6102539eb00678e168c50f38e6c9671622d"
|
|
110
110
|
}
|