@mintlify/cli 4.0.1411 → 4.0.1413

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.
@@ -287,7 +287,8 @@ var CODE_BLOCK_ATTRS = [
287
287
  { name: "focus", type: "expression" },
288
288
  { name: "add", type: "expression" },
289
289
  { name: "remove", type: "expression" },
290
- { name: "twoslash", type: "boolean" }
290
+ { name: "twoslash", type: "boolean" },
291
+ { name: "nocopy", type: "boolean" }
291
292
  ];
292
293
  var PROMPT_BLOCK_ATTRS = [
293
294
  { name: "icon", type: "expression" },
@@ -1883,7 +1884,7 @@ var parseMetaString = (meta) => {
1883
1884
  }
1884
1885
  continue;
1885
1886
  }
1886
- if (token === "expandable" || token === "lines" || token === "wrap" || token === "twoslash") {
1887
+ if (token === "expandable" || token === "lines" || token === "wrap" || token === "twoslash" || token === "nocopy") {
1887
1888
  result[token] = true;
1888
1889
  continue;
1889
1890
  }
@@ -2189,13 +2190,16 @@ function handleCode(node, ctx) {
2189
2190
  };
2190
2191
  }
2191
2192
  const meta = parseMetaString(node.meta || "");
2193
+ const isNoCopyLanguage = node.lang === "nocopy";
2194
+ if (isNoCopyLanguage && meta.nocopy === void 0)
2195
+ meta.nocopy = true;
2192
2196
  const { cleanedCode, addLines, removeLines } = extractDiffMarkers(node.value || "");
2193
2197
  const diffAttrs = {};
2194
2198
  if (addLines.length > 0)
2195
2199
  diffAttrs.add = addLines;
2196
2200
  if (removeLines.length > 0)
2197
2201
  diffAttrs.remove = removeLines;
2198
- return Object.assign({ type: BLOCK_TYPES.codeBlock, attrs: Object.assign(Object.assign(Object.assign({ language: node.lang || null }, meta), diffAttrs), { __isHidden: ctx.isHidden, __hasGroupParent: ctx.hasGroupParent }) }, cleanedCode ? { content: [createTextNode(cleanedCode)] } : {});
2202
+ return Object.assign({ type: BLOCK_TYPES.codeBlock, attrs: Object.assign(Object.assign(Object.assign({ language: isNoCopyLanguage ? "text" : node.lang || null }, meta), diffAttrs), { __isHidden: ctx.isHidden, __hasGroupParent: ctx.hasGroupParent }) }, cleanedCode ? { content: [createTextNode(cleanedCode)] } : {});
2199
2203
  }
2200
2204
 
2201
2205
  // ../editor/dist/converter/parse/mdast-to-pm.js
@@ -2949,6 +2953,8 @@ function renderCodeBlock(state, node) {
2949
2953
  }
2950
2954
  if (node.attrs.twoslash)
2951
2955
  metaString += ` twoslash`;
2956
+ if (node.attrs.nocopy)
2957
+ metaString += ` nocopy`;
2952
2958
  state.write(fence + lang + metaString + "\n");
2953
2959
  const indentedContent = state.delim ? content.replace(/\n/g, "\n" + state.delim) : content;
2954
2960
  state.write(indentedContent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.1411",
3
+ "version": "4.0.1413",
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.1096",
49
- "@mintlify/link-rot": "3.0.1296",
48
+ "@mintlify/common": "1.0.1097",
49
+ "@mintlify/link-rot": "3.0.1298",
50
50
  "@mintlify/models": "0.0.350",
51
- "@mintlify/prebuild": "1.0.1249",
52
- "@mintlify/previewing": "4.0.1320",
51
+ "@mintlify/prebuild": "1.0.1250",
52
+ "@mintlify/previewing": "4.0.1322",
53
53
  "@mintlify/validation": "0.1.832",
54
54
  "adm-zip": "0.6.0",
55
55
  "chalk": "5.2.0",
@@ -82,7 +82,7 @@
82
82
  "keytar": "7.9.0"
83
83
  },
84
84
  "devDependencies": {
85
- "@mintlify/editor": "0.0.307",
85
+ "@mintlify/editor": "0.0.308",
86
86
  "@mintlify/ts-config": "2.0.2",
87
87
  "@tsconfig/recommended": "1.0.2",
88
88
  "@types/detect-port": "1.3.2",
@@ -101,5 +101,5 @@
101
101
  "vitest": "2.1.9",
102
102
  "vitest-mock-process": "1.0.4"
103
103
  },
104
- "gitHead": "6b1d097e59a6d87a0ea4ecfd627190a766ab339b"
104
+ "gitHead": "e7273acea25a18ddaa9fe5aabafa2d0615c9d56c"
105
105
  }