@umijs/renderer-react 4.6.67 → 4.6.69

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.
@@ -16,7 +16,7 @@ export declare const AppContext: React.Context<IAppContextType>;
16
16
  export declare function useAppData(): IAppContextType;
17
17
  export declare function useSelectedRoutes(): ISelectedRoutes[];
18
18
  export declare function useRouteProps<T extends Record<string, any> = any>(): T;
19
- declare type ServerLoaderFunc = (...args: any[]) => Promise<any> | any;
19
+ type ServerLoaderFunc = (...args: any[]) => Promise<any> | any;
20
20
  export declare function useServerLoaderData<T extends ServerLoaderFunc = any>(): {
21
21
  data: Awaited<ReturnType<T>> | undefined;
22
22
  };
package/dist/browser.d.ts CHANGED
@@ -3,11 +3,11 @@ import React from 'react';
3
3
  import ReactDOM from 'react-dom/client';
4
4
  import { IRouteComponents, IRoutesById } from './types';
5
5
  export declare function __getRoot(): ReactDOM.Root | null;
6
- export declare function Routes(): any;
6
+ export declare function Routes(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
7
7
  /**
8
8
  * umi 渲染需要的配置,在node端调用的哦
9
9
  */
10
- export declare type RenderClientOpts = {
10
+ export type RenderClientOpts = {
11
11
  /**
12
12
  * 配置 webpack 的 publicPath。
13
13
  * @doc https://umijs.org/docs/api/config#publicpath
package/dist/link.d.ts CHANGED
@@ -1,2 +1,6 @@
1
- import React from 'react';
2
- export declare const LinkWithPrefetch: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { LinkProps } from 'react-router-dom';
3
+ export declare const LinkWithPrefetch: React.ForwardRefExoticComponent<Omit<PropsWithChildren<{
4
+ prefetch?: boolean | 'intent' | 'render' | 'viewport' | 'none';
5
+ prefetchTimeout?: number;
6
+ } & LinkProps & React.RefAttributes<HTMLAnchorElement>>, "ref"> & React.RefAttributes<unknown>>;
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { IhtmlPageOpts, ServerLoader } from '@umijs/server/dist/types';
1
+ import type { IhtmlPageOpts, ServerLoader } from '@umijs/server';
2
2
  import type { RouteMatch, RouteObject } from 'react-router-dom';
3
3
  declare global {
4
4
  interface Window {
@@ -7,10 +7,10 @@ declare global {
7
7
  __UMI_BUILD_ClIENT_CSS__: any;
8
8
  }
9
9
  }
10
- declare type ClientLoaderFunctionArgs = {
10
+ type ClientLoaderFunctionArgs = {
11
11
  serverLoader: ServerLoader;
12
12
  };
13
- export declare type ClientLoader = ((args: ClientLoaderFunctionArgs) => Promise<any>) & {
13
+ export type ClientLoader = ((args: ClientLoaderFunctionArgs) => Promise<any>) & {
14
14
  hydrate?: boolean;
15
15
  };
16
16
  export interface IRouteSSRProps {
@@ -73,7 +73,7 @@ export interface IHtmlProps extends IHtmlHydrateOptions {
73
73
  };
74
74
  manifest?: any;
75
75
  }
76
- export declare type IScript = Partial<{
76
+ export type IScript = Partial<{
77
77
  async: boolean;
78
78
  charset: string;
79
79
  content: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/renderer-react",
3
- "version": "4.6.67",
3
+ "version": "4.6.69",
4
4
  "description": "@umijs/renderer-react",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/renderer-react#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -20,7 +20,8 @@
20
20
  "@loadable/component": "5.15.2",
21
21
  "history": "5.3.0",
22
22
  "react-helmet-async": "1.3.0",
23
- "react-router-dom": "6.3.0"
23
+ "react-router-dom": "6.3.0",
24
+ "@umijs/server": "4.6.69"
24
25
  },
25
26
  "devDependencies": {
26
27
  "react": "18.3.1",