@modern-js/runtime 2.60.5 → 2.60.6-alpha.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.
@@ -70,7 +70,7 @@ const routerPlugin = (userConfig = {}) => {
70
70
  },
71
71
  wrapRoot: (App) => {
72
72
  const pluginConfig = api.useRuntimeConfigContext();
73
- const { serverBase = [], supportHtml5History = true, basename = "", routesConfig, createRoutes } = (0, import_merge.merge)(pluginConfig.router || {}, userConfig);
73
+ const { serverBase = [], supportHtml5History = true, basename = "", routesConfig, createRoutes, future } = (0, import_merge.merge)(pluginConfig.router || {}, userConfig);
74
74
  const select = (pathname) => serverBase.find((baseUrl) => pathname.search(baseUrl) === 0) || "/";
75
75
  finalRouteConfig = {
76
76
  routes: (0, import_context.getGlobalRoutes)(),
@@ -146,7 +146,8 @@ const routerPlugin = (userConfig = {}) => {
146
146
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
147
147
  children: [
148
148
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_router.RouterProvider, {
149
- router
149
+ router,
150
+ future
150
151
  }),
151
152
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Null, {}),
152
153
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Null, {})
@@ -48,7 +48,7 @@ var routerPlugin = function() {
48
48
  },
49
49
  wrapRoot: function(App) {
50
50
  var pluginConfig = api.useRuntimeConfigContext();
51
- var _merge = merge(pluginConfig.router || {}, userConfig), _merge_serverBase = _merge.serverBase, serverBase = _merge_serverBase === void 0 ? [] : _merge_serverBase, _merge_supportHtml5History = _merge.supportHtml5History, supportHtml5History = _merge_supportHtml5History === void 0 ? true : _merge_supportHtml5History, _merge_basename = _merge.basename, basename = _merge_basename === void 0 ? "" : _merge_basename, routesConfig = _merge.routesConfig, createRoutes = _merge.createRoutes;
51
+ var _merge = merge(pluginConfig.router || {}, userConfig), _merge_serverBase = _merge.serverBase, serverBase = _merge_serverBase === void 0 ? [] : _merge_serverBase, _merge_supportHtml5History = _merge.supportHtml5History, supportHtml5History = _merge_supportHtml5History === void 0 ? true : _merge_supportHtml5History, _merge_basename = _merge.basename, basename = _merge_basename === void 0 ? "" : _merge_basename, routesConfig = _merge.routesConfig, createRoutes = _merge.createRoutes, future = _merge.future;
52
52
  var select = function(pathname) {
53
53
  return serverBase.find(function(baseUrl) {
54
54
  return pathname.search(baseUrl) === 0;
@@ -131,7 +131,8 @@ var routerPlugin = function() {
131
131
  /* @__PURE__ */ _jsxs(_Fragment, {
132
132
  children: [
133
133
  /* @__PURE__ */ _jsx(RouterProvider, {
134
- router
134
+ router,
135
+ future
135
136
  }),
136
137
  /* @__PURE__ */ _jsx(Null, {}),
137
138
  /* @__PURE__ */ _jsx(Null, {})
@@ -44,7 +44,7 @@ const routerPlugin = (userConfig = {}) => {
44
44
  },
45
45
  wrapRoot: (App) => {
46
46
  const pluginConfig = api.useRuntimeConfigContext();
47
- const { serverBase = [], supportHtml5History = true, basename = "", routesConfig, createRoutes } = merge(pluginConfig.router || {}, userConfig);
47
+ const { serverBase = [], supportHtml5History = true, basename = "", routesConfig, createRoutes, future } = merge(pluginConfig.router || {}, userConfig);
48
48
  const select = (pathname) => serverBase.find((baseUrl) => pathname.search(baseUrl) === 0) || "/";
49
49
  finalRouteConfig = {
50
50
  routes: getGlobalRoutes(),
@@ -120,7 +120,8 @@ const routerPlugin = (userConfig = {}) => {
120
120
  /* @__PURE__ */ _jsxs(_Fragment, {
121
121
  children: [
122
122
  /* @__PURE__ */ _jsx(RouterProvider, {
123
- router
123
+ router,
124
+ future
124
125
  }),
125
126
  /* @__PURE__ */ _jsx(Null, {}),
126
127
  /* @__PURE__ */ _jsx(Null, {})
@@ -1,8 +1,10 @@
1
1
  import type { Plugin } from './core/plugin';
2
+ import type { RouterConfig } from './router';
2
3
  import type { StateConfig } from './state';
3
4
  export declare const isBrowser: () => boolean;
4
5
  export interface AppConfig {
5
6
  state?: StateConfig | boolean;
7
+ router?: Pick<RouterConfig, 'future' | 'basename'>;
6
8
  [key: string]: any;
7
9
  }
8
10
  export interface RuntimeConfig {
@@ -39,6 +39,9 @@ export type RouterConfig = {
39
39
  supportHtml5History?: boolean;
40
40
  basename?: string;
41
41
  createRoutes?: () => RouteObject[];
42
+ future?: Partial<{
43
+ v7_startTransition: boolean;
44
+ }>;
42
45
  };
43
46
  export type Routes = RouterConfig['routesConfig']['routes'];
44
47
  export interface RouteManifest {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.60.5",
18
+ "version": "2.60.6-alpha.0",
19
19
  "engines": {
20
20
  "node": ">=14.17.6"
21
21
  },
@@ -200,9 +200,9 @@
200
200
  "react-side-effect": "^2.1.1",
201
201
  "styled-components": "^5.3.1",
202
202
  "@modern-js/plugin": "2.60.5",
203
+ "@modern-js/types": "2.60.5",
203
204
  "@modern-js/plugin-data-loader": "2.60.5",
204
205
  "@modern-js/runtime-utils": "2.60.5",
205
- "@modern-js/types": "2.60.5",
206
206
  "@modern-js/utils": "2.60.5"
207
207
  },
208
208
  "peerDependencies": {
@@ -226,8 +226,8 @@
226
226
  "ts-jest": "^29.1.0",
227
227
  "typescript": "^5",
228
228
  "webpack": "^5.95.0",
229
- "@modern-js/app-tools": "2.60.5",
230
229
  "@modern-js/core": "2.60.5",
230
+ "@modern-js/app-tools": "2.60.5",
231
231
  "@scripts/build": "2.60.5",
232
232
  "@scripts/jest-config": "2.60.5"
233
233
  },