@mintlify/cli 4.0.1446 → 4.0.1448

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.
@@ -1315,6 +1315,33 @@ function getMarks(node) {
1315
1315
  }
1316
1316
  return marks2;
1317
1317
  }
1318
+ function isInlineNode(node, schema2) {
1319
+ var _a;
1320
+ return ((_a = schema2.nodes[node.type]) === null || _a === void 0 ? void 0 : _a.isInline) === true;
1321
+ }
1322
+ function normalizeBlockContent(nodes2, schema2) {
1323
+ const normalized = [];
1324
+ let pendingInlineContent = [];
1325
+ const flushPendingInlineContent = () => {
1326
+ if (pendingInlineContent.length === 0)
1327
+ return;
1328
+ normalized.push({
1329
+ type: "paragraph",
1330
+ content: pendingInlineContent
1331
+ });
1332
+ pendingInlineContent = [];
1333
+ };
1334
+ for (const node of nodes2) {
1335
+ if (isInlineNode(node, schema2)) {
1336
+ pendingInlineContent.push(node);
1337
+ continue;
1338
+ }
1339
+ flushPendingInlineContent();
1340
+ normalized.push(node);
1341
+ }
1342
+ flushPendingInlineContent();
1343
+ return normalized;
1344
+ }
1318
1345
 
1319
1346
  // ../editor/dist/converter/parse/handlers/prompt.js
1320
1347
  function handlePrompt(node, ctx, transformNode2) {
@@ -1959,6 +1986,7 @@ function mapTableJsxElementChildren(node, ctx, transformNode2, mapJsxChildren2)
1959
1986
 
1960
1987
  // ../editor/dist/converter/parse/handlers/inline-jsx.js
1961
1988
  function handleInlineJsx(node, ctx, mapChildren2) {
1989
+ var _a;
1962
1990
  if (node.name === "Tooltip") {
1963
1991
  const attrs2 = partitionAttrs(parseMdxAttributes(node.attributes), TOOLTIP_ATTRS);
1964
1992
  const content = mapChildren2(node, ctx);
@@ -2017,7 +2045,7 @@ function handleInlineJsx(node, ctx, mapChildren2) {
2017
2045
  name: node.name,
2018
2046
  attributes: parseMdxAttributes(node.attributes)
2019
2047
  },
2020
- content: mapChildren2(node, ctx)
2048
+ content: normalizeBlockContent(mapChildren2(node, ctx), (_a = ctx.schema) !== null && _a !== void 0 ? _a : mintlifySchema)
2021
2049
  };
2022
2050
  }
2023
2051
  if (node.name && HTML_ELEMENTS.has(node.name)) {
@@ -2648,33 +2676,6 @@ function mapChildren(node, ctx) {
2648
2676
  const nodes2 = node.children.flatMap((child) => transformNode(child, ctx)).filter(Boolean);
2649
2677
  return mergeDarkLightImagePairs(nodes2);
2650
2678
  }
2651
- function normalizeBlockContent(nodes2, schema2) {
2652
- const normalized = [];
2653
- let pendingInlineContent = [];
2654
- const flushPendingInlineContent = () => {
2655
- if (pendingInlineContent.length === 0)
2656
- return;
2657
- normalized.push({
2658
- type: "paragraph",
2659
- content: pendingInlineContent
2660
- });
2661
- pendingInlineContent = [];
2662
- };
2663
- for (const node of nodes2) {
2664
- if (isInlineNode(node, schema2)) {
2665
- pendingInlineContent.push(node);
2666
- continue;
2667
- }
2668
- flushPendingInlineContent();
2669
- normalized.push(node);
2670
- }
2671
- flushPendingInlineContent();
2672
- return normalized;
2673
- }
2674
- function isInlineNode(node, schema2) {
2675
- const nodeType = schema2.nodes[node.type];
2676
- return (nodeType === null || nodeType === void 0 ? void 0 : nodeType.isInline) === true;
2677
- }
2678
2679
  function mapJsxChildren(node, ctx) {
2679
2680
  var _a;
2680
2681
  const nodes2 = flattenJsxParagraphs({ children: node.children }).children.flatMap((child) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.1446",
3
+ "version": "4.0.1448",
4
4
  "description": "The Mintlify CLI",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -45,11 +45,11 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@inquirer/prompts": "7.9.0",
48
- "@mintlify/common": "1.0.1116",
49
- "@mintlify/link-rot": "3.0.1318",
48
+ "@mintlify/common": "1.0.1118",
49
+ "@mintlify/link-rot": "3.0.1320",
50
50
  "@mintlify/models": "0.0.351",
51
- "@mintlify/prebuild": "1.0.1270",
52
- "@mintlify/previewing": "4.0.1342",
51
+ "@mintlify/prebuild": "1.0.1272",
52
+ "@mintlify/previewing": "4.0.1344",
53
53
  "@mintlify/validation": "0.1.842",
54
54
  "adm-zip": "0.6.0",
55
55
  "chalk": "5.2.0",
@@ -86,7 +86,7 @@
86
86
  "keytar": "7.9.0"
87
87
  },
88
88
  "devDependencies": {
89
- "@mintlify/editor": "0.0.336",
89
+ "@mintlify/editor": "0.0.338",
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": "9f35069b62360ee001a328098f695571f2799d93"
108
+ "gitHead": "93b07887740dc79844de4434f86b7f994f9b06b2"
109
109
  }