@mintlify/cli 4.0.1711 → 4.0.1713

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.
@@ -6677,6 +6677,9 @@ function normalizeBlockContent(nodes2, schema) {
6677
6677
  flushPendingInlineContent();
6678
6678
  return normalized;
6679
6679
  }
6680
+ function staticHtmlSource(node, ctx) {
6681
+ return ctx.hasStaticHtmlParent && node.name !== "svg" ? null : node;
6682
+ }
6680
6683
 
6681
6684
  // ../editor/dist/converter/parse/mdast-to-pm.js
6682
6685
  import { Node as Node3 } from "prosemirror-model";
@@ -12486,9 +12489,9 @@ function handleFlowJsxInner(node, ctx, transformNode2, mapJsxChildren2) {
12486
12489
  attrs: {
12487
12490
  tagName: node.name,
12488
12491
  attributes: parseMdxAttributes(node.attributes),
12489
- mdxJsxNode: node
12492
+ mdxJsxNode: staticHtmlSource(node, ctx)
12490
12493
  },
12491
- content: mapJsxChildren2(node, ctx)
12494
+ content: mapJsxChildren2(node, Object.assign(Object.assign({}, ctx), { hasStaticHtmlParent: true }))
12492
12495
  };
12493
12496
  }
12494
12497
  if (node.name === "Prompt") {
@@ -12960,14 +12963,14 @@ function handleInlineJsx(node, ctx, mapChildren2) {
12960
12963
  }
12961
12964
  if (node.name && HTML_ELEMENTS.has(node.name)) {
12962
12965
  const schema = (_b = ctx.schema) !== null && _b !== void 0 ? _b : mintlifySchema;
12963
- const children = mapChildren2(node, ctx);
12966
+ const children = mapChildren2(node, Object.assign(Object.assign({}, ctx), { hasStaticHtmlParent: true }));
12964
12967
  const hasBlock = children.some((child) => !isInlineNode(child, schema));
12965
12968
  return {
12966
12969
  type: hasBlock ? BLOCK_TYPES.staticHTML : BLOCK_TYPES.inlineStaticHTML,
12967
12970
  attrs: {
12968
12971
  tagName: node.name,
12969
12972
  attributes: parseMdxAttributes(node.attributes),
12970
- mdxJsxNode: node
12973
+ mdxJsxNode: staticHtmlSource(node, ctx)
12971
12974
  },
12972
12975
  content: hasBlock ? normalizeBlockContent(children, schema) : children
12973
12976
  };
@@ -16058,6 +16061,7 @@ import { Fragment } from "prosemirror-model";
16058
16061
  import { parse as parseYaml2 } from "yaml";
16059
16062
 
16060
16063
  // ../editor/dist/converter/diff/node-utils.js
16064
+ import { isMdxJsxElement } from "@mintlify/common";
16061
16065
  var deepEqual = (a, b) => {
16062
16066
  if (a === b)
16063
16067
  return true;
@@ -16095,11 +16099,15 @@ var attrsEqual = (a, b) => {
16095
16099
  if (keysA.length !== keysB.length)
16096
16100
  return false;
16097
16101
  for (const key of keysA) {
16102
+ if (key === "mdxJsxNode" && "tagName" in a && omitsHtmlSource(a[key], b[key]))
16103
+ continue;
16098
16104
  if (stringifyAttrValue(key, a[key]) !== stringifyAttrValue(key, b[key]))
16099
16105
  return false;
16100
16106
  }
16101
16107
  return true;
16102
16108
  };
16109
+ var isHtmlSource = (value) => isMdxJsxElement(value) && !!value.name && HTML_ELEMENTS.has(value.name);
16110
+ var omitsHtmlSource = (a, b) => a === null && isHtmlSource(b) || b === null && isHtmlSource(a);
16103
16111
  var isMdastPosition = (v) => v !== null && typeof v === "object" && "start" in v && "end" in v;
16104
16112
  var isEstreeLoc = (v) => v !== null && typeof v === "object" && "start" in v && "end" in v;
16105
16113
  var stringifyAttrValue = (key, value) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.1711",
3
+ "version": "4.0.1713",
4
4
  "description": "The Mintlify CLI",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -82,7 +82,7 @@
82
82
  "keytar": "7.9.0"
83
83
  },
84
84
  "devDependencies": {
85
- "@mintlify/editor": "0.0.560",
85
+ "@mintlify/editor": "0.0.562",
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": "2b6f6889e965e0aeb88757feb55e69daa4255d37"
104
+ "gitHead": "c2289baf20353b9ed7e11ed8ec20b8e644b63a8c"
105
105
  }