@mintlify/cli 4.0.1707 → 4.0.1709
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 +272 -11
- package/package.json +3 -3
package/bin/vendor/converter.js
CHANGED
|
@@ -5784,7 +5784,8 @@ var BLOCK_TYPES = {
|
|
|
5784
5784
|
promptDescription: "PromptDescription",
|
|
5785
5785
|
color: "Color",
|
|
5786
5786
|
tree: "Tree",
|
|
5787
|
-
visibility: "Visibility"
|
|
5787
|
+
visibility: "Visibility",
|
|
5788
|
+
database: "Database"
|
|
5788
5789
|
};
|
|
5789
5790
|
var CALLOUT_TYPES = [
|
|
5790
5791
|
"Info",
|
|
@@ -6071,6 +6072,22 @@ var VISIBILITY_ATTRS = [
|
|
|
6071
6072
|
description: "Humans: visible on the web, excluded from Markdown output. Agents: hidden on the web, included in Markdown output. Signed in / signed out: shown on the web by login state; signed-in content is excluded from Markdown output. { groups: [...] }: shown to signed-in users in any listed group. { groups: { excludes: [...] } }: hidden from users in any excluded group."
|
|
6072
6073
|
}
|
|
6073
6074
|
];
|
|
6075
|
+
var DATABASE_VIEW_OPTIONS = ["table", "board"];
|
|
6076
|
+
var DATABASE_ATTRS = [
|
|
6077
|
+
{
|
|
6078
|
+
name: "id",
|
|
6079
|
+
type: "string",
|
|
6080
|
+
required: true,
|
|
6081
|
+
placeholder: "00000000-0000-0000-0000-000000000000",
|
|
6082
|
+
description: "UUID of the database."
|
|
6083
|
+
},
|
|
6084
|
+
{
|
|
6085
|
+
name: "view",
|
|
6086
|
+
type: "string",
|
|
6087
|
+
options: DATABASE_VIEW_OPTIONS,
|
|
6088
|
+
description: "Table or board. Omitted means table."
|
|
6089
|
+
}
|
|
6090
|
+
];
|
|
6074
6091
|
var UPDATE_ATTRS = [
|
|
6075
6092
|
{
|
|
6076
6093
|
name: "label",
|
|
@@ -6495,6 +6512,11 @@ var nodes = {
|
|
|
6495
6512
|
group: "block",
|
|
6496
6513
|
atom: true,
|
|
6497
6514
|
attrs: attrs(Object.assign({ treeData: [] }, HIDDEN_ATTRS))
|
|
6515
|
+
},
|
|
6516
|
+
[BLOCK_TYPES.database]: {
|
|
6517
|
+
group: "block",
|
|
6518
|
+
atom: true,
|
|
6519
|
+
attrs: Object.assign(Object.assign({}, toProseMirrorAttrs(DATABASE_ATTRS)), attrs(HIDDEN_ATTRS))
|
|
6498
6520
|
}
|
|
6499
6521
|
};
|
|
6500
6522
|
var marks = {
|
|
@@ -6532,6 +6554,13 @@ function createSchema(extra) {
|
|
|
6532
6554
|
return new Schema({ nodes: mergedNodes, marks: mergedMarks });
|
|
6533
6555
|
}
|
|
6534
6556
|
|
|
6557
|
+
// ../editor/dist/converter/utils/database.js
|
|
6558
|
+
var DEFAULT_DATABASE_VIEW = "table";
|
|
6559
|
+
var DATABASE_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
6560
|
+
var isDatabaseId = (value) => typeof value === "string" && DATABASE_ID_PATTERN.test(value);
|
|
6561
|
+
var isDatabaseView = (value) => DATABASE_VIEW_OPTIONS.some((view) => view === value);
|
|
6562
|
+
var resolveDatabaseView = (value) => isDatabaseView(value) ? value : DEFAULT_DATABASE_VIEW;
|
|
6563
|
+
|
|
6535
6564
|
// ../editor/dist/converter/utils/comment-thread-ids.js
|
|
6536
6565
|
function parseCommentThreadIds(value) {
|
|
6537
6566
|
if (typeof value !== "string")
|
|
@@ -12436,6 +12465,9 @@ function handleFlowJsxInner(node, ctx, transformNode2, mapJsxChildren2) {
|
|
|
12436
12465
|
if (node.name === BLOCK_TYPES.tree) {
|
|
12437
12466
|
return handleTree(node);
|
|
12438
12467
|
}
|
|
12468
|
+
if (node.name === BLOCK_TYPES.database) {
|
|
12469
|
+
return handleDatabase(node, ctx);
|
|
12470
|
+
}
|
|
12439
12471
|
const targetType = isCallout ? BLOCK_TYPES.callout : node.name;
|
|
12440
12472
|
if ((isCallout || node.name !== BLOCK_TYPES.step && Object.values(BLOCK_TYPES).includes(node.name)) && (ctx.hasGroupParent || !isContainerOnlyComponent(targetType, (_b = ctx.schema) !== null && _b !== void 0 ? _b : mintlifySchema))) {
|
|
12441
12473
|
const parsedAttrs = parseMdxAttributes(node.attributes);
|
|
@@ -12689,6 +12721,14 @@ function handleTree(node) {
|
|
|
12689
12721
|
attrs: Object.assign({ treeData: parseTreeChildren(node) }, extraTreeAttrs)
|
|
12690
12722
|
};
|
|
12691
12723
|
}
|
|
12724
|
+
function handleDatabase(node, ctx) {
|
|
12725
|
+
var _a;
|
|
12726
|
+
const parsed = parseMdxAttributes(node.attributes);
|
|
12727
|
+
const isValid = ctx.databases === true && !!((_a = ctx.schema) !== null && _a !== void 0 ? _a : mintlifySchema).nodes[BLOCK_TYPES.database] && node.children.length === 0 && !(EXPRESSION_ATTRS_KEY in parsed) && !(NAMED_EXPRESSION_ATTRS_KEY in parsed) && isDatabaseId(parsed.id) && (parsed.view === void 0 || isDatabaseView(parsed.view));
|
|
12728
|
+
if (!isValid)
|
|
12729
|
+
return { type: BLOCK_TYPES.unknownTag, attrs: { mdxJsxNode: node } };
|
|
12730
|
+
return { type: BLOCK_TYPES.database, attrs: partitionAttrs(parsed, DATABASE_ATTRS) };
|
|
12731
|
+
}
|
|
12692
12732
|
var CELL_SPAN_ATTRS = /* @__PURE__ */ new Set(["colspan", "colSpan", "rowspan", "rowSpan"]);
|
|
12693
12733
|
var TABLE_CLASS_ATTRS = /* @__PURE__ */ new Set(["class", "className"]);
|
|
12694
12734
|
function hasTableClass(node) {
|
|
@@ -13394,7 +13434,13 @@ function mdastToPm(mdast, source = "", options) {
|
|
|
13394
13434
|
delete node.position;
|
|
13395
13435
|
}
|
|
13396
13436
|
});
|
|
13397
|
-
const context = {
|
|
13437
|
+
const context = {
|
|
13438
|
+
source,
|
|
13439
|
+
frontmatter,
|
|
13440
|
+
schema,
|
|
13441
|
+
definitions,
|
|
13442
|
+
databases: (options === null || options === void 0 ? void 0 : options.databases) === true
|
|
13443
|
+
};
|
|
13398
13444
|
const content = transformNode(mdast, context);
|
|
13399
13445
|
const rawJsonContent = Array.isArray(content) ? content : (_b = content.content) !== null && _b !== void 0 ? _b : [];
|
|
13400
13446
|
const jsonContent = normalizeBlockContent(rawJsonContent, schema);
|
|
@@ -13681,6 +13727,189 @@ function mdxToPm(mdx, options) {
|
|
|
13681
13727
|
return mdastToPm(mdast, mdx, options);
|
|
13682
13728
|
}
|
|
13683
13729
|
|
|
13730
|
+
// ../editor/dist/converter/parse/md-to-mdast.js
|
|
13731
|
+
import { unwrapCurrencyMath as unwrapCurrencyMath2 } from "@mintlify/common";
|
|
13732
|
+
import { remark as remark2 } from "remark";
|
|
13733
|
+
import remarkFrontmatter2 from "remark-frontmatter";
|
|
13734
|
+
import remarkGfm2 from "remark-gfm";
|
|
13735
|
+
import remarkMath2 from "remark-math";
|
|
13736
|
+
import { visit as visit4 } from "unist-util-visit";
|
|
13737
|
+
var markdownRemark = remark2().use(remarkGfm2).use(remarkFrontmatter2, ["yaml", "toml"]).use(remarkMath2).freeze();
|
|
13738
|
+
var CONTAINER_TAG = /(<\/?(?:aside|details)\b[^>]*>|<summary\b[^>]*>[\s\S]*?<\/summary>)/i;
|
|
13739
|
+
var SUMMARY_TAG = /^<summary\b[^>]*>([\s\S]*?)<\/summary>$/i;
|
|
13740
|
+
var VOID_TAG = /<(area|br|col|embed|hr|img|input|source|track|wbr)\b((?:[^>"']|"[^"]*"|'[^']*')*?)\s*\/?>/gi;
|
|
13741
|
+
var OPENING_TAG = /^<([a-z][\w-]*)\b[^>]*(?<!\/)>$/i;
|
|
13742
|
+
var ANY_TAG = /<\/?[a-z][^>]*>/gi;
|
|
13743
|
+
var PHRASING_PARENTS = /* @__PURE__ */ new Set([
|
|
13744
|
+
"paragraph",
|
|
13745
|
+
"heading",
|
|
13746
|
+
"tableCell",
|
|
13747
|
+
"emphasis",
|
|
13748
|
+
"strong",
|
|
13749
|
+
"delete",
|
|
13750
|
+
"link",
|
|
13751
|
+
"linkReference"
|
|
13752
|
+
]);
|
|
13753
|
+
var isMarker = (item) => "open" in item || "close" in item || "summary" in item;
|
|
13754
|
+
var isSummary = (node) => ((node === null || node === void 0 ? void 0 : node.type) === "mdxJsxFlowElement" || (node === null || node === void 0 ? void 0 : node.type) === "mdxJsxTextElement") && node.name === "summary";
|
|
13755
|
+
var toElement = ({ tag, title, children }) => ({
|
|
13756
|
+
type: "mdxJsxFlowElement",
|
|
13757
|
+
name: tag === "aside" ? "Callout" : "Accordion",
|
|
13758
|
+
attributes: tag === "details" ? [{ type: "mdxJsxAttribute", name: "title", value: title !== null && title !== void 0 ? title : "" }] : [],
|
|
13759
|
+
children
|
|
13760
|
+
});
|
|
13761
|
+
function takeSummary(children) {
|
|
13762
|
+
const [first] = children;
|
|
13763
|
+
if (isSummary(first)) {
|
|
13764
|
+
children.shift();
|
|
13765
|
+
return extractTextFromNode(first).text.trim();
|
|
13766
|
+
}
|
|
13767
|
+
if ((first === null || first === void 0 ? void 0 : first.type) !== "paragraph" || !isSummary(first.children[0]))
|
|
13768
|
+
return void 0;
|
|
13769
|
+
const summary = first.children.shift();
|
|
13770
|
+
if (!extractTextFromNode(first).text.trim())
|
|
13771
|
+
children.shift();
|
|
13772
|
+
return extractTextFromNode(summary).text.trim();
|
|
13773
|
+
}
|
|
13774
|
+
function promoteHtmlContainers(root) {
|
|
13775
|
+
visit4(root, "mdxJsxFlowElement", (node, index, parent) => {
|
|
13776
|
+
if (!parent || index === void 0 || node.name !== "aside" && node.name !== "details")
|
|
13777
|
+
return;
|
|
13778
|
+
const children = node.children;
|
|
13779
|
+
const title = node.name === "details" ? takeSummary(children) : void 0;
|
|
13780
|
+
parent.children[index] = toElement({ tag: node.name, title, children });
|
|
13781
|
+
});
|
|
13782
|
+
}
|
|
13783
|
+
var JSX_COMMENT = /^\s*\/\*[\s\S]*\*\/\s*$/;
|
|
13784
|
+
function expressionsToText(root) {
|
|
13785
|
+
visit4(root, (node, index, parent) => {
|
|
13786
|
+
if (node.type !== "mdxTextExpression" && node.type !== "mdxFlowExpression")
|
|
13787
|
+
return;
|
|
13788
|
+
if (!parent || index === void 0 || JSX_COMMENT.test(node.value))
|
|
13789
|
+
return;
|
|
13790
|
+
const text = { type: "text", value: `{${node.value}}` };
|
|
13791
|
+
parent.children[index] = node.type === "mdxFlowExpression" ? { type: "paragraph", children: [text] } : text;
|
|
13792
|
+
});
|
|
13793
|
+
}
|
|
13794
|
+
function htmlToMdast(html) {
|
|
13795
|
+
try {
|
|
13796
|
+
return mdxToMdast(html.replace(VOID_TAG, "<$1$2 />")).children;
|
|
13797
|
+
} catch (_a) {
|
|
13798
|
+
const text = html.replace(ANY_TAG, "").trim();
|
|
13799
|
+
return text ? [{ type: "paragraph", children: [{ type: "text", value: text }] }] : [];
|
|
13800
|
+
}
|
|
13801
|
+
}
|
|
13802
|
+
function inlineHtml(html) {
|
|
13803
|
+
return htmlToMdast(html).flatMap((node) => {
|
|
13804
|
+
if (node.type === "paragraph")
|
|
13805
|
+
return node.children;
|
|
13806
|
+
if (node.type === "mdxJsxFlowElement")
|
|
13807
|
+
return [Object.assign(Object.assign({}, node), { type: "mdxJsxTextElement" })];
|
|
13808
|
+
return [];
|
|
13809
|
+
});
|
|
13810
|
+
}
|
|
13811
|
+
function blockHtml(html) {
|
|
13812
|
+
const parts = html.split(CONTAINER_TAG);
|
|
13813
|
+
if (parts.length === 1)
|
|
13814
|
+
return htmlToMdast(html);
|
|
13815
|
+
return parts.flatMap((part, i) => {
|
|
13816
|
+
var _a;
|
|
13817
|
+
if (i % 2 === 0)
|
|
13818
|
+
return part.trim() ? markdownToMdast(part).children : [];
|
|
13819
|
+
const summary = SUMMARY_TAG.exec(part);
|
|
13820
|
+
if (summary)
|
|
13821
|
+
return [{ summary: ((_a = summary[1]) !== null && _a !== void 0 ? _a : "").replace(ANY_TAG, "").trim() }];
|
|
13822
|
+
if (part.startsWith("</"))
|
|
13823
|
+
return [{ close: true }];
|
|
13824
|
+
return [{ open: /^<aside/i.test(part) ? "aside" : "details" }];
|
|
13825
|
+
});
|
|
13826
|
+
}
|
|
13827
|
+
function groupContainers(items) {
|
|
13828
|
+
const root = [];
|
|
13829
|
+
const stack = [];
|
|
13830
|
+
const current2 = () => {
|
|
13831
|
+
var _a, _b;
|
|
13832
|
+
return (_b = (_a = stack.at(-1)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : root;
|
|
13833
|
+
};
|
|
13834
|
+
const close = () => {
|
|
13835
|
+
const frame = stack.pop();
|
|
13836
|
+
if (frame)
|
|
13837
|
+
current2().push(toElement(frame));
|
|
13838
|
+
};
|
|
13839
|
+
for (const item of items) {
|
|
13840
|
+
if (!isMarker(item))
|
|
13841
|
+
current2().push(item);
|
|
13842
|
+
else if ("open" in item)
|
|
13843
|
+
stack.push({ tag: item.open, children: [] });
|
|
13844
|
+
else if ("close" in item)
|
|
13845
|
+
close();
|
|
13846
|
+
else {
|
|
13847
|
+
const frame = stack.at(-1);
|
|
13848
|
+
if (frame)
|
|
13849
|
+
frame.title = item.summary;
|
|
13850
|
+
else
|
|
13851
|
+
root.push({ type: "paragraph", children: [{ type: "text", value: item.summary }] });
|
|
13852
|
+
}
|
|
13853
|
+
}
|
|
13854
|
+
while (stack.length > 0)
|
|
13855
|
+
close();
|
|
13856
|
+
return root;
|
|
13857
|
+
}
|
|
13858
|
+
function pairedInlineHtml(children, index, md) {
|
|
13859
|
+
var _a, _b, _c, _d;
|
|
13860
|
+
const open = children[index];
|
|
13861
|
+
const tag = (open === null || open === void 0 ? void 0 : open.type) === "html" ? (_a = OPENING_TAG.exec(open.value)) === null || _a === void 0 ? void 0 : _a[1] : void 0;
|
|
13862
|
+
const start = (_b = open === null || open === void 0 ? void 0 : open.position) === null || _b === void 0 ? void 0 : _b.start.offset;
|
|
13863
|
+
if (!tag || start === void 0)
|
|
13864
|
+
return void 0;
|
|
13865
|
+
const closeIndex = children.findIndex((child, i) => i > index && child.type === "html" && child.value.toLowerCase() === `</${tag}>`.toLowerCase());
|
|
13866
|
+
const end = (_d = (_c = children[closeIndex]) === null || _c === void 0 ? void 0 : _c.position) === null || _d === void 0 ? void 0 : _d.end.offset;
|
|
13867
|
+
if (closeIndex === -1 || end === void 0)
|
|
13868
|
+
return void 0;
|
|
13869
|
+
return { nodes: inlineHtml(md.slice(start, end)), skip: closeIndex - index };
|
|
13870
|
+
}
|
|
13871
|
+
function normalizeHtml(parent, md) {
|
|
13872
|
+
var _a, _b;
|
|
13873
|
+
const phrasing = PHRASING_PARENTS.has(parent.type);
|
|
13874
|
+
const items = [];
|
|
13875
|
+
for (let i = 0; i < parent.children.length; i++) {
|
|
13876
|
+
const child = parent.children[i];
|
|
13877
|
+
if (child.type !== "html") {
|
|
13878
|
+
if ("children" in child)
|
|
13879
|
+
normalizeHtml(child, md);
|
|
13880
|
+
items.push(child);
|
|
13881
|
+
} else if (!phrasing)
|
|
13882
|
+
items.push(...blockHtml(child.value));
|
|
13883
|
+
else {
|
|
13884
|
+
const paired = pairedInlineHtml(parent.children, i, md);
|
|
13885
|
+
items.push(...(_a = paired === null || paired === void 0 ? void 0 : paired.nodes) !== null && _a !== void 0 ? _a : inlineHtml(child.value));
|
|
13886
|
+
i += (_b = paired === null || paired === void 0 ? void 0 : paired.skip) !== null && _b !== void 0 ? _b : 0;
|
|
13887
|
+
}
|
|
13888
|
+
}
|
|
13889
|
+
parent.children = items.some(isMarker) ? groupContainers(items) : items;
|
|
13890
|
+
}
|
|
13891
|
+
function markdownToMdast(md) {
|
|
13892
|
+
const root = markdownRemark.parse(md);
|
|
13893
|
+
unwrapCurrencyMath2(root, md);
|
|
13894
|
+
normalizeHtml(root, md);
|
|
13895
|
+
return root;
|
|
13896
|
+
}
|
|
13897
|
+
function mdToMdast(md) {
|
|
13898
|
+
try {
|
|
13899
|
+
const root = mdxToMdast(md);
|
|
13900
|
+
promoteHtmlContainers(root);
|
|
13901
|
+
expressionsToText(root);
|
|
13902
|
+
return root;
|
|
13903
|
+
} catch (_a) {
|
|
13904
|
+
return markdownToMdast(md);
|
|
13905
|
+
}
|
|
13906
|
+
}
|
|
13907
|
+
|
|
13908
|
+
// ../editor/dist/converter/parse/md-to-pm.js
|
|
13909
|
+
function mdToPm(md, options) {
|
|
13910
|
+
return mdastToPm(mdToMdast(md), md, options);
|
|
13911
|
+
}
|
|
13912
|
+
|
|
13684
13913
|
// ../editor/dist/converter/utils/frontmatter-filter.js
|
|
13685
13914
|
import { decoratedPageSchema } from "@mintlify/validation";
|
|
13686
13915
|
import yaml from "js-yaml";
|
|
@@ -13760,8 +13989,8 @@ function formatFrontmatterValue(key, value) {
|
|
|
13760
13989
|
|
|
13761
13990
|
// ../editor/dist/converter/serialize/handlers/components.js
|
|
13762
13991
|
import { titleMarkdownToText } from "@mintlify/common/title-markdown";
|
|
13763
|
-
import
|
|
13764
|
-
import
|
|
13992
|
+
import remarkGfm3 from "remark-gfm";
|
|
13993
|
+
import remarkMath3 from "remark-math";
|
|
13765
13994
|
import remarkMdx2 from "remark-mdx";
|
|
13766
13995
|
import remarkStringify from "remark-stringify";
|
|
13767
13996
|
import { unified } from "unified";
|
|
@@ -13845,6 +14074,23 @@ function serializeJsxAttribute(attrs2, key, value) {
|
|
|
13845
14074
|
const serialized = serializePropValue(value);
|
|
13846
14075
|
return serialized ? `${key}=${serialized}` : null;
|
|
13847
14076
|
}
|
|
14077
|
+
var ATTRIBUTE_VALUE_ESCAPES = {
|
|
14078
|
+
"&": "&",
|
|
14079
|
+
'"': """,
|
|
14080
|
+
"<": "<",
|
|
14081
|
+
">": ">",
|
|
14082
|
+
"\n": "
",
|
|
14083
|
+
"\r": "
",
|
|
14084
|
+
"`": "`",
|
|
14085
|
+
"~": "~"
|
|
14086
|
+
};
|
|
14087
|
+
var escapeAttributeValue = (value) => value.replace(/[&"<>\n\r`~]/g, (char) => {
|
|
14088
|
+
var _a;
|
|
14089
|
+
return (_a = ATTRIBUTE_VALUE_ESCAPES[char]) !== null && _a !== void 0 ? _a : char;
|
|
14090
|
+
});
|
|
14091
|
+
function serializeLiteralJsxAttribute(attrs2, key, value) {
|
|
14092
|
+
return typeof value === "string" ? `${key}="${escapeAttributeValue(value)}"` : serializeJsxAttribute(attrs2, key, value);
|
|
14093
|
+
}
|
|
13848
14094
|
var isAttributeRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13849
14095
|
function getNamedExpressionAttr(attrs2, key) {
|
|
13850
14096
|
const raw = attrs2[NAMED_EXPRESSION_ATTRS_KEY];
|
|
@@ -15254,7 +15500,7 @@ var stringifyHandlers = {
|
|
|
15254
15500
|
};
|
|
15255
15501
|
function stringifyMdxNode(children) {
|
|
15256
15502
|
const wrapped = children.map((child) => (child === null || child === void 0 ? void 0 : child.type) === "mdxJsxTextElement" ? { type: "paragraph", children: [child] } : child);
|
|
15257
|
-
const result = unified().use(remarkMdx2).use(
|
|
15503
|
+
const result = unified().use(remarkMdx2).use(remarkGfm3).use(remarkMath3).use(remarkStringify, { handlers: stringifyHandlers }).stringify({ type: "root", children: wrapped });
|
|
15258
15504
|
return typeof result === "string" ? result : String(result);
|
|
15259
15505
|
}
|
|
15260
15506
|
function renderMermaidBlock(state, node) {
|
|
@@ -15404,6 +15650,12 @@ function writeTreeChild(state, child) {
|
|
|
15404
15650
|
state.write("</Tree.Folder>");
|
|
15405
15651
|
state.ensureNewLine();
|
|
15406
15652
|
}
|
|
15653
|
+
function renderDatabase(state, node) {
|
|
15654
|
+
const props = ["id", "view"].map((key) => serializeJsxAttribute(node.attrs, key, node.attrs[key])).filter(Boolean);
|
|
15655
|
+
const propString = props.length > 0 ? ` ${props.join(" ")}` : "";
|
|
15656
|
+
state.write(`<Database${propString}${extraAttrsPropString(node.attrs, serializeLiteralJsxAttribute)} />`);
|
|
15657
|
+
state.closeBlock();
|
|
15658
|
+
}
|
|
15407
15659
|
function renderTree(state, node) {
|
|
15408
15660
|
var _a;
|
|
15409
15661
|
const treeData = (_a = node.attrs.treeData) !== null && _a !== void 0 ? _a : [];
|
|
@@ -15438,14 +15690,14 @@ function mergeExtraAttrs(attrs2) {
|
|
|
15438
15690
|
return attrs2;
|
|
15439
15691
|
return Object.assign(Object.assign({}, attrs2), extra);
|
|
15440
15692
|
}
|
|
15441
|
-
function extraAttrsPropString(nodeAttrs) {
|
|
15693
|
+
function extraAttrsPropString(nodeAttrs, serializeAttribute = serializeJsxAttribute) {
|
|
15442
15694
|
const extra = nodeAttrs[EXTRA_ATTRS_KEY];
|
|
15443
15695
|
if (!extra || typeof extra !== "object")
|
|
15444
15696
|
return "";
|
|
15445
15697
|
const entries = Object.entries(extra);
|
|
15446
15698
|
if (entries.length === 0)
|
|
15447
15699
|
return "";
|
|
15448
|
-
const props = entries.map(([key, value]) =>
|
|
15700
|
+
const props = entries.map(([key, value]) => serializeAttribute(extra, key, value)).filter(Boolean);
|
|
15449
15701
|
return props.length > 0 ? " " + props.join(" ") : "";
|
|
15450
15702
|
}
|
|
15451
15703
|
|
|
@@ -15500,7 +15752,8 @@ var BLOCK_LINE_TYPES = /* @__PURE__ */ new Set([
|
|
|
15500
15752
|
BLOCK_TYPES.promptBlock,
|
|
15501
15753
|
BLOCK_TYPES.color,
|
|
15502
15754
|
BLOCK_TYPES.tree,
|
|
15503
|
-
BLOCK_TYPES.visibility
|
|
15755
|
+
BLOCK_TYPES.visibility,
|
|
15756
|
+
BLOCK_TYPES.database
|
|
15504
15757
|
]);
|
|
15505
15758
|
var LAZY_CONTINUATION_TYPES = /* @__PURE__ */ new Set(["blockquote", "bulletList", "orderedList"]);
|
|
15506
15759
|
var IMAGE_TYPES = /* @__PURE__ */ new Set(["image", BLOCK_TYPES.image]);
|
|
@@ -15780,6 +16033,9 @@ function renderNode(state, node, _parent, _index) {
|
|
|
15780
16033
|
case BLOCK_TYPES.tree:
|
|
15781
16034
|
renderTree(state, node);
|
|
15782
16035
|
break;
|
|
16036
|
+
case BLOCK_TYPES.database:
|
|
16037
|
+
renderDatabase(state, node);
|
|
16038
|
+
break;
|
|
15783
16039
|
case BLOCK_TYPES.mermaidBlock:
|
|
15784
16040
|
renderMermaidBlock(state, node);
|
|
15785
16041
|
break;
|
|
@@ -16893,13 +17149,13 @@ function pmJsonToMdast(_doc, _frontmatter) {
|
|
|
16893
17149
|
}
|
|
16894
17150
|
|
|
16895
17151
|
// ../editor/dist/converter/serialize/mdast-to-mdx.js
|
|
16896
|
-
import
|
|
16897
|
-
import
|
|
17152
|
+
import remarkGfm4 from "remark-gfm";
|
|
17153
|
+
import remarkMath4 from "remark-math";
|
|
16898
17154
|
import remarkMdx3 from "remark-mdx";
|
|
16899
17155
|
import remarkStringify2 from "remark-stringify";
|
|
16900
17156
|
import { unified as unified2 } from "unified";
|
|
16901
17157
|
function mdastToMdx(mdast) {
|
|
16902
|
-
const result = unified2().use(remarkMdx3).use(
|
|
17158
|
+
const result = unified2().use(remarkMdx3).use(remarkGfm4).use(remarkMath4).use(remarkStringify2).stringify(mdast);
|
|
16903
17159
|
return typeof result === "string" ? result : String(result);
|
|
16904
17160
|
}
|
|
16905
17161
|
|
|
@@ -17402,6 +17658,7 @@ export {
|
|
|
17402
17658
|
CALLOUT_TYPES,
|
|
17403
17659
|
COMMENT_THREAD_IDS_ATTR,
|
|
17404
17660
|
DEFAULT_CODE_BLOCK_LANGUAGE,
|
|
17661
|
+
DEFAULT_DATABASE_VIEW,
|
|
17405
17662
|
DEFAULT_MERMAID_PLACEMENT,
|
|
17406
17663
|
EDITOR_COMPONENT_NAMES,
|
|
17407
17664
|
FRONTMATTER_ATTRIBUTES_WITH_ARRAY_VALUES,
|
|
@@ -17423,8 +17680,11 @@ export {
|
|
|
17423
17680
|
getDiffMarkerComment,
|
|
17424
17681
|
getImageAlignFromClassName,
|
|
17425
17682
|
getImageWidthFromStyle,
|
|
17683
|
+
isDatabaseId,
|
|
17684
|
+
isDatabaseView,
|
|
17426
17685
|
isJSXContent,
|
|
17427
17686
|
isNonEmptyFrontmatterValue,
|
|
17687
|
+
mdToPm,
|
|
17428
17688
|
mdastToMdx,
|
|
17429
17689
|
mdastToPm,
|
|
17430
17690
|
mdxToMdast,
|
|
@@ -17442,6 +17702,7 @@ export {
|
|
|
17442
17702
|
pmJsonToMdast,
|
|
17443
17703
|
pmToMdx,
|
|
17444
17704
|
pmToMdxPreservingSource,
|
|
17705
|
+
resolveDatabaseView,
|
|
17445
17706
|
safeJsonParse,
|
|
17446
17707
|
sanitizeDomAttrs,
|
|
17447
17708
|
serializeCommentThreadIds,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1709",
|
|
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.
|
|
85
|
+
"@mintlify/editor": "0.0.558",
|
|
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": "
|
|
104
|
+
"gitHead": "f3c97950d24e7ac75a5bc1206301746d333e8fc0"
|
|
105
105
|
}
|