@rspress/runtime 2.0.0-alpha.9 → 2.0.0-beta.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/Content.js +1 -1
- package/dist/hooks.js +2 -2
- package/dist/route.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +5 -5
package/dist/Content.js
CHANGED
@@ -7,7 +7,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__route_js_d0361f8a__ from "./route.js";
|
|
7
7
|
function TransitionContentImpl(props) {
|
8
8
|
var _siteData_themeConfig;
|
9
9
|
let element = props.el;
|
10
|
-
if (null === __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"] || void 0 === __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"] ? void 0 : null
|
10
|
+
if (null === __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"] || void 0 === __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"] ? void 0 : null == (_siteData_themeConfig = __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"].themeConfig) ? void 0 : _siteData_themeConfig.enableContentAnimation) element = (0, __WEBPACK_EXTERNAL_MODULE__hooks_js_5a9aefb7__.useViewTransition)(props.el);
|
11
11
|
return element;
|
12
12
|
}
|
13
13
|
const TransitionContent = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(TransitionContentImpl, (prevProps, nextProps)=>prevProps.el === nextProps.el);
|
package/dist/hooks.js
CHANGED
@@ -47,8 +47,8 @@ function useViewTransition(dom) {
|
|
47
47
|
}
|
48
48
|
function useWindowSize(initialWidth, initialHeight) {
|
49
49
|
const [size, setSize] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)({
|
50
|
-
width: initialWidth ??
|
51
|
-
height: initialHeight ??
|
50
|
+
width: initialWidth ?? Number.POSITIVE_INFINITY,
|
51
|
+
height: initialHeight ?? Number.POSITIVE_INFINITY
|
52
52
|
});
|
53
53
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
|
54
54
|
const handleResize = ()=>{
|
package/dist/route.js
CHANGED
@@ -9,7 +9,7 @@ function pathnameToRouteService(pathname) {
|
|
9
9
|
const cacheItem = cache.get(pathname);
|
10
10
|
if (cacheItem) return cacheItem;
|
11
11
|
const matched = (0, __WEBPACK_EXTERNAL_MODULE_react_router_dom_5358f3fe__.matchRoutes)(__WEBPACK_EXTERNAL_MODULE__VIRTUAL_ROUTES__3c8bd3e0__.routes, normalizeRoutePath(pathname));
|
12
|
-
const route = null == matched ? void 0 : null
|
12
|
+
const route = null == matched ? void 0 : null == (_matched_ = matched[0]) ? void 0 : _matched_.route;
|
13
13
|
if (route) cache.set(pathname, route);
|
14
14
|
return route;
|
15
15
|
}
|
package/dist/utils.js
CHANGED
@@ -11,7 +11,7 @@ function isEqualPath(a, b) {
|
|
11
11
|
}
|
12
12
|
function normalizeHrefInRuntime(a) {
|
13
13
|
var _siteData_route;
|
14
|
-
const cleanUrls = Boolean(null === __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"] || void 0 === __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"] ? void 0 : null
|
14
|
+
const cleanUrls = Boolean(null === __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"] || void 0 === __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"] ? void 0 : null == (_siteData_route = __WEBPACK_EXTERNAL_MODULE_virtual_site_data_fa42d4c0__["default"].route) ? void 0 : _siteData_route.cleanUrls);
|
15
15
|
return (0, __WEBPACK_EXTERNAL_MODULE__rspress_shared_baa012d0__.normalizeHref)(a, cleanUrls);
|
16
16
|
}
|
17
17
|
function normalizeImagePath(imagePath) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/runtime",
|
3
|
-
"version": "2.0.0-
|
3
|
+
"version": "2.0.0-beta.0",
|
4
4
|
"description": "The Runtime of Rspress Documentation Framework",
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
6
6
|
"repository": {
|
@@ -36,15 +36,15 @@
|
|
36
36
|
"server.d.ts"
|
37
37
|
],
|
38
38
|
"dependencies": {
|
39
|
-
"react": "^
|
40
|
-
"react-dom": "^
|
39
|
+
"react": "^19.1.0",
|
40
|
+
"react-dom": "^19.1.0",
|
41
41
|
"react-helmet-async": "^2.0.5",
|
42
42
|
"react-router-dom": "^6.29.0",
|
43
|
-
"@rspress/shared": "2.0.0-
|
43
|
+
"@rspress/shared": "2.0.0-beta.0"
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
46
|
"@rsbuild/plugin-react": "~1.1.1",
|
47
|
-
"@rslib/core": "0.6.
|
47
|
+
"@rslib/core": "0.6.5",
|
48
48
|
"@types/jest": "~29.5.14",
|
49
49
|
"@types/react": "^18.3.20",
|
50
50
|
"@types/react-dom": "^18.3.6",
|