@rspress/runtime 1.43.0-canary-202503021351 → 1.43.0-canary-202503021748

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.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { DataContext, ThemeContext, useDark, useI18n, useLang, usePageData, useVersion, useViewTransition, } from './hooks';
2
2
  export { Content } from './Content';
3
3
  export { normalizeHrefInRuntime, normalizeImagePath, withBase, removeBase, addLeadingSlash, removeTrailingSlash, normalizeSlash, isProduction, isEqualPath, } from './utils';
4
- export { useLocation, useNavigate, matchRoutes, BrowserRouter, useSearchParams, } from 'react-router-dom';
5
- export { pathnameToRouteService } from './route';
4
+ export { useLocation, useNavigate, matchRoutes, BrowserRouter, useSearchParams, matchPath, } from 'react-router-dom';
5
+ export { pathnameToRouteService, normalizeRoutePath } from './route';
6
6
  export { Helmet } from 'react-helmet-async';
7
7
  export { NoSSR } from './NoSSR';
package/dist/index.js CHANGED
@@ -14,9 +14,11 @@ var __webpack_exports__ThemeContext = __WEBPACK_EXTERNAL_MODULE__hooks_js_5a9aef
14
14
  var __webpack_exports__addLeadingSlash = __WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.addLeadingSlash;
15
15
  var __webpack_exports__isEqualPath = __WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.isEqualPath;
16
16
  var __webpack_exports__isProduction = __WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.isProduction;
17
+ var __webpack_exports__matchPath = __WEBPACK_EXTERNAL_MODULE_react_router_dom_5358f3fe__.matchPath;
17
18
  var __webpack_exports__matchRoutes = __WEBPACK_EXTERNAL_MODULE_react_router_dom_5358f3fe__.matchRoutes;
18
19
  var __webpack_exports__normalizeHrefInRuntime = __WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.normalizeHrefInRuntime;
19
20
  var __webpack_exports__normalizeImagePath = __WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.normalizeImagePath;
21
+ var __webpack_exports__normalizeRoutePath = __WEBPACK_EXTERNAL_MODULE__route_js_d0361f8a__.normalizeRoutePath;
20
22
  var __webpack_exports__normalizeSlash = __WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.normalizeSlash;
21
23
  var __webpack_exports__pathnameToRouteService = __WEBPACK_EXTERNAL_MODULE__route_js_d0361f8a__.pathnameToRouteService;
22
24
  var __webpack_exports__removeBase = __WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.removeBase;
@@ -31,4 +33,4 @@ var __webpack_exports__useSearchParams = __WEBPACK_EXTERNAL_MODULE_react_router_
31
33
  var __webpack_exports__useVersion = __WEBPACK_EXTERNAL_MODULE__hooks_js_5a9aefb7__.useVersion;
32
34
  var __webpack_exports__useViewTransition = __WEBPACK_EXTERNAL_MODULE__hooks_js_5a9aefb7__.useViewTransition;
33
35
  var __webpack_exports__withBase = __WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.withBase;
34
- export { __webpack_exports__BrowserRouter as BrowserRouter, __webpack_exports__Content as Content, __webpack_exports__DataContext as DataContext, __webpack_exports__Helmet as Helmet, __webpack_exports__NoSSR as NoSSR, __webpack_exports__ThemeContext as ThemeContext, __webpack_exports__addLeadingSlash as addLeadingSlash, __webpack_exports__isEqualPath as isEqualPath, __webpack_exports__isProduction as isProduction, __webpack_exports__matchRoutes as matchRoutes, __webpack_exports__normalizeHrefInRuntime as normalizeHrefInRuntime, __webpack_exports__normalizeImagePath as normalizeImagePath, __webpack_exports__normalizeSlash as normalizeSlash, __webpack_exports__pathnameToRouteService as pathnameToRouteService, __webpack_exports__removeBase as removeBase, __webpack_exports__removeTrailingSlash as removeTrailingSlash, __webpack_exports__useDark as useDark, __webpack_exports__useI18n as useI18n, __webpack_exports__useLang as useLang, __webpack_exports__useLocation as useLocation, __webpack_exports__useNavigate as useNavigate, __webpack_exports__usePageData as usePageData, __webpack_exports__useSearchParams as useSearchParams, __webpack_exports__useVersion as useVersion, __webpack_exports__useViewTransition as useViewTransition, __webpack_exports__withBase as withBase };
36
+ export { __webpack_exports__BrowserRouter as BrowserRouter, __webpack_exports__Content as Content, __webpack_exports__DataContext as DataContext, __webpack_exports__Helmet as Helmet, __webpack_exports__NoSSR as NoSSR, __webpack_exports__ThemeContext as ThemeContext, __webpack_exports__addLeadingSlash as addLeadingSlash, __webpack_exports__isEqualPath as isEqualPath, __webpack_exports__isProduction as isProduction, __webpack_exports__matchPath as matchPath, __webpack_exports__matchRoutes as matchRoutes, __webpack_exports__normalizeHrefInRuntime as normalizeHrefInRuntime, __webpack_exports__normalizeImagePath as normalizeImagePath, __webpack_exports__normalizeRoutePath as normalizeRoutePath, __webpack_exports__normalizeSlash as normalizeSlash, __webpack_exports__pathnameToRouteService as pathnameToRouteService, __webpack_exports__removeBase as removeBase, __webpack_exports__removeTrailingSlash as removeTrailingSlash, __webpack_exports__useDark as useDark, __webpack_exports__useI18n as useI18n, __webpack_exports__useLang as useLang, __webpack_exports__useLocation as useLocation, __webpack_exports__useNavigate as useNavigate, __webpack_exports__usePageData as usePageData, __webpack_exports__useSearchParams as useSearchParams, __webpack_exports__useVersion as useVersion, __webpack_exports__useViewTransition as useViewTransition, __webpack_exports__withBase as withBase };
package/dist/route.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { Route } from '@rspress/shared';
2
+ export declare function normalizeRoutePath(routePath: string): string;
2
3
  /**
3
4
  * this is a bridge of two core features Sidebar and RouteService
4
5
  * @param pathname useLocation().pathname
package/dist/route.js CHANGED
@@ -13,4 +13,4 @@ function pathnameToRouteService(pathname) {
13
13
  if (route) cache.set(pathname, route);
14
14
  return route;
15
15
  }
16
- export { pathnameToRouteService };
16
+ export { normalizeRoutePath, pathnameToRouteService };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/runtime",
3
- "version": "1.43.0-canary-202503021351",
3
+ "version": "1.43.0-canary-202503021748",
4
4
  "description": "The Runtime of Rspress Documentation Framework",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -40,7 +40,7 @@
40
40
  "react-dom": "^18.3.1",
41
41
  "react-helmet-async": "^1.3.0",
42
42
  "react-router-dom": "^6.29.0",
43
- "@rspress/shared": "1.43.0-canary-202503021351"
43
+ "@rspress/shared": "1.43.0-canary-202503021748"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@rsbuild/plugin-react": "~1.1.0",