@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-extractor.d.ts","sourceRoot":"","sources":["../../../src/ai-knowledge/generator/section-extractor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"section-extractor.d.ts","sourceRoot":"","sources":["../../../src/ai-knowledge/generator/section-extractor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAqB,IAAI,EAAoB,MAAM,OAAO,CAAA;AAStE,OAAO,KAAK,EAAc,YAAY,EAAe,MAAM,iBAAiB,CAAA;AAG5E,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IAEjB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAaD;;GAEG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAQ;gBAE7B,OAAO,CAAC,EAAE,uBAAuB;IAM7C;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,GAAG,YAAY,EAAE;IAyEvD,OAAO,CAAC,iBAAiB;IAgEzB,OAAO,CAAC,YAAY;IAwCpB,OAAO,CAAC,eAAe;IAYvB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAkBtB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,gBAAgB;CAGzB"}
|
package/dist/cli.js
CHANGED
|
@@ -6121,6 +6121,7 @@ async function formatThemeNodes() {
|
|
|
6121
6121
|
}
|
|
6122
6122
|
|
|
6123
6123
|
// src/ai-knowledge/generator/section-extractor.ts
|
|
6124
|
+
import { toString as toString2 } from "mdast-util-to-string";
|
|
6124
6125
|
import remarkStringify3 from "remark-stringify";
|
|
6125
6126
|
import { unified as unified4 } from "unified";
|
|
6126
6127
|
import { visit as visit10 } from "unist-util-visit";
|
|
@@ -6151,11 +6152,20 @@ var SectionExtractor = class {
|
|
|
6151
6152
|
};
|
|
6152
6153
|
for (let i = 0; i < tree.children.length; i++) {
|
|
6153
6154
|
const node = tree.children[i];
|
|
6155
|
+
if (node.type === "yaml") {
|
|
6156
|
+
continue;
|
|
6157
|
+
}
|
|
6154
6158
|
if (node.type === "heading") {
|
|
6155
6159
|
const heading = node;
|
|
6156
6160
|
if (!this.depths.has(heading.depth)) {
|
|
6157
6161
|
if (pendingSection) {
|
|
6158
6162
|
pendingSection.nodes.push(node);
|
|
6163
|
+
} else {
|
|
6164
|
+
pendingSection = {
|
|
6165
|
+
headerPath: headerStack.map((h) => h.text),
|
|
6166
|
+
nodes: [],
|
|
6167
|
+
startIndex: i
|
|
6168
|
+
};
|
|
6159
6169
|
}
|
|
6160
6170
|
continue;
|
|
6161
6171
|
}
|
|
@@ -6163,7 +6173,7 @@ var SectionExtractor = class {
|
|
|
6163
6173
|
while (headerStack.length > 0 && headerStack[headerStack.length - 1].depth >= heading.depth) {
|
|
6164
6174
|
headerStack.pop();
|
|
6165
6175
|
}
|
|
6166
|
-
const headingText =
|
|
6176
|
+
const headingText = toString2(heading);
|
|
6167
6177
|
headerStack.push({ depth: heading.depth, text: headingText });
|
|
6168
6178
|
pendingSection = {
|
|
6169
6179
|
headerPath: headerStack.map((h) => h.text),
|
|
@@ -6172,18 +6182,17 @@ var SectionExtractor = class {
|
|
|
6172
6182
|
};
|
|
6173
6183
|
} else if (pendingSection) {
|
|
6174
6184
|
pendingSection.nodes.push(node);
|
|
6185
|
+
} else {
|
|
6186
|
+
pendingSection = {
|
|
6187
|
+
headerPath: headerStack.map((h) => h.text),
|
|
6188
|
+
nodes: [node],
|
|
6189
|
+
startIndex: i
|
|
6190
|
+
};
|
|
6175
6191
|
}
|
|
6176
6192
|
}
|
|
6177
6193
|
finalizeSection();
|
|
6178
6194
|
return sections;
|
|
6179
6195
|
}
|
|
6180
|
-
getHeadingText(heading) {
|
|
6181
|
-
let text = "";
|
|
6182
|
-
visit10(heading, "text", (node) => {
|
|
6183
|
-
text += node.value;
|
|
6184
|
-
});
|
|
6185
|
-
return text.trim();
|
|
6186
|
-
}
|
|
6187
6196
|
buildSectionEntry(section, pageInfo) {
|
|
6188
6197
|
const { nodes, terms } = this.extractTerms(section.nodes);
|
|
6189
6198
|
if (nodes.length === 0) {
|