@qualcomm-ui/mdx-vite 2.6.3 → 2.6.4
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/docs-plugin/__tests__/markdown-indexer.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/remark-slug.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/remix-flat-routes.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/remix.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/utils.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/utils.spec.d.ts +2 -0
- package/dist/docs-plugin/__tests__/utils.spec.d.ts.map +1 -0
- package/dist/docs-plugin/__tests__/vite-generouted.spec.d.ts.map +1 -0
- package/dist/docs-plugin/shiki/utils.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +2 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/docs-plugin/tests/markdown-indexer.spec.d.ts.map +0 -1
- package/dist/docs-plugin/tests/remark-slug.spec.d.ts.map +0 -1
- package/dist/docs-plugin/tests/remix-flat-routes.spec.d.ts.map +0 -1
- package/dist/docs-plugin/tests/remix.spec.d.ts.map +0 -1
- package/dist/docs-plugin/tests/utils.d.ts.map +0 -1
- package/dist/docs-plugin/tests/vite-generouted.spec.d.ts.map +0 -1
- /package/dist/docs-plugin/{tests → __tests__}/markdown-indexer.spec.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/remark-slug.spec.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/remix-flat-routes.spec.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/remix.spec.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/utils.d.ts +0 -0
- /package/dist/docs-plugin/{tests → __tests__}/vite-generouted.spec.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-indexer.spec.d.ts","sourceRoot":"","sources":["../../../src/docs-plugin/__tests__/markdown-indexer.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remark-slug.spec.d.ts","sourceRoot":"","sources":["../../../src/docs-plugin/__tests__/remark-slug.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remix-flat-routes.spec.d.ts","sourceRoot":"","sources":["../../../src/docs-plugin/__tests__/remix-flat-routes.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remix.spec.d.ts","sourceRoot":"","sources":["../../../src/docs-plugin/__tests__/remix.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/docs-plugin/__tests__/utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,IAAI,CAE/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.spec.d.ts","sourceRoot":"","sources":["../../../src/docs-plugin/__tests__/utils.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite-generouted.spec.d.ts","sourceRoot":"","sources":["../../../src/docs-plugin/__tests__/vite-generouted.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/docs-plugin/shiki/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/docs-plugin/shiki/utils.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqD1D;AAED,wBAAgB,iCAAiC,CAC/C,eAAe,EAAE,MAAM,GACtB,MAAM,GAAG,IAAI,CAuDf"}
|
package/dist/index.js
CHANGED
|
@@ -2285,6 +2285,7 @@ var remarkSpoilers = (options = {}) => {
|
|
|
2285
2285
|
|
|
2286
2286
|
// src/docs-plugin/shiki/utils.ts
|
|
2287
2287
|
function removeCodeAnnotations(code) {
|
|
2288
|
+
const hideAnnotationRegex = /\/\/\s*\[!code\s+hide(?::\d+)?\]/;
|
|
2288
2289
|
const lineAnnotationRegex = /\/\/\s*\[!code\s*(?:\S.*)?\]/;
|
|
2289
2290
|
const jsxBlockAnnotationRegex = /\{\s*\/\*\s*\[!code(?:\s+\S+)?\]\s*\*\/\s*\}/;
|
|
2290
2291
|
const htmlAnnotationRegex = /<!--\s*\[!code(?:\s+\S+)?\]\s*-->/;
|
|
@@ -2293,11 +2294,13 @@ function removeCodeAnnotations(code) {
|
|
|
2293
2294
|
function stripAnnotations(line) {
|
|
2294
2295
|
let processed = line;
|
|
2295
2296
|
let touched = false;
|
|
2297
|
+
const hasHideAnnotation = hideAnnotationRegex.test(line);
|
|
2296
2298
|
const patterns = [
|
|
2297
2299
|
inlineIncrementRegex,
|
|
2298
2300
|
jsxBlockAnnotationRegex,
|
|
2299
2301
|
htmlAnnotationRegex,
|
|
2300
|
-
blockAnnotationRegex
|
|
2302
|
+
blockAnnotationRegex,
|
|
2303
|
+
lineAnnotationRegex
|
|
2301
2304
|
];
|
|
2302
2305
|
for (const pattern of patterns) {
|
|
2303
2306
|
const next = processed.replace(pattern, "");
|
|
@@ -2306,10 +2309,10 @@ function removeCodeAnnotations(code) {
|
|
|
2306
2309
|
processed = next;
|
|
2307
2310
|
}
|
|
2308
2311
|
}
|
|
2309
|
-
return { processed, touched };
|
|
2312
|
+
return { hasHideAnnotation, processed, touched };
|
|
2310
2313
|
}
|
|
2311
|
-
return code.split("\n").map(stripAnnotations).filter(({ processed, touched }) => {
|
|
2312
|
-
if (
|
|
2314
|
+
return code.split("\n").map(stripAnnotations).filter(({ hasHideAnnotation, processed, touched }) => {
|
|
2315
|
+
if (hasHideAnnotation) {
|
|
2313
2316
|
return false;
|
|
2314
2317
|
}
|
|
2315
2318
|
const processedIsBlank = !processed.trim();
|