@qualcomm-ui/mdx-vite 2.16.0 → 2.16.2
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/dist/ai-knowledge/generator/section-extractor.d.ts +0 -1
- package/dist/ai-knowledge/generator/section-extractor.d.ts.map +1 -1
- package/dist/cli.js +17 -8
- package/dist/cli.js.map +3 -3
- package/dist/index.js +19 -10
- package/dist/index.js.map +3 -3
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6023,6 +6023,7 @@ async function formatThemeNodes() {
|
|
|
6023
6023
|
}
|
|
6024
6024
|
|
|
6025
6025
|
// src/ai-knowledge/generator/section-extractor.ts
|
|
6026
|
+
import { toString as toString2 } from "mdast-util-to-string";
|
|
6026
6027
|
import remarkStringify3 from "remark-stringify";
|
|
6027
6028
|
import { unified as unified4 } from "unified";
|
|
6028
6029
|
import { visit as visit10 } from "unist-util-visit";
|
|
@@ -6053,11 +6054,20 @@ var SectionExtractor = class {
|
|
|
6053
6054
|
};
|
|
6054
6055
|
for (let i = 0; i < tree.children.length; i++) {
|
|
6055
6056
|
const node = tree.children[i];
|
|
6057
|
+
if (node.type === "yaml") {
|
|
6058
|
+
continue;
|
|
6059
|
+
}
|
|
6056
6060
|
if (node.type === "heading") {
|
|
6057
6061
|
const heading2 = node;
|
|
6058
6062
|
if (!this.depths.has(heading2.depth)) {
|
|
6059
6063
|
if (pendingSection) {
|
|
6060
6064
|
pendingSection.nodes.push(node);
|
|
6065
|
+
} else {
|
|
6066
|
+
pendingSection = {
|
|
6067
|
+
headerPath: headerStack.map((h) => h.text),
|
|
6068
|
+
nodes: [],
|
|
6069
|
+
startIndex: i
|
|
6070
|
+
};
|
|
6061
6071
|
}
|
|
6062
6072
|
continue;
|
|
6063
6073
|
}
|
|
@@ -6065,7 +6075,7 @@ var SectionExtractor = class {
|
|
|
6065
6075
|
while (headerStack.length > 0 && headerStack[headerStack.length - 1].depth >= heading2.depth) {
|
|
6066
6076
|
headerStack.pop();
|
|
6067
6077
|
}
|
|
6068
|
-
const headingText =
|
|
6078
|
+
const headingText = toString2(heading2);
|
|
6069
6079
|
headerStack.push({ depth: heading2.depth, text: headingText });
|
|
6070
6080
|
pendingSection = {
|
|
6071
6081
|
headerPath: headerStack.map((h) => h.text),
|
|
@@ -6074,18 +6084,17 @@ var SectionExtractor = class {
|
|
|
6074
6084
|
};
|
|
6075
6085
|
} else if (pendingSection) {
|
|
6076
6086
|
pendingSection.nodes.push(node);
|
|
6087
|
+
} else {
|
|
6088
|
+
pendingSection = {
|
|
6089
|
+
headerPath: headerStack.map((h) => h.text),
|
|
6090
|
+
nodes: [node],
|
|
6091
|
+
startIndex: i
|
|
6092
|
+
};
|
|
6077
6093
|
}
|
|
6078
6094
|
}
|
|
6079
6095
|
finalizeSection();
|
|
6080
6096
|
return sections;
|
|
6081
6097
|
}
|
|
6082
|
-
getHeadingText(heading2) {
|
|
6083
|
-
let text = "";
|
|
6084
|
-
visit10(heading2, "text", (node) => {
|
|
6085
|
-
text += node.value;
|
|
6086
|
-
});
|
|
6087
|
-
return text.trim();
|
|
6088
|
-
}
|
|
6089
6098
|
buildSectionEntry(section, pageInfo) {
|
|
6090
6099
|
const { nodes, terms } = this.extractTerms(section.nodes);
|
|
6091
6100
|
if (nodes.length === 0) {
|
|
@@ -7354,7 +7363,7 @@ var remarkFrontmatterTitle = () => {
|
|
|
7354
7363
|
};
|
|
7355
7364
|
|
|
7356
7365
|
// src/docs-plugin/remark/remark-self-link-headings.ts
|
|
7357
|
-
import { toString as
|
|
7366
|
+
import { toString as toString3 } from "mdast-util-to-string";
|
|
7358
7367
|
import { visit as visit15 } from "unist-util-visit";
|
|
7359
7368
|
var emptyOptions2 = {};
|
|
7360
7369
|
function remarkSelfLinkHeadings(baseUrl = "", options) {
|
|
@@ -7385,7 +7394,7 @@ function remarkSelfLinkHeadings(baseUrl = "", options) {
|
|
|
7385
7394
|
seenIds.clear();
|
|
7386
7395
|
visit15(tree, "heading", (node) => {
|
|
7387
7396
|
if (allowedLevels.has(node.depth)) {
|
|
7388
|
-
const text =
|
|
7397
|
+
const text = toString3(node);
|
|
7389
7398
|
const slug = prefix + createSlug(text);
|
|
7390
7399
|
const linkNode = {
|
|
7391
7400
|
children: node.children,
|