@qualcomm-ui/mdx-vite 2.4.0 → 2.5.0
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/cli.js +12 -0
- package/dist/cli.js.map +2 -2
- package/dist/docs-plugin/docs-plugin.d.ts.map +1 -1
- package/dist/docs-plugin/internal/search-indexer.d.ts.map +1 -1
- package/dist/docs-plugin/internal/services/markdown/markdown.types.d.ts +5 -1
- package/dist/docs-plugin/internal/services/markdown/markdown.types.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +2 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4979,11 +4979,13 @@ var SearchIndexer = class {
|
|
|
4979
4979
|
changed: {},
|
|
4980
4980
|
filePath
|
|
4981
4981
|
};
|
|
4982
|
+
let previousPage = void 0;
|
|
4982
4983
|
if (!cached) {
|
|
4983
4984
|
const previousData = this.fileCache.readCache(filePath);
|
|
4984
4985
|
if (previousData) {
|
|
4985
4986
|
const cachedFm = JSON.stringify(previousData.frontmatter);
|
|
4986
4987
|
const currentFm = JSON.stringify(frontmatter);
|
|
4988
|
+
previousPage = previousData.page;
|
|
4987
4989
|
if (cachedFm !== currentFm) {
|
|
4988
4990
|
metadata.changed.frontmatter = true;
|
|
4989
4991
|
}
|
|
@@ -5011,6 +5013,16 @@ var SearchIndexer = class {
|
|
|
5011
5013
|
return { metadata, pageSections: [defaultSection] };
|
|
5012
5014
|
}
|
|
5013
5015
|
const { sections, toc } = indexedPage;
|
|
5016
|
+
if (previousPage) {
|
|
5017
|
+
for (let i = 0; i < toc.length; i++) {
|
|
5018
|
+
const previousHeading = previousPage.toc[i];
|
|
5019
|
+
const currentHeading = toc[i];
|
|
5020
|
+
if (previousHeading?.id !== currentHeading.id) {
|
|
5021
|
+
metadata.changed.toc = true;
|
|
5022
|
+
break;
|
|
5023
|
+
}
|
|
5024
|
+
}
|
|
5025
|
+
}
|
|
5014
5026
|
if (toc.length) {
|
|
5015
5027
|
this._pageMap[defaultSection.pathname].toc = toc;
|
|
5016
5028
|
}
|