Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"remark-parse": "^10.0.1",
"remark-stringify": "^10.0.2",
"semver": "^7.5.4",
"typedoc": "^0.26.11",
"typedoc": "^0.28.7",
"typescript": "^5.4.5",
"unified": "^10.1.2",
"unist-util-remove": "^3.1.0",
Expand Down
3 changes: 0 additions & 3 deletions packages/react-router-architect/typedoc.json

This file was deleted.

9 changes: 9 additions & 0 deletions packages/react-router-architect/typedoc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { blockTags } from "../../typedoc.mjs";

/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPoints: ["./index.ts"],
blockTags,
};

export default config;
3 changes: 0 additions & 3 deletions packages/react-router-cloudflare/typedoc.json

This file was deleted.

9 changes: 9 additions & 0 deletions packages/react-router-cloudflare/typedoc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { blockTags } from "../../typedoc.mjs";

/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPoints: ["./index.ts"],
blockTags,
};

export default config;
9 changes: 0 additions & 9 deletions packages/react-router-dev/typedoc.json

This file was deleted.

15 changes: 15 additions & 0 deletions packages/react-router-dev/typedoc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { blockTags } from "../../typedoc.mjs";

/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPoints: [
"./index.ts",
"./config.ts",
"./routes.ts",
"./vite.ts",
"./vite/cloudflare.ts",
],
blockTags,
};

export default config;
3 changes: 0 additions & 3 deletions packages/react-router-express/typedoc.json

This file was deleted.

9 changes: 9 additions & 0 deletions packages/react-router-express/typedoc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { blockTags } from "../../typedoc.mjs";

/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPoints: ["./index.ts"],
blockTags,
};

export default config;
3 changes: 0 additions & 3 deletions packages/react-router-fs-routes/typedoc.json

This file was deleted.

9 changes: 9 additions & 0 deletions packages/react-router-fs-routes/typedoc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { blockTags } from "../../typedoc.mjs";

/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPoints: ["./index.ts"],
blockTags,
};

export default config;
3 changes: 0 additions & 3 deletions packages/react-router-node/typedoc.json

This file was deleted.

9 changes: 9 additions & 0 deletions packages/react-router-node/typedoc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { blockTags } from "../../typedoc.mjs";

/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPoints: ["./index.ts"],
blockTags,
};

export default config;

This file was deleted.

9 changes: 9 additions & 0 deletions packages/react-router-remix-routes-option-adapter/typedoc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { blockTags } from "../../typedoc.mjs";

/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPoints: ["./index.ts"],
blockTags,
};

export default config;
3 changes: 0 additions & 3 deletions packages/react-router-serve/typedoc.json

This file was deleted.

9 changes: 9 additions & 0 deletions packages/react-router-serve/typedoc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { blockTags } from "../../typedoc.mjs";

/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPoints: ["./cli.ts"],
blockTags,
};

export default config;
4 changes: 4 additions & 0 deletions packages/react-router/dom-export.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @module dom
*/

"use client";

export type { RouterProviderProps } from "./lib/dom-export/dom-router-provider";
Expand Down
5 changes: 5 additions & 0 deletions packages/react-router/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* @module index
* @mergeModuleWith react-router
Comment on lines +2 to +3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flatten these APIs up into the main react-router module

*/

"use client";

// Expose old @remix-run/router API
Expand Down
10 changes: 9 additions & 1 deletion packages/react-router/lib/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export interface RouterProviderProps {
* Render the UI for the given {@link DataRouter}. This component should
* typically be at the top of an app's element tree.
*
* @example
* ```tsx
* import { createBrowserRouter } from "react-router";
* import { RouterProvider } from "react-router/dom";
* import { createRoot } from "react-dom/client";
Expand All @@ -275,6 +275,14 @@ export interface RouterProviderProps {
* createRoot(document.getElementById("root")).render(
* <RouterProvider router={router} />
* );
* ```
*
* <docs-info>Please note that this component is exported both from `react-router` and
* `react-router/dom` with the only difference being that the latter automatically
* wires up the `react-dom` `flushSync` implementation. You _almost always_ want
* to use the version from `react-router/dom` unless you're running in a non-DOM
* environment.</docs-info>
*
*
* @public
* @category Data Routers
Expand Down
4 changes: 0 additions & 4 deletions packages/react-router/lib/dom-export/dom-router-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ import * as ReactDOM from "react-dom";
import type { RouterProviderProps as BaseRouterProviderProps } from "react-router";
import { RouterProvider as BaseRouterProvider } from "react-router";

// FIXME: We now have two `RouterProviderProps` type, one in `react-router` and
// one in `react-router/dom`.
export type RouterProviderProps = Omit<BaseRouterProviderProps, "flushSync">;

// FIXME: We now have two `RouterProvider` components, one in `react-router` and
// one in `react-router/dom`.
export function RouterProvider(props: Omit<RouterProviderProps, "flushSync">) {
return <BaseRouterProvider flushSync={ReactDOM.flushSync} {...props} />;
}
10 changes: 2 additions & 8 deletions packages/react-router/lib/dom-export/hydrated-router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,12 @@ function createHydratedRouter({
export interface HydratedRouterProps {
/**
* Context object to be passed through to {@link createBrowserRouter} and made
* available to
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* available to [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* functions
*/
unstable_getContext?: RouterInit["unstable_getContext"];
}

// TODO: Reference `HydratedRouterProps` in the `HydratedRouter` JSDoc
// @param {HydratedRouterProps.unstable_getContext} props.unstable_getContext n/a
/**
* Framework-mode router component to be used to hydrate a router from a
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
Expand All @@ -234,10 +231,7 @@ export interface HydratedRouterProps {
* @category Framework Routers
* @mode framework
* @param props Props
* @param props.unstable_getContext Context object to be passed through to
* {@link createBrowserRouter} and made available to
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* functions
* @param {dom.HydratedRouterProps.unstable_getContext} props.unstable_getContext n/a
* @returns A React element that represents the hydrated application.
*/
export function HydratedRouter(props: HydratedRouterProps) {
Expand Down
12 changes: 0 additions & 12 deletions packages/react-router/typedoc.json

This file was deleted.

18 changes: 18 additions & 0 deletions packages/react-router/typedoc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { blockTags } from "../../typedoc.mjs";

/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
entryPoints: ["./index.ts", "./dom-export.ts"],
categoryOrder: [
"Components",
"Hooks",
"Data Routers",
"Component Routers",
"Utils",
"Types",
"*",
],
blockTags,
};

export default config;
Loading
Loading