@mintlify/cli 4.0.1584 → 4.0.1586
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/vendor/converter.js
CHANGED
|
@@ -142,7 +142,9 @@ var EDITOR_COMPONENT_NAMES = /* @__PURE__ */ new Set([
|
|
|
142
142
|
"Mermaid"
|
|
143
143
|
]);
|
|
144
144
|
var INLINE_COMPONENTS = /* @__PURE__ */ new Set(["Badge", "Icon", "Tooltip"]);
|
|
145
|
+
var COMMENT_THREAD_IDS_ATTR = "commentThreadIds";
|
|
145
146
|
var IGNORED_MERGE_ATTRS = /* @__PURE__ */ new Set([
|
|
147
|
+
COMMENT_THREAD_IDS_ATTR,
|
|
146
148
|
"__childIndex",
|
|
147
149
|
"__isLastInGroup",
|
|
148
150
|
"__hasGroupParent",
|
|
@@ -151,6 +153,7 @@ var IGNORED_MERGE_ATTRS = /* @__PURE__ */ new Set([
|
|
|
151
153
|
]);
|
|
152
154
|
var POSITION_STRIPPED_MERGE_ATTRS = /* @__PURE__ */ new Set(["mdxJsxNode", "mdastNode"]);
|
|
153
155
|
var HIDDEN_NODE_ATTRS = /* @__PURE__ */ new Set([
|
|
156
|
+
COMMENT_THREAD_IDS_ATTR,
|
|
154
157
|
"__isHidden",
|
|
155
158
|
"__hasGroupParent",
|
|
156
159
|
"__childIndex",
|
|
@@ -773,13 +776,33 @@ var marks = {
|
|
|
773
776
|
superscript: {},
|
|
774
777
|
kbd: {}
|
|
775
778
|
};
|
|
776
|
-
|
|
779
|
+
function isCommentableBlock(name, spec) {
|
|
780
|
+
return name !== "doc" && !spec.inline && spec.group !== "inline";
|
|
781
|
+
}
|
|
782
|
+
function withCommentThreadIds(specs) {
|
|
783
|
+
return Object.fromEntries(Object.entries(specs).map(([name, spec]) => [
|
|
784
|
+
name,
|
|
785
|
+
isCommentableBlock(name, spec) ? Object.assign(Object.assign({}, spec), { attrs: Object.assign(Object.assign({}, spec.attrs), { [COMMENT_THREAD_IDS_ATTR]: { default: null } }) }) : spec
|
|
786
|
+
]));
|
|
787
|
+
}
|
|
788
|
+
var mintlifySchema = new Schema({ nodes: withCommentThreadIds(nodes), marks });
|
|
777
789
|
function createSchema(extra) {
|
|
778
|
-
const mergedNodes = Object.assign(Object.assign({}, nodes), extra === null || extra === void 0 ? void 0 : extra.nodes);
|
|
790
|
+
const mergedNodes = withCommentThreadIds(Object.assign(Object.assign({}, nodes), extra === null || extra === void 0 ? void 0 : extra.nodes));
|
|
779
791
|
const mergedMarks = Object.assign(Object.assign({}, marks), extra === null || extra === void 0 ? void 0 : extra.marks);
|
|
780
792
|
return new Schema({ nodes: mergedNodes, marks: mergedMarks });
|
|
781
793
|
}
|
|
782
794
|
|
|
795
|
+
// ../editor/dist/converter/utils/comment-thread-ids.js
|
|
796
|
+
function parseCommentThreadIds(value) {
|
|
797
|
+
if (typeof value !== "string")
|
|
798
|
+
return [];
|
|
799
|
+
return value.split(" ").filter(Boolean);
|
|
800
|
+
}
|
|
801
|
+
function serializeCommentThreadIds(ids) {
|
|
802
|
+
const unique = [...new Set(ids.filter(Boolean))];
|
|
803
|
+
return unique.length > 0 ? unique.join(" ") : null;
|
|
804
|
+
}
|
|
805
|
+
|
|
783
806
|
// ../editor/dist/converter/parse/parse-utils.js
|
|
784
807
|
import { parse as parseYaml } from "yaml";
|
|
785
808
|
function parseFrontmatterYaml(value) {
|
|
@@ -6532,6 +6555,7 @@ function mergeRemoteIntoLiveDoc(params) {
|
|
|
6532
6555
|
export {
|
|
6533
6556
|
BLOCK_TYPES,
|
|
6534
6557
|
CALLOUT_TYPES,
|
|
6558
|
+
COMMENT_THREAD_IDS_ATTR,
|
|
6535
6559
|
DEFAULT_CODE_BLOCK_LANGUAGE,
|
|
6536
6560
|
DEFAULT_MERMAID_PLACEMENT,
|
|
6537
6561
|
EDITOR_COMPONENT_NAMES,
|
|
@@ -6564,6 +6588,7 @@ export {
|
|
|
6564
6588
|
mintlifySchema,
|
|
6565
6589
|
nodeSize,
|
|
6566
6590
|
nodesMatch,
|
|
6591
|
+
parseCommentThreadIds,
|
|
6567
6592
|
parseExpressionAttribute,
|
|
6568
6593
|
parseFrontmatterYaml,
|
|
6569
6594
|
parseLineRanges,
|
|
@@ -6574,6 +6599,7 @@ export {
|
|
|
6574
6599
|
pmToMdxPreservingSource,
|
|
6575
6600
|
safeJsonParse,
|
|
6576
6601
|
sanitizeDomAttrs,
|
|
6602
|
+
serializeCommentThreadIds,
|
|
6577
6603
|
serializePropValue,
|
|
6578
6604
|
storedValueToTyped,
|
|
6579
6605
|
textSimilarity
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1586",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -45,12 +45,12 @@
|
|
|
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/prebuild": "1.0.
|
|
52
|
-
"@mintlify/previewing": "4.0.
|
|
53
|
-
"@mintlify/validation": "0.1.
|
|
48
|
+
"@mintlify/common": "1.0.1207",
|
|
49
|
+
"@mintlify/link-rot": "3.0.1415",
|
|
50
|
+
"@mintlify/models": "0.0.366",
|
|
51
|
+
"@mintlify/prebuild": "1.0.1366",
|
|
52
|
+
"@mintlify/previewing": "4.0.1438",
|
|
53
|
+
"@mintlify/validation": "0.1.891",
|
|
54
54
|
"adm-zip": "0.6.0",
|
|
55
55
|
"chalk": "5.2.0",
|
|
56
56
|
"color": "4.2.3",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"keytar": "7.9.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@mintlify/editor": "0.0.
|
|
89
|
+
"@mintlify/editor": "0.0.462",
|
|
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": "
|
|
108
|
+
"gitHead": "f22439455fdf623d1f376befc11a68d48faaa6af"
|
|
109
109
|
}
|