@rspress/core 2.0.0-alpha.3 → 2.0.0-alpha.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/index.js +1 -1
- package/dist/loader.js +4 -6
- package/package.json +11 -8
package/dist/index.js
CHANGED
|
@@ -1553,7 +1553,7 @@ async function dev(options) {
|
|
|
1553
1553
|
await checkLanguageParity(modifiedConfig);
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
|
-
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-alpha.
|
|
1556
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-alpha.4"}');
|
|
1557
1557
|
async function renderFrontmatterHead(route) {
|
|
1558
1558
|
if (!isRouteMeta(route)) return '';
|
|
1559
1559
|
const content = await __WEBPACK_EXTERNAL_MODULE_node_fs_promises_153e37e0__["default"].readFile(route.absolutePath, {
|
package/dist/loader.js
CHANGED
|
@@ -338,12 +338,12 @@ const remarkPluginNormalizeLink = ({ root, cleanUrls })=>(tree, file)=>{
|
|
|
338
338
|
});
|
|
339
339
|
(0, __WEBPACK_EXTERNAL_MODULE_unist_util_visit_555e002a__.visit)(tree, (node)=>{
|
|
340
340
|
if ('mdxJsxFlowElement' !== node.type && 'mdxJsxTextElement' !== node.type || 'img' !== node.name) return;
|
|
341
|
-
const
|
|
342
|
-
if ('string' != typeof
|
|
343
|
-
const imagePath = normalizeImageUrl(
|
|
341
|
+
const srcAttr = (0, __WEBPACK_EXTERNAL_MODULE__rspress_shared_node_utils_78947ce6__.getNodeAttribute)(node, 'src', true);
|
|
342
|
+
if ('string' != typeof (null == srcAttr ? void 0 : srcAttr.value)) return;
|
|
343
|
+
const imagePath = normalizeImageUrl(srcAttr.value);
|
|
344
344
|
if (!imagePath) return;
|
|
345
345
|
const tempVariableName = `image${images.length}`;
|
|
346
|
-
Object.assign(
|
|
346
|
+
Object.assign(srcAttr, getMdxSrcAttribute(tempVariableName));
|
|
347
347
|
images.push(getASTNodeImport(tempVariableName, imagePath));
|
|
348
348
|
});
|
|
349
349
|
tree.children.unshift(...images);
|
|
@@ -427,7 +427,6 @@ async function createMDXOptions(docDirectory, config, checkDeadLinks, routeServi
|
|
|
427
427
|
}),
|
|
428
428
|
...globalComponentsFromConfig
|
|
429
429
|
];
|
|
430
|
-
const defaultLang = (null == config ? void 0 : config.lang) || '';
|
|
431
430
|
return {
|
|
432
431
|
providerImportSource: '@mdx-js/react',
|
|
433
432
|
format: __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].extname(filepath).slice(1),
|
|
@@ -438,7 +437,6 @@ async function createMDXOptions(docDirectory, config, checkDeadLinks, routeServi
|
|
|
438
437
|
remarkPluginNormalizeLink,
|
|
439
438
|
{
|
|
440
439
|
cleanUrls,
|
|
441
|
-
defaultLang,
|
|
442
440
|
root: docDirectory
|
|
443
441
|
}
|
|
444
442
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress/core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.4",
|
|
4
4
|
"description": "The Rspress Documentation Framework",
|
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
|
6
6
|
"repository": {
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"unified": "^10.1.2",
|
|
71
71
|
"unist-util-visit": "^4.1.2",
|
|
72
72
|
"unist-util-visit-children": "^2.0.2",
|
|
73
|
-
"@rspress/plugin-
|
|
74
|
-
"@rspress/plugin-
|
|
75
|
-
"@rspress/plugin-
|
|
76
|
-
"@rspress/plugin-
|
|
77
|
-
"@rspress/
|
|
78
|
-
"@rspress/
|
|
79
|
-
"@rspress/
|
|
73
|
+
"@rspress/plugin-auto-nav-sidebar": "2.0.0-alpha.4",
|
|
74
|
+
"@rspress/plugin-container-syntax": "2.0.0-alpha.4",
|
|
75
|
+
"@rspress/plugin-last-updated": "2.0.0-alpha.4",
|
|
76
|
+
"@rspress/plugin-medium-zoom": "2.0.0-alpha.4",
|
|
77
|
+
"@rspress/runtime": "2.0.0-alpha.4",
|
|
78
|
+
"@rspress/theme-default": "2.0.0-alpha.4",
|
|
79
|
+
"@rspress/shared": "2.0.0-alpha.4"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@microsoft/api-extractor": "^7.52.1",
|
|
@@ -93,11 +93,14 @@
|
|
|
93
93
|
"memfs": "^4.17.0",
|
|
94
94
|
"postcss": "8.5.3",
|
|
95
95
|
"rehype-stringify": "^9.0.4",
|
|
96
|
+
"remark-mdx": "2.3.0",
|
|
96
97
|
"remark-parse": "^10.0.2",
|
|
97
98
|
"remark-rehype": "^10.1.0",
|
|
99
|
+
"remark-stringify": "^10.0.3",
|
|
98
100
|
"rimraf": "^6.0.1",
|
|
99
101
|
"tailwindcss": "^3.4.17",
|
|
100
102
|
"typescript": "^5.8.2",
|
|
103
|
+
"vfile": "^5.3.7",
|
|
101
104
|
"@rspress/config": "1.0.0"
|
|
102
105
|
},
|
|
103
106
|
"engines": {
|