Refine product detail layout and add delivery information section

This commit is contained in:
Salih Hasicic 2026-04-03 14:58:24 +02:00
parent 8140efb951
commit feeebf6f2d
116 changed files with 128079 additions and 3 deletions

51
node_modules/.package-lock.json generated vendored
View File

@ -3,11 +3,62 @@
"lockfileVersion": 3,
"requires": true,
"packages": {
"node_modules/cookie": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
"integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/gsap": {
"version": "3.14.2",
"resolved": "https://registry.npmjs.org/gsap/-/gsap-3.14.2.tgz",
"integrity": "sha512-P8/mMxVLU7o4+55+1TCnQrPmgjPKnwkzkXOK1asnR9Jg2lna4tEY5qBJjMmAaOBDDZWtlRjBXjLa0w53G/uBLA==",
"license": "Standard 'no charge' license: https://gsap.com/standard-license."
},
"node_modules/react": {
"version": "19.2.4",
"resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz",
"integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/react-router": {
"version": "7.14.0",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.14.0.tgz",
"integrity": "sha512-m/xR9N4LQLmAS0ZhkY2nkPA1N7gQ5TUVa5n8TgANuDTARbn1gt+zLPXEm7W0XDTbrQ2AJSJKhoa6yx1D8BcpxQ==",
"license": "MIT",
"dependencies": {
"cookie": "^1.0.1",
"set-cookie-parser": "^2.6.0"
},
"engines": {
"node": ">=20.0.0"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
},
"peerDependenciesMeta": {
"react-dom": {
"optional": true
}
}
},
"node_modules/set-cookie-parser": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz",
"integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==",
"license": "MIT"
}
}
}

24
node_modules/cookie/LICENSE generated vendored Normal file
View File

@ -0,0 +1,24 @@
(The MIT License)
Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

295
node_modules/cookie/README.md generated vendored Normal file
View File

@ -0,0 +1,295 @@
# cookie
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Build Status][ci-image]][ci-url]
[![Coverage Status][coverage-image]][coverage-url]
Basic HTTP cookie parser and serializer for HTTP servers.
## Installation
```sh
$ npm install cookie
```
## API
```js
const cookie = require("cookie");
// import * as cookie from 'cookie';
```
### cookie.parseCookie(str, options)
Parse an HTTP `Cookie` header string and return an [object](#cookie-object) of all cookie name-value pairs.
The `str` argument is the string representing a `Cookie` header value and `options` is an
optional object containing additional parsing options.
```js
const cookieObject = cookie.parseCookie("foo=bar; equation=E%3Dmc%5E2");
// { foo: 'bar', equation: 'E=mc^2' }
```
#### Options
- `decode` Specifies the function to decode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1). Defaults to [`decodeURIComponent`](#encode-and-decode).
### cookie.stringifyCookie(cookieObj, options)
Stringifies a [cookie object](#cookie-object) into an HTTP `Cookie` header.
```js
const cookieHeader = cookie.stringify({ a: "foo", b: "bar" });
// a=foo; b=bar
```
#### Options
- `encode` Specifies the function to encode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1). Defaults to [`encodeURIComponent`](#encode-and-decode).
### cookie.parseSetCookie(str, options)
Parse an HTTP `Set-Cookie` header string and return an [object](#set-cookie-object) of the options.
```js
const setCookieObject = cookie.parseSetCookie("foo=bar; httpOnly");
// { name: "foo", value: "bar", httpOnly: true }
```
**Note:** Cookie follows the specification and ignores invalid attributes, but does not attempt to normalize or modify any attributes as a browser might. For example:
```js
cookie.parseSetCookie(
"session=abc; max-age=1.5; expires=invalid; custom=value; domain=example.com",
);
// { name: "session", value: "abc", domain: "example.com" }
```
#### Options
- `decode` Specifies the function to decode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1). Defaults to [`decodeURIComponent`](#encode-and-decode).
### cookie.stringifySetCookie(setCookieObj, options)
Stringifies a [`Set-Cookie` object](#set-cookie-object) into a `Set-Cookie` header string.
```js
const setCookieHeader = cookie.stringifySetCookie({
name: "foo",
value: "bar",
});
// foo=bar
```
#### Options
- `encode` Specifies the function to encode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1). Defaults to [`encodeURIComponent`](#encode-and-decode).
## Cookie object
The cookie object represents all cookie name-value pairs in a `Cookie` header, where `{ name: "value" }` is used for `name=value`.
## `Set-Cookie` object
The `Set-Cookie` object represents all the options in a `Set-Cookie` header.
### name
The name of the cookie.
### value
The value of a cookie after it has been [decoded](#encode-and-decode).
### maxAge
Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.2).
The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and
`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
so if both are set, they should point to the same date and time.
### expires
Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.1).
When no expiration is set, clients consider this a "non-persistent cookie" and delete it when the current session is over.
The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and
`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
so if both are set, they should point to the same date and time.
### domain
Specifies the value for the [`Domain` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.3).
When no domain is set, clients consider the cookie to apply to the current domain only.
### path
Specifies the value for the [`Path` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.4).
When no path is set, the path is considered the ["default path"](https://tools.ietf.org/html/rfc6265#section-5.1.4).
### httpOnly
Enables the [`HttpOnly` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.6).
When enabled, clients will not allow client-side JavaScript to see the cookie in `document.cookie`.
### secure
Enables the [`Secure` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.5).
When enabled, clients will only send the cookie back if the browser has an HTTPS connection.
### partitioned
Enables the [`Partitioned` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-cutler-httpbis-partitioned-cookies/).
When enabled, clients will only send the cookie back when the current domain _and_ top-level domain matches.
This is an attribute that has not yet been fully standardized, and may change in the future.
This also means clients may ignore this attribute until they understand it. More information
about can be found in [the proposal](https://github.com/privacycg/CHIPS).
### priority
Specifies the value for the [`Priority` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).
- `'low'` will set the `Priority` attribute to `Low`.
- `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
- `'high'` will set the `Priority` attribute to `High`.
More information about priority levels can be found in [the specification](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).
### sameSite
Specifies the value for the [`SameSite` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).
- `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
- `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.
- `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie.
- `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
More information about enforcement levels can be found in [the specification](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).
## Encode and decode
Cookie accepts `encode` or `decode` options for processing a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).
Since the value of a cookie has a limited character set (and must be a simple string), these functions are used to transform values into strings suitable for a cookies value.
The default `encode` function is the global `encodeURIComponent`.
The default `decode` function is the global `decodeURIComponent`, wrapped in a `try..catch`. If an error
is thrown it will return the cookie's original value. If you provide your own encode/decode
scheme you must ensure errors are appropriately handled.
## Example
The following example uses this module in conjunction with the Node.js core HTTP server
to prompt a user for their name and display it back on future visits.
```js
var cookie = require("cookie");
var escapeHtml = require("escape-html");
var http = require("http");
var url = require("url");
function onRequest(req, res) {
// Parse the query string
var query = url.parse(req.url, true, true).query;
if (query && query.name) {
// Set a new cookie with the name
res.setHeader(
"Set-Cookie",
cookie.stringifySetCookie({
name: "name",
value: String(query.name),
httpOnly: true,
maxAge: 60 * 60 * 24 * 7, // 1 week
}),
);
// Redirect back after setting cookie
res.statusCode = 302;
res.setHeader("Location", req.headers.referer || "/");
res.end();
return;
}
// Parse the cookies on the request
var cookies = cookie.parseCookie(req.headers.cookie || "");
// Get the visitor name set in the cookie
var name = cookies.name;
res.setHeader("Content-Type", "text/html; charset=UTF-8");
if (name) {
res.write("<p>Welcome back, <b>" + escapeHtml(name) + "</b>!</p>");
} else {
res.write("<p>Hello, new visitor!</p>");
}
res.write('<form method="GET">');
res.write(
'<input placeholder="enter your name" name="name"> <input type="submit" value="Set Name">',
);
res.end("</form>");
}
http.createServer(onRequest).listen(3000);
```
## Testing
```sh
npm test
```
## Benchmark
```sh
npm run bench
```
```
name hz min max mean p75 p99 p995 p999 rme samples
· simple 8,566,313.09 0.0000 0.3694 0.0001 0.0001 0.0002 0.0002 0.0003 ±0.64% 4283157 fastest
· decode 3,834,348.85 0.0001 0.2465 0.0003 0.0003 0.0003 0.0004 0.0006 ±0.38% 1917175
· unquote 8,315,355.96 0.0000 0.3824 0.0001 0.0001 0.0002 0.0002 0.0003 ±0.72% 4157880
· duplicates 1,944,765.97 0.0004 0.2959 0.0005 0.0005 0.0006 0.0006 0.0008 ±0.24% 972384
· 10 cookies 675,345.67 0.0012 0.4328 0.0015 0.0015 0.0019 0.0020 0.0058 ±0.75% 337673
· 100 cookies 61,040.71 0.0152 0.4092 0.0164 0.0160 0.0196 0.0228 0.2260 ±0.71% 30521 slowest
✓ parse top-sites (15) 22945ms
name hz min max mean p75 p99 p995 p999 rme samples
· parse accounts.google.com 7,164,349.17 0.0000 0.0929 0.0001 0.0002 0.0002 0.0002 0.0003 ±0.09% 3582184
· parse apple.com 7,817,686.84 0.0000 0.6048 0.0001 0.0001 0.0002 0.0002 0.0003 ±1.05% 3908844
· parse cloudflare.com 7,189,841.70 0.0000 0.0390 0.0001 0.0002 0.0002 0.0002 0.0003 ±0.06% 3594921
· parse docs.google.com 7,051,765.61 0.0000 0.0296 0.0001 0.0002 0.0002 0.0002 0.0003 ±0.06% 3525883
· parse drive.google.com 7,349,104.77 0.0000 0.0368 0.0001 0.0001 0.0002 0.0002 0.0003 ±0.05% 3674553
· parse en.wikipedia.org 1,929,909.49 0.0004 0.3598 0.0005 0.0005 0.0007 0.0007 0.0012 ±0.16% 964955
· parse linkedin.com 2,225,658.01 0.0003 0.0595 0.0004 0.0005 0.0005 0.0005 0.0006 ±0.06% 1112830
· parse maps.google.com 4,423,511.68 0.0001 0.0942 0.0002 0.0003 0.0003 0.0003 0.0005 ±0.08% 2211756
· parse microsoft.com 3,387,601.88 0.0002 0.0725 0.0003 0.0003 0.0004 0.0004 0.0005 ±0.09% 1693801
· parse play.google.com 7,375,980.86 0.0000 0.1994 0.0001 0.0001 0.0002 0.0002 0.0003 ±0.12% 3687991
· parse support.google.com 4,912,267.94 0.0001 2.8958 0.0002 0.0002 0.0003 0.0003 0.0005 ±1.28% 2456134
· parse www.google.com 3,443,035.87 0.0002 0.2783 0.0003 0.0003 0.0004 0.0004 0.0007 ±0.51% 1721518
· parse youtu.be 1,910,492.87 0.0004 0.3490 0.0005 0.0005 0.0007 0.0007 0.0011 ±0.46% 955247
· parse youtube.com 1,895,082.62 0.0004 0.7454 0.0005 0.0005 0.0006 0.0007 0.0013 ±0.64% 947542 slowest
· parse example.com 21,582,835.27 0.0000 0.1095 0.0000 0.0000 0.0001 0.0001 0.0001 ±0.13% 10791418
```
## References
- [RFC 6265: HTTP State Management Mechanism](https://tools.ietf.org/html/rfc6265)
- [Same-site Cookies](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7)
## License
[MIT](LICENSE)
[ci-image]: https://img.shields.io/github/actions/workflow/status/jshttp/cookie/ci.yml
[ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml?query=branch%3Amaster
[coverage-image]: https://img.shields.io/codecov/c/github/jshttp/cookie/master
[coverage-url]: https://app.codecov.io/gh/jshttp/cookie
[npm-downloads-image]: https://img.shields.io/npm/dm/cookie
[npm-url]: https://npmjs.org/package/cookie
[npm-version-image]: https://img.shields.io/npm/v/cookie

148
node_modules/cookie/dist/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,148 @@
/**
* Parse options.
*/
export interface ParseOptions {
/**
* Specifies a function that will be used to decode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).
* Since the value of a cookie has a limited character set (and must be a simple string), this function can be used to decode
* a previously-encoded cookie value into a JavaScript string.
*
* The default function is the global `decodeURIComponent`, wrapped in a `try..catch`. If an error
* is thrown it will return the cookie's original value. If you provide your own encode/decode
* scheme you must ensure errors are appropriately handled.
*
* @default decode
*/
decode?: (str: string) => string | undefined;
}
/**
* Cookies object.
*/
export type Cookies = Record<string, string | undefined>;
/**
* Parse a `Cookie` header.
*
* Parse the given cookie header string into an object
* The object has the various cookies as keys(names) => values
*/
export declare function parseCookie(str: string, options?: ParseOptions): Cookies;
export interface StringifyOptions {
/**
* Specifies a function that will be used to encode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).
* Since value of a cookie has a limited character set (and must be a simple string), this function can be used to encode
* a value into a string suited for a cookie's value, and should mirror `decode` when parsing.
*
* @default encodeURIComponent
*/
encode?: (str: string) => string;
}
/**
* Stringifies an object into an HTTP `Cookie` header.
*/
export declare function stringifyCookie(cookie: Cookies, options?: StringifyOptions): string;
/**
* Set-Cookie object.
*/
export interface SetCookie {
/**
* Specifies the name of the cookie.
*/
name: string;
/**
* Specifies the string to be the value for the cookie.
*/
value: string | undefined;
/**
* Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.2).
*
* The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and
* `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
* so if both are set, they should point to the same date and time.
*/
maxAge?: number;
/**
* Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.1).
* When no expiration is set, clients consider this a "non-persistent cookie" and delete it when the current session is over.
*
* The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and
* `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
* so if both are set, they should point to the same date and time.
*/
expires?: Date;
/**
* Specifies the value for the [`Domain` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.3).
* When no domain is set, clients consider the cookie to apply to the current domain only.
*/
domain?: string;
/**
* Specifies the value for the [`Path` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.4).
* When no path is set, the path is considered the ["default path"](https://tools.ietf.org/html/rfc6265#section-5.1.4).
*/
path?: string;
/**
* Enables the [`HttpOnly` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.6).
* When enabled, clients will not allow client-side JavaScript to see the cookie in `document.cookie`.
*/
httpOnly?: boolean;
/**
* Enables the [`Secure` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.5).
* When enabled, clients will only send the cookie back if the browser has an HTTPS connection.
*/
secure?: boolean;
/**
* Enables the [`Partitioned` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-cutler-httpbis-partitioned-cookies/).
* When enabled, clients will only send the cookie back when the current domain _and_ top-level domain matches.
*
* This is an attribute that has not yet been fully standardized, and may change in the future.
* This also means clients may ignore this attribute until they understand it. More information
* about can be found in [the proposal](https://github.com/privacycg/CHIPS).
*/
partitioned?: boolean;
/**
* Specifies the value for the [`Priority` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).
*
* - `'low'` will set the `Priority` attribute to `Low`.
* - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
* - `'high'` will set the `Priority` attribute to `High`.
*
* More information about priority levels can be found in [the specification](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).
*/
priority?: "low" | "medium" | "high";
/**
* Specifies the value for the [`SameSite` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).
*
* - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
* - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.
* - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie.
* - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
*
* More information about enforcement levels can be found in [the specification](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).
*/
sameSite?: boolean | "lax" | "strict" | "none";
}
/**
* Backward compatibility serialize options.
*/
export type SerializeOptions = StringifyOptions & Omit<SetCookie, "name" | "value">;
/**
* Serialize data into a cookie header.
*
* Serialize a name value pair into a cookie string suitable for
* http headers. An optional options object specifies cookie parameters.
*
* serialize('foo', 'bar', { httpOnly: true })
* => "foo=bar; httpOnly"
*/
export declare function stringifySetCookie(cookie: SetCookie, options?: StringifyOptions): string;
export declare function stringifySetCookie(name: string, val: string, options?: SerializeOptions): string;
/**
* Deserialize a `Set-Cookie` header into an object.
*
* deserialize('foo=bar; httpOnly')
* => { name: 'foo', value: 'bar', httpOnly: true }
*/
export declare function parseSetCookie(str: string, options?: ParseOptions): SetCookie;
/**
* Backward compatibility exports.
*/
export { stringifySetCookie as serialize, parseCookie as parse };

350
node_modules/cookie/dist/index.js generated vendored Normal file
View File

@ -0,0 +1,350 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseCookie = parseCookie;
exports.parse = parseCookie;
exports.stringifyCookie = stringifyCookie;
exports.stringifySetCookie = stringifySetCookie;
exports.serialize = stringifySetCookie;
exports.parseSetCookie = parseSetCookie;
exports.stringifySetCookie = stringifySetCookie;
exports.serialize = stringifySetCookie;
/**
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
* This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
* which has been replaced by the token definition in RFC 7230 appendix B.
*
* cookie-name = token
* token = 1*tchar
* tchar = "!" / "#" / "$" / "%" / "&" / "'" /
* "*" / "+" / "-" / "." / "^" / "_" /
* "`" / "|" / "~" / DIGIT / ALPHA
*
* Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191
* Allow same range as cookie value, except `=`, which delimits end of name.
*/
const cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
/**
* RegExp to match cookie-value in RFC 6265 sec 4.1.1
*
* cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
* cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
* ; US-ASCII characters excluding CTLs,
* ; whitespace DQUOTE, comma, semicolon,
* ; and backslash
*
* Allowing more characters: https://github.com/jshttp/cookie/issues/191
* Comma, backslash, and DQUOTE are not part of the parsing algorithm.
*/
const cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
/**
* RegExp to match domain-value in RFC 6265 sec 4.1.1
*
* domain-value = <subdomain>
* ; defined in [RFC1034], Section 3.5, as
* ; enhanced by [RFC1123], Section 2.1
* <subdomain> = <label> | <subdomain> "." <label>
* <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]
* Labels must be 63 characters or less.
* 'let-dig' not 'letter' in the first char, per RFC1123
* <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>
* <let-dig-hyp> = <let-dig> | "-"
* <let-dig> = <letter> | <digit>
* <letter> = any one of the 52 alphabetic characters A through Z in
* upper case and a through z in lower case
* <digit> = any one of the ten digits 0 through 9
*
* Keep support for leading dot: https://github.com/jshttp/cookie/issues/173
*
* > (Note that a leading %x2E ("."), if present, is ignored even though that
* character is not permitted, but a trailing %x2E ("."), if present, will
* cause the user agent to ignore the attribute.)
*/
const domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
/**
* RegExp to match path-value in RFC 6265 sec 4.1.1
*
* path-value = <any CHAR except CTLs or ";">
* CHAR = %x01-7F
* ; defined in RFC 5234 appendix B.1
*/
const pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
/**
* RegExp to match max-age-value in RFC 6265 sec 5.6.2
*/
const maxAgeRegExp = /^-?\d+$/;
const __toString = Object.prototype.toString;
const NullObject = /* @__PURE__ */ (() => {
const C = function () { };
C.prototype = Object.create(null);
return C;
})();
/**
* Parse a `Cookie` header.
*
* Parse the given cookie header string into an object
* The object has the various cookies as keys(names) => values
*/
function parseCookie(str, options) {
const obj = new NullObject();
const len = str.length;
// RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
if (len < 2)
return obj;
const dec = options?.decode || decode;
let index = 0;
do {
const eqIdx = eqIndex(str, index, len);
if (eqIdx === -1)
break; // No more cookie pairs.
const endIdx = endIndex(str, index, len);
if (eqIdx > endIdx) {
// backtrack on prior semicolon
index = str.lastIndexOf(";", eqIdx - 1) + 1;
continue;
}
const key = valueSlice(str, index, eqIdx);
// only assign once
if (obj[key] === undefined) {
obj[key] = dec(valueSlice(str, eqIdx + 1, endIdx));
}
index = endIdx + 1;
} while (index < len);
return obj;
}
/**
* Stringifies an object into an HTTP `Cookie` header.
*/
function stringifyCookie(cookie, options) {
const enc = options?.encode || encodeURIComponent;
const cookieStrings = [];
for (const name of Object.keys(cookie)) {
const val = cookie[name];
if (val === undefined)
continue;
if (!cookieNameRegExp.test(name)) {
throw new TypeError(`cookie name is invalid: ${name}`);
}
const value = enc(val);
if (!cookieValueRegExp.test(value)) {
throw new TypeError(`cookie val is invalid: ${val}`);
}
cookieStrings.push(`${name}=${value}`);
}
return cookieStrings.join("; ");
}
function stringifySetCookie(_name, _val, _opts) {
const cookie = typeof _name === "object"
? _name
: { ..._opts, name: _name, value: String(_val) };
const options = typeof _val === "object" ? _val : _opts;
const enc = options?.encode || encodeURIComponent;
if (!cookieNameRegExp.test(cookie.name)) {
throw new TypeError(`argument name is invalid: ${cookie.name}`);
}
const value = cookie.value ? enc(cookie.value) : "";
if (!cookieValueRegExp.test(value)) {
throw new TypeError(`argument val is invalid: ${cookie.value}`);
}
let str = cookie.name + "=" + value;
if (cookie.maxAge !== undefined) {
if (!Number.isInteger(cookie.maxAge)) {
throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);
}
str += "; Max-Age=" + cookie.maxAge;
}
if (cookie.domain) {
if (!domainValueRegExp.test(cookie.domain)) {
throw new TypeError(`option domain is invalid: ${cookie.domain}`);
}
str += "; Domain=" + cookie.domain;
}
if (cookie.path) {
if (!pathValueRegExp.test(cookie.path)) {
throw new TypeError(`option path is invalid: ${cookie.path}`);
}
str += "; Path=" + cookie.path;
}
if (cookie.expires) {
if (!isDate(cookie.expires) || !Number.isFinite(cookie.expires.valueOf())) {
throw new TypeError(`option expires is invalid: ${cookie.expires}`);
}
str += "; Expires=" + cookie.expires.toUTCString();
}
if (cookie.httpOnly) {
str += "; HttpOnly";
}
if (cookie.secure) {
str += "; Secure";
}
if (cookie.partitioned) {
str += "; Partitioned";
}
if (cookie.priority) {
const priority = typeof cookie.priority === "string"
? cookie.priority.toLowerCase()
: undefined;
switch (priority) {
case "low":
str += "; Priority=Low";
break;
case "medium":
str += "; Priority=Medium";
break;
case "high":
str += "; Priority=High";
break;
default:
throw new TypeError(`option priority is invalid: ${cookie.priority}`);
}
}
if (cookie.sameSite) {
const sameSite = typeof cookie.sameSite === "string"
? cookie.sameSite.toLowerCase()
: cookie.sameSite;
switch (sameSite) {
case true:
case "strict":
str += "; SameSite=Strict";
break;
case "lax":
str += "; SameSite=Lax";
break;
case "none":
str += "; SameSite=None";
break;
default:
throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);
}
}
return str;
}
/**
* Deserialize a `Set-Cookie` header into an object.
*
* deserialize('foo=bar; httpOnly')
* => { name: 'foo', value: 'bar', httpOnly: true }
*/
function parseSetCookie(str, options) {
const dec = options?.decode || decode;
const len = str.length;
const endIdx = endIndex(str, 0, len);
const eqIdx = eqIndex(str, 0, endIdx);
const setCookie = eqIdx === -1
? { name: "", value: dec(valueSlice(str, 0, endIdx)) }
: {
name: valueSlice(str, 0, eqIdx),
value: dec(valueSlice(str, eqIdx + 1, endIdx)),
};
let index = endIdx + 1;
while (index < len) {
const endIdx = endIndex(str, index, len);
const eqIdx = eqIndex(str, index, endIdx);
const attr = eqIdx === -1
? valueSlice(str, index, endIdx)
: valueSlice(str, index, eqIdx);
const val = eqIdx === -1 ? undefined : valueSlice(str, eqIdx + 1, endIdx);
switch (attr.toLowerCase()) {
case "httponly":
setCookie.httpOnly = true;
break;
case "secure":
setCookie.secure = true;
break;
case "partitioned":
setCookie.partitioned = true;
break;
case "domain":
setCookie.domain = val;
break;
case "path":
setCookie.path = val;
break;
case "max-age":
if (val && maxAgeRegExp.test(val))
setCookie.maxAge = Number(val);
break;
case "expires":
if (!val)
break;
const date = new Date(val);
if (Number.isFinite(date.valueOf()))
setCookie.expires = date;
break;
case "priority":
if (!val)
break;
const priority = val.toLowerCase();
if (priority === "low" ||
priority === "medium" ||
priority === "high") {
setCookie.priority = priority;
}
break;
case "samesite":
if (!val)
break;
const sameSite = val.toLowerCase();
if (sameSite === "lax" ||
sameSite === "strict" ||
sameSite === "none") {
setCookie.sameSite = sameSite;
}
break;
}
index = endIdx + 1;
}
return setCookie;
}
/**
* Find the `;` character between `min` and `len` in str.
*/
function endIndex(str, min, len) {
const index = str.indexOf(";", min);
return index === -1 ? len : index;
}
/**
* Find the `=` character between `min` and `max` in str.
*/
function eqIndex(str, min, max) {
const index = str.indexOf("=", min);
return index < max ? index : -1;
}
/**
* Slice out a value between startPod to max.
*/
function valueSlice(str, min, max) {
let start = min;
let end = max;
do {
const code = str.charCodeAt(start);
if (code !== 0x20 /* */ && code !== 0x09 /* \t */)
break;
} while (++start < end);
while (end > start) {
const code = str.charCodeAt(end - 1);
if (code !== 0x20 /* */ && code !== 0x09 /* \t */)
break;
end--;
}
return str.slice(start, end);
}
/**
* URL-decode string value. Optimized to skip native call when no %.
*/
function decode(str) {
if (str.indexOf("%") === -1)
return str;
try {
return decodeURIComponent(str);
}
catch (e) {
return str;
}
}
/**
* Determine if value is a Date.
*/
function isDate(val) {
return __toString.call(val) === "[object Date]";
}
//# sourceMappingURL=index.js.map

1
node_modules/cookie/dist/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

47
node_modules/cookie/package.json generated vendored Normal file
View File

@ -0,0 +1,47 @@
{
"name": "cookie",
"version": "1.1.1",
"description": "HTTP server cookie parsing and serialization",
"keywords": [
"cookie",
"cookies"
],
"repository": "jshttp/cookie",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
},
"license": "MIT",
"author": "Roman Shtylman <shtylman@gmail.com>",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>"
],
"sideEffects": false,
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist/"
],
"scripts": {
"bench": "vitest bench",
"build": "ts-scripts build",
"format": "ts-scripts format",
"prepare": "ts-scripts install",
"prepublishOnly": "npm run build",
"specs": "ts-scripts specs",
"test": "ts-scripts test"
},
"devDependencies": {
"@borderless/ts-scripts": "^0.15.0",
"@vitest/coverage-v8": "^3.2.4",
"top-sites": "1.1.194",
"typescript": "^5.6.2",
"vitest": "^3.2.4"
},
"engines": {
"node": ">=18"
},
"ts-scripts": {
"project": "tsconfig.build.json"
}
}

2555
node_modules/react-router/CHANGELOG.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

23
node_modules/react-router/LICENSE.md generated vendored Normal file
View File

@ -0,0 +1,23 @@
MIT License
Copyright (c) React Training LLC 2015-2019
Copyright (c) Remix Software Inc. 2020-2021
Copyright (c) Shopify Inc. 2022-2023
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

7
node_modules/react-router/README.md generated vendored Normal file
View File

@ -0,0 +1,7 @@
`react-router` is the primary package in the React Router project.
## Installation
```sh
npm i react-router
```

View File

@ -0,0 +1,318 @@
import * as React from 'react';
import { R as RouterInit } from './instrumentation-BYr6ff5D.js';
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './routeModules-CA7kSxJJ.js';
declare function getRequest(): Request;
type RSCRouteConfigEntryBase = {
action?: ActionFunction;
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
ErrorBoundary?: React.ComponentType<any>;
handle?: any;
headers?: HeadersFunction;
HydrateFallback?: React.ComponentType<any>;
Layout?: React.ComponentType<any>;
links?: LinksFunction;
loader?: LoaderFunction;
meta?: MetaFunction;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteConfigEntry = RSCRouteConfigEntryBase & {
id: string;
path?: string;
Component?: React.ComponentType<any>;
lazy?: () => Promise<RSCRouteConfigEntryBase & ({
default?: React.ComponentType<any>;
Component?: never;
} | {
default?: never;
Component?: React.ComponentType<any>;
})>;
} & ({
index: true;
} | {
children?: RSCRouteConfigEntry[];
});
type RSCRouteConfig = Array<RSCRouteConfigEntry>;
type RSCRouteManifest = {
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
element?: React.ReactElement | false;
errorElement?: React.ReactElement;
handle?: any;
hasAction: boolean;
hasComponent: boolean;
hasErrorBoundary: boolean;
hasLoader: boolean;
hydrateFallbackElement?: React.ReactElement;
id: string;
index?: boolean;
links?: LinksFunction;
meta?: MetaFunction;
parentId?: string;
path?: string;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteMatch = RSCRouteManifest & {
params: Params;
pathname: string;
pathnameBase: string;
};
type RSCRenderPayload = {
type: "render";
actionData: Record<string, any> | null;
basename: string | undefined;
errors: Record<string, any> | null;
loaderData: Record<string, any>;
location: Location;
routeDiscovery: RouteDiscovery;
matches: RSCRouteMatch[];
patches?: Promise<RSCRouteManifest[]>;
nonce?: string;
formState?: unknown;
};
type RSCManifestPayload = {
type: "manifest";
patches: Promise<RSCRouteManifest[]>;
};
type RSCActionPayload = {
type: "action";
actionResult: Promise<unknown>;
rerender?: Promise<RSCRenderPayload | RSCRedirectPayload>;
};
type RSCRedirectPayload = {
type: "redirect";
status: number;
location: string;
replace: boolean;
reload: boolean;
actionResult?: Promise<unknown>;
};
type RSCPayload = RSCRenderPayload | RSCManifestPayload | RSCActionPayload | RSCRedirectPayload;
type RSCMatch = {
statusCode: number;
headers: Headers;
payload: RSCPayload;
};
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
type DecodeReplyFunction = (reply: FormData | string, options: {
temporaryReferences: unknown;
}) => Promise<unknown[]>;
type LoadServerActionFunction = (id: string) => Promise<Function>;
type RouteDiscovery = {
mode: "lazy";
manifestPath?: string | undefined;
} | {
mode: "initial";
};
/**
* Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* and returns an [RSC](https://react.dev/reference/rsc/server-components)
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
* enabled client router.
*
* @example
* import {
* createTemporaryReferenceSet,
* decodeAction,
* decodeReply,
* loadServerAction,
* renderToReadableStream,
* } from "@vitejs/plugin-rsc/rsc";
* import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
*
* matchRSCServerRequest({
* createTemporaryReferenceSet,
* decodeAction,
* decodeFormState,
* decodeReply,
* loadServerAction,
* request,
* routes: routes(),
* generateResponse(match) {
* return new Response(
* renderToReadableStream(match.payload),
* {
* status: match.statusCode,
* headers: match.headers,
* }
* );
* },
* });
*
* @name unstable_matchRSCServerRequest
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.allowedActionOrigins Origin patterns that are allowed to execute actions.
* @param opts.basename The basename to use when matching the request.
* @param opts.createTemporaryReferenceSet A function that returns a temporary
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
* stream.
* @param opts.decodeAction Your `react-server-dom-xyz/server`'s `decodeAction`
* function, responsible for loading a server action.
* @param opts.decodeFormState A function responsible for decoding form state for
* progressively enhanceable forms with React's [`useActionState`](https://react.dev/reference/react/useActionState)
* using your `react-server-dom-xyz/server`'s `decodeFormState`.
* @param opts.decodeReply Your `react-server-dom-xyz/server`'s `decodeReply`
* function, used to decode the server function's arguments and bind them to the
* implementation for invocation by the router.
* @param opts.generateResponse A function responsible for using your
* `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding the {@link unstable_RSCPayload}.
* @param opts.loadServerAction Your `react-server-dom-xyz/server`'s
* `loadServerAction` function, used to load a server action by ID.
* @param opts.onError An optional error handler that will be called with any
* errors that occur during the request processing.
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* to match against.
* @param opts.requestContext An instance of {@link RouterContextProvider}
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* @param opts.routeDiscovery The route discovery configuration, used to determine how the router should discover new routes during navigations.
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
* data for hydration.
*/
declare function matchRSCServerRequest({ allowedActionOrigins, createTemporaryReferenceSet, basename, decodeReply, requestContext, routeDiscovery, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
allowedActionOrigins?: string[];
createTemporaryReferenceSet: () => unknown;
basename?: string;
decodeReply?: DecodeReplyFunction;
decodeAction?: DecodeActionFunction;
decodeFormState?: DecodeFormStateFunction;
requestContext?: RouterContextProvider;
loadServerAction?: LoadServerActionFunction;
onError?: (error: unknown) => void;
request: Request;
routes: RSCRouteConfigEntry[];
routeDiscovery?: RouteDiscovery;
generateResponse: (match: RSCMatch, { onError, temporaryReferences, }: {
onError(error: unknown): string | undefined;
temporaryReferences: unknown;
}) => Response;
}): Promise<Response>;
type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
temporaryReferences: unknown;
}) => Promise<unknown>;
type EncodeReplyFunction = (args: unknown[], options: {
temporaryReferences: unknown;
}) => Promise<BodyInit>;
/**
* Create a React `callServer` implementation for React Router.
*
* @example
* import {
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* setServerCallback,
* } from "@vitejs/plugin-rsc/browser";
* import { unstable_createCallServer as createCallServer } from "react-router";
*
* setServerCallback(
* createCallServer({
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* })
* );
*
* @name unstable_createCallServer
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.createFromReadableStream Your `react-server-dom-xyz/client`'s
* `createFromReadableStream`. Used to decode payloads from the server.
* @param opts.createTemporaryReferenceSet A function that creates a temporary
* reference set for the [RSC](https://react.dev/reference/rsc/server-components)
* payload.
* @param opts.encodeReply Your `react-server-dom-xyz/client`'s `encodeReply`.
* Used when sending payloads to the server.
* @param opts.fetch Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
* implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
* @returns A function that can be used to call server actions.
*/
declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
createTemporaryReferenceSet: () => unknown;
encodeReply: EncodeReplyFunction;
fetch?: (request: Request) => Promise<Response>;
}): (id: string, args: unknown[]) => Promise<unknown>;
/**
* Props for the {@link unstable_RSCHydratedRouter} component.
*
* @name unstable_RSCHydratedRouterProps
* @category Types
*/
interface RSCHydratedRouterProps {
/**
* Your `react-server-dom-xyz/client`'s `createFromReadableStream` function,
* used to decode payloads from the server.
*/
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
/**
* Optional fetch implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
*/
fetch?: (request: Request) => Promise<Response>;
/**
* The decoded {@link unstable_RSCPayload} to hydrate.
*/
payload: RSCPayload;
/**
* A function that returns an {@link RouterContextProvider} instance
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* This function is called to generate a fresh `context` instance on each
* navigation or fetcher call.
*/
getContext?: RouterInit["getContext"];
}
/**
* Hydrates a server rendered {@link unstable_RSCPayload} in the browser.
*
* @example
* import { startTransition, StrictMode } from "react";
* import { hydrateRoot } from "react-dom/client";
* import {
* unstable_getRSCStream as getRSCStream,
* unstable_RSCHydratedRouter as RSCHydratedRouter,
* } from "react-router";
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
*
* createFromReadableStream(getRSCStream()).then((payload) =>
* startTransition(async () => {
* hydrateRoot(
* document,
* <StrictMode>
* <RSCHydratedRouter
* createFromReadableStream={createFromReadableStream}
* payload={payload}
* />
* </StrictMode>,
* { formState: await getFormState(payload) },
* );
* }),
* );
*
* @name unstable_RSCHydratedRouter
* @public
* @category RSC
* @mode data
* @param props Props
* @param {unstable_RSCHydratedRouterProps.createFromReadableStream} props.createFromReadableStream n/a
* @param {unstable_RSCHydratedRouterProps.fetch} props.fetch n/a
* @param {unstable_RSCHydratedRouterProps.getContext} props.getContext n/a
* @param {unstable_RSCHydratedRouterProps.payload} props.payload n/a
* @returns A hydrated {@link DataRouter} that can be used to navigate and
* render routes.
*/
declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, getContext, }: RSCHydratedRouterProps): React.JSX.Element;
export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, RSCHydratedRouter as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, createCallServer as c, type RSCManifestPayload as d, type RSCPayload as e, type RSCRenderPayload as f, getRequest as g, type RSCHydratedRouterProps as h, type RSCMatch as i, type RSCRouteManifest as j, type RSCRouteMatch as k, type RSCRouteConfigEntry as l, matchRSCServerRequest as m, type RSCRouteConfig as n };

View File

@ -0,0 +1,318 @@
import * as React from 'react';
import { R as RouterInit } from './context-phCt_zmH.mjs';
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './routeModules-BRrCYrSL.mjs';
declare function getRequest(): Request;
type RSCRouteConfigEntryBase = {
action?: ActionFunction;
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
ErrorBoundary?: React.ComponentType<any>;
handle?: any;
headers?: HeadersFunction;
HydrateFallback?: React.ComponentType<any>;
Layout?: React.ComponentType<any>;
links?: LinksFunction;
loader?: LoaderFunction;
meta?: MetaFunction;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteConfigEntry = RSCRouteConfigEntryBase & {
id: string;
path?: string;
Component?: React.ComponentType<any>;
lazy?: () => Promise<RSCRouteConfigEntryBase & ({
default?: React.ComponentType<any>;
Component?: never;
} | {
default?: never;
Component?: React.ComponentType<any>;
})>;
} & ({
index: true;
} | {
children?: RSCRouteConfigEntry[];
});
type RSCRouteConfig = Array<RSCRouteConfigEntry>;
type RSCRouteManifest = {
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
element?: React.ReactElement | false;
errorElement?: React.ReactElement;
handle?: any;
hasAction: boolean;
hasComponent: boolean;
hasErrorBoundary: boolean;
hasLoader: boolean;
hydrateFallbackElement?: React.ReactElement;
id: string;
index?: boolean;
links?: LinksFunction;
meta?: MetaFunction;
parentId?: string;
path?: string;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteMatch = RSCRouteManifest & {
params: Params;
pathname: string;
pathnameBase: string;
};
type RSCRenderPayload = {
type: "render";
actionData: Record<string, any> | null;
basename: string | undefined;
errors: Record<string, any> | null;
loaderData: Record<string, any>;
location: Location;
routeDiscovery: RouteDiscovery;
matches: RSCRouteMatch[];
patches?: Promise<RSCRouteManifest[]>;
nonce?: string;
formState?: unknown;
};
type RSCManifestPayload = {
type: "manifest";
patches: Promise<RSCRouteManifest[]>;
};
type RSCActionPayload = {
type: "action";
actionResult: Promise<unknown>;
rerender?: Promise<RSCRenderPayload | RSCRedirectPayload>;
};
type RSCRedirectPayload = {
type: "redirect";
status: number;
location: string;
replace: boolean;
reload: boolean;
actionResult?: Promise<unknown>;
};
type RSCPayload = RSCRenderPayload | RSCManifestPayload | RSCActionPayload | RSCRedirectPayload;
type RSCMatch = {
statusCode: number;
headers: Headers;
payload: RSCPayload;
};
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
type DecodeReplyFunction = (reply: FormData | string, options: {
temporaryReferences: unknown;
}) => Promise<unknown[]>;
type LoadServerActionFunction = (id: string) => Promise<Function>;
type RouteDiscovery = {
mode: "lazy";
manifestPath?: string | undefined;
} | {
mode: "initial";
};
/**
* Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* and returns an [RSC](https://react.dev/reference/rsc/server-components)
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
* enabled client router.
*
* @example
* import {
* createTemporaryReferenceSet,
* decodeAction,
* decodeReply,
* loadServerAction,
* renderToReadableStream,
* } from "@vitejs/plugin-rsc/rsc";
* import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
*
* matchRSCServerRequest({
* createTemporaryReferenceSet,
* decodeAction,
* decodeFormState,
* decodeReply,
* loadServerAction,
* request,
* routes: routes(),
* generateResponse(match) {
* return new Response(
* renderToReadableStream(match.payload),
* {
* status: match.statusCode,
* headers: match.headers,
* }
* );
* },
* });
*
* @name unstable_matchRSCServerRequest
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.allowedActionOrigins Origin patterns that are allowed to execute actions.
* @param opts.basename The basename to use when matching the request.
* @param opts.createTemporaryReferenceSet A function that returns a temporary
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
* stream.
* @param opts.decodeAction Your `react-server-dom-xyz/server`'s `decodeAction`
* function, responsible for loading a server action.
* @param opts.decodeFormState A function responsible for decoding form state for
* progressively enhanceable forms with React's [`useActionState`](https://react.dev/reference/react/useActionState)
* using your `react-server-dom-xyz/server`'s `decodeFormState`.
* @param opts.decodeReply Your `react-server-dom-xyz/server`'s `decodeReply`
* function, used to decode the server function's arguments and bind them to the
* implementation for invocation by the router.
* @param opts.generateResponse A function responsible for using your
* `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding the {@link unstable_RSCPayload}.
* @param opts.loadServerAction Your `react-server-dom-xyz/server`'s
* `loadServerAction` function, used to load a server action by ID.
* @param opts.onError An optional error handler that will be called with any
* errors that occur during the request processing.
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* to match against.
* @param opts.requestContext An instance of {@link RouterContextProvider}
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* @param opts.routeDiscovery The route discovery configuration, used to determine how the router should discover new routes during navigations.
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
* data for hydration.
*/
declare function matchRSCServerRequest({ allowedActionOrigins, createTemporaryReferenceSet, basename, decodeReply, requestContext, routeDiscovery, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
allowedActionOrigins?: string[];
createTemporaryReferenceSet: () => unknown;
basename?: string;
decodeReply?: DecodeReplyFunction;
decodeAction?: DecodeActionFunction;
decodeFormState?: DecodeFormStateFunction;
requestContext?: RouterContextProvider;
loadServerAction?: LoadServerActionFunction;
onError?: (error: unknown) => void;
request: Request;
routes: RSCRouteConfigEntry[];
routeDiscovery?: RouteDiscovery;
generateResponse: (match: RSCMatch, { onError, temporaryReferences, }: {
onError(error: unknown): string | undefined;
temporaryReferences: unknown;
}) => Response;
}): Promise<Response>;
type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
temporaryReferences: unknown;
}) => Promise<unknown>;
type EncodeReplyFunction = (args: unknown[], options: {
temporaryReferences: unknown;
}) => Promise<BodyInit>;
/**
* Create a React `callServer` implementation for React Router.
*
* @example
* import {
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* setServerCallback,
* } from "@vitejs/plugin-rsc/browser";
* import { unstable_createCallServer as createCallServer } from "react-router";
*
* setServerCallback(
* createCallServer({
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* })
* );
*
* @name unstable_createCallServer
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.createFromReadableStream Your `react-server-dom-xyz/client`'s
* `createFromReadableStream`. Used to decode payloads from the server.
* @param opts.createTemporaryReferenceSet A function that creates a temporary
* reference set for the [RSC](https://react.dev/reference/rsc/server-components)
* payload.
* @param opts.encodeReply Your `react-server-dom-xyz/client`'s `encodeReply`.
* Used when sending payloads to the server.
* @param opts.fetch Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
* implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
* @returns A function that can be used to call server actions.
*/
declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
createTemporaryReferenceSet: () => unknown;
encodeReply: EncodeReplyFunction;
fetch?: (request: Request) => Promise<Response>;
}): (id: string, args: unknown[]) => Promise<unknown>;
/**
* Props for the {@link unstable_RSCHydratedRouter} component.
*
* @name unstable_RSCHydratedRouterProps
* @category Types
*/
interface RSCHydratedRouterProps {
/**
* Your `react-server-dom-xyz/client`'s `createFromReadableStream` function,
* used to decode payloads from the server.
*/
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
/**
* Optional fetch implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
*/
fetch?: (request: Request) => Promise<Response>;
/**
* The decoded {@link unstable_RSCPayload} to hydrate.
*/
payload: RSCPayload;
/**
* A function that returns an {@link RouterContextProvider} instance
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* This function is called to generate a fresh `context` instance on each
* navigation or fetcher call.
*/
getContext?: RouterInit["getContext"];
}
/**
* Hydrates a server rendered {@link unstable_RSCPayload} in the browser.
*
* @example
* import { startTransition, StrictMode } from "react";
* import { hydrateRoot } from "react-dom/client";
* import {
* unstable_getRSCStream as getRSCStream,
* unstable_RSCHydratedRouter as RSCHydratedRouter,
* } from "react-router";
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
*
* createFromReadableStream(getRSCStream()).then((payload) =>
* startTransition(async () => {
* hydrateRoot(
* document,
* <StrictMode>
* <RSCHydratedRouter
* createFromReadableStream={createFromReadableStream}
* payload={payload}
* />
* </StrictMode>,
* { formState: await getFormState(payload) },
* );
* }),
* );
*
* @name unstable_RSCHydratedRouter
* @public
* @category RSC
* @mode data
* @param props Props
* @param {unstable_RSCHydratedRouterProps.createFromReadableStream} props.createFromReadableStream n/a
* @param {unstable_RSCHydratedRouterProps.fetch} props.fetch n/a
* @param {unstable_RSCHydratedRouterProps.getContext} props.getContext n/a
* @param {unstable_RSCHydratedRouterProps.payload} props.payload n/a
* @returns A hydrated {@link DataRouter} that can be used to navigate and
* render routes.
*/
declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, getContext, }: RSCHydratedRouterProps): React.JSX.Element;
export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, RSCHydratedRouter as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, createCallServer as c, type RSCManifestPayload as d, type RSCPayload as e, type RSCRenderPayload as f, getRequest as g, type RSCHydratedRouterProps as h, type RSCMatch as i, type RSCRouteManifest as j, type RSCRouteMatch as k, type RSCRouteConfigEntry as l, matchRSCServerRequest as m, type RSCRouteConfig as n };

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,188 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
var _chunkIK6APEEGjs = require('./chunk-IK6APEEG.js');
// lib/dom/ssr/hydration.tsx
function getHydrationData({
state,
routes,
getRouteInfo,
location,
basename,
isSpaMode
}) {
let hydrationData = {
...state,
loaderData: { ...state.loaderData }
};
let initialMatches = _chunkIK6APEEGjs.matchRoutes.call(void 0, routes, location, basename);
if (initialMatches) {
for (let match of initialMatches) {
let routeId = match.route.id;
let routeInfo = getRouteInfo(routeId);
if (_chunkIK6APEEGjs.shouldHydrateRouteLoader.call(void 0,
routeId,
routeInfo.clientLoader,
routeInfo.hasLoader,
isSpaMode
) && (routeInfo.hasHydrateFallback || !routeInfo.hasLoader)) {
delete hydrationData.loaderData[routeId];
} else if (!routeInfo.hasLoader) {
hydrationData.loaderData[routeId] = null;
}
}
}
return hydrationData;
}
// lib/rsc/errorBoundaries.tsx
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
var RSCRouterGlobalErrorBoundary = class extends _react2.default.Component {
constructor(props) {
super(props);
this.state = { error: null, location: props.location };
}
static getDerivedStateFromError(error) {
return { error };
}
static getDerivedStateFromProps(props, state) {
if (state.location !== props.location) {
return { error: null, location: props.location };
}
return { error: state.error, location: state.location };
}
render() {
if (this.state.error) {
return /* @__PURE__ */ _react2.default.createElement(
RSCDefaultRootErrorBoundaryImpl,
{
error: this.state.error,
renderAppShell: true
}
);
} else {
return this.props.children;
}
}
};
function ErrorWrapper({
renderAppShell,
title,
children
}) {
if (!renderAppShell) {
return children;
}
return /* @__PURE__ */ _react2.default.createElement("html", { lang: "en" }, /* @__PURE__ */ _react2.default.createElement("head", null, /* @__PURE__ */ _react2.default.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ _react2.default.createElement(
"meta",
{
name: "viewport",
content: "width=device-width,initial-scale=1,viewport-fit=cover"
}
), /* @__PURE__ */ _react2.default.createElement("title", null, title)), /* @__PURE__ */ _react2.default.createElement("body", null, /* @__PURE__ */ _react2.default.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, children)));
}
function RSCDefaultRootErrorBoundaryImpl({
error,
renderAppShell
}) {
console.error(error);
let heyDeveloper = /* @__PURE__ */ _react2.default.createElement(
"script",
{
dangerouslySetInnerHTML: {
__html: `
console.log(
"\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
);
`
}
}
);
if (_chunkIK6APEEGjs.isRouteErrorResponse.call(void 0, error)) {
return /* @__PURE__ */ _react2.default.createElement(
ErrorWrapper,
{
renderAppShell,
title: "Unhandled Thrown Response!"
},
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
_chunkIK6APEEGjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
);
}
let errorInstance;
if (error instanceof Error) {
errorInstance = error;
} else {
let errorString = error == null ? "Unknown Error" : typeof error === "object" && "toString" in error ? error.toString() : JSON.stringify(error);
errorInstance = new Error(errorString);
}
return /* @__PURE__ */ _react2.default.createElement(ErrorWrapper, { renderAppShell, title: "Application Error!" }, /* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ _react2.default.createElement(
"pre",
{
style: {
padding: "2rem",
background: "hsla(10, 50%, 50%, 0.1)",
color: "red",
overflow: "auto"
}
},
errorInstance.stack
), heyDeveloper);
}
function RSCDefaultRootErrorBoundary({
hasRootLayout
}) {
let error = _chunkIK6APEEGjs.useRouteError.call(void 0, );
if (hasRootLayout === void 0) {
throw new Error("Missing 'hasRootLayout' prop");
}
return /* @__PURE__ */ _react2.default.createElement(
RSCDefaultRootErrorBoundaryImpl,
{
renderAppShell: !hasRootLayout,
error
}
);
}
// lib/rsc/route-modules.ts
function createRSCRouteModules(payload) {
const routeModules = {};
for (const match of payload.matches) {
populateRSCRouteModules(routeModules, match);
}
return routeModules;
}
function populateRSCRouteModules(routeModules, matches) {
matches = Array.isArray(matches) ? matches : [matches];
for (const match of matches) {
routeModules[match.id] = {
links: match.links,
meta: match.meta,
default: noopComponent
};
}
}
var noopComponent = () => null;
exports.getHydrationData = getHydrationData; exports.RSCRouterGlobalErrorBoundary = RSCRouterGlobalErrorBoundary; exports.RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.createRSCRouteModules = createRSCRouteModules; exports.populateRSCRouteModules = populateRSCRouteModules;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,172 @@
import * as React from 'react';
import { a as RouterProviderProps$1, R as RouterInit, u as unstable_ClientInstrumentation, C as ClientOnErrorFunction } from './context-phCt_zmH.mjs';
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-vtIR1Kpe.mjs';
import './routeModules-BRrCYrSL.mjs';
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
/**
* Props for the {@link dom.HydratedRouter} component.
*
* @category Types
*/
interface HydratedRouterProps {
/**
* Context factory function to be passed through to {@link createBrowserRouter}.
* This function will be called to create a fresh `context` instance on each
* navigation/fetch and made available to
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* functions.
*/
getContext?: RouterInit["getContext"];
/**
* Array of instrumentation objects allowing you to instrument the router and
* individual routes prior to router initialization (and on any subsequently
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
* mostly useful for observability such as wrapping navigations, fetches,
* as well as route loaders/actions/middlewares with logging and/or performance
* tracing. See the [docs](../../how-to/instrumentation) for more information.
*
* ```tsx
* const logging = {
* router({ instrument }) {
* instrument({
* navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
* fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
* });
* },
* route({ instrument, id }) {
* instrument({
* middleware: (impl, { request }) => logExecution(
* `middleware ${request.url} (route ${id})`,
* impl
* ),
* loader: (impl, { request }) => logExecution(
* `loader ${request.url} (route ${id})`,
* impl
* ),
* action: (impl, { request }) => logExecution(
* `action ${request.url} (route ${id})`,
* impl
* ),
* })
* }
* };
*
* async function logExecution(label: string, impl: () => Promise<void>) {
* let start = performance.now();
* console.log(`start ${label}`);
* await impl();
* let duration = Math.round(performance.now() - start);
* console.log(`end ${label} (${duration}ms)`);
* }
*
* startTransition(() => {
* hydrateRoot(
* document,
* <HydratedRouter unstable_instrumentations={[logging]} />
* );
* });
* ```
*/
unstable_instrumentations?: unstable_ClientInstrumentation[];
/**
* An error handler function that will be called for any middleware, loader, action,
* or render errors that are encountered in your application. This is useful for
* logging or reporting errors instead of in the {@link ErrorBoundary} because it's not
* subject to re-rendering and will only run one time per error.
*
* The `errorInfo` parameter is passed along from
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
* and is only present for render errors.
*
* ```tsx
* <HydratedRouter onError=(error, info) => {
* let { location, params, unstable_pattern, errorInfo } = info;
* console.error(error, location, errorInfo);
* reportToErrorService(error, location, errorInfo);
* }} />
* ```
*/
onError?: ClientOnErrorFunction;
/**
* Control whether router state updates are internally wrapped in
* [`React.startTransition`](https://react.dev/reference/react/startTransition).
*
* - When left `undefined`, all state updates are wrapped in
* `React.startTransition`
* - This can lead to buggy behaviors if you are wrapping your own
* navigations/fetchers in `startTransition`.
* - When set to `true`, {@link Link} and {@link Form} navigations will be wrapped
* in `React.startTransition` and router state changes will be wrapped in
* `React.startTransition` and also sent through
* [`useOptimistic`](https://react.dev/reference/react/useOptimistic) to
* surface mid-navigation router state changes to the UI.
* - When set to `false`, the router will not leverage `React.startTransition` or
* `React.useOptimistic` on any navigations or state changes.
*
* For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
*/
unstable_useTransitions?: boolean;
}
/**
* Framework-mode router component to be used to hydrate a router from a
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
*
* @public
* @category Framework Routers
* @mode framework
* @param props Props
* @param {dom.HydratedRouterProps.getContext} props.getContext n/a
* @param {dom.HydratedRouterProps.onError} props.onError n/a
* @returns A React element that represents the hydrated application.
*/
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
declare global {
interface Window {
__FLIGHT_DATA: any[];
}
}
/**
* Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
* stream for hydration. Usually passed directly to your
* `react-server-dom-xyz/client`'s `createFromReadableStream`.
*
* @example
* import { startTransition, StrictMode } from "react";
* import { hydrateRoot } from "react-dom/client";
* import {
* unstable_getRSCStream as getRSCStream,
* unstable_RSCHydratedRouter as RSCHydratedRouter,
* } from "react-router";
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
*
* createFromReadableStream(getRSCStream()).then(
* (payload: RSCServerPayload) => {
* startTransition(async () => {
* hydrateRoot(
* document,
* <StrictMode>
* <RSCHydratedRouter {...props} />
* </StrictMode>,
* {
* // Options
* }
* );
* });
* }
* );
*
* @name unstable_getRSCStream
* @public
* @category RSC
* @mode data
* @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
* data for hydration.
*/
declare function getRSCStream(): ReadableStream;
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };

View File

@ -0,0 +1,173 @@
import * as React from 'react';
import { RouterProviderProps as RouterProviderProps$1, RouterInit, ClientOnErrorFunction } from 'react-router';
import { u as unstable_ClientInstrumentation } from './instrumentation-BYr6ff5D.js';
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-C9Ar1yxG.js';
import './routeModules-CA7kSxJJ.js';
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
/**
* Props for the {@link dom.HydratedRouter} component.
*
* @category Types
*/
interface HydratedRouterProps {
/**
* Context factory function to be passed through to {@link createBrowserRouter}.
* This function will be called to create a fresh `context` instance on each
* navigation/fetch and made available to
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* functions.
*/
getContext?: RouterInit["getContext"];
/**
* Array of instrumentation objects allowing you to instrument the router and
* individual routes prior to router initialization (and on any subsequently
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
* mostly useful for observability such as wrapping navigations, fetches,
* as well as route loaders/actions/middlewares with logging and/or performance
* tracing. See the [docs](../../how-to/instrumentation) for more information.
*
* ```tsx
* const logging = {
* router({ instrument }) {
* instrument({
* navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
* fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
* });
* },
* route({ instrument, id }) {
* instrument({
* middleware: (impl, { request }) => logExecution(
* `middleware ${request.url} (route ${id})`,
* impl
* ),
* loader: (impl, { request }) => logExecution(
* `loader ${request.url} (route ${id})`,
* impl
* ),
* action: (impl, { request }) => logExecution(
* `action ${request.url} (route ${id})`,
* impl
* ),
* })
* }
* };
*
* async function logExecution(label: string, impl: () => Promise<void>) {
* let start = performance.now();
* console.log(`start ${label}`);
* await impl();
* let duration = Math.round(performance.now() - start);
* console.log(`end ${label} (${duration}ms)`);
* }
*
* startTransition(() => {
* hydrateRoot(
* document,
* <HydratedRouter unstable_instrumentations={[logging]} />
* );
* });
* ```
*/
unstable_instrumentations?: unstable_ClientInstrumentation[];
/**
* An error handler function that will be called for any middleware, loader, action,
* or render errors that are encountered in your application. This is useful for
* logging or reporting errors instead of in the {@link ErrorBoundary} because it's not
* subject to re-rendering and will only run one time per error.
*
* The `errorInfo` parameter is passed along from
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
* and is only present for render errors.
*
* ```tsx
* <HydratedRouter onError=(error, info) => {
* let { location, params, unstable_pattern, errorInfo } = info;
* console.error(error, location, errorInfo);
* reportToErrorService(error, location, errorInfo);
* }} />
* ```
*/
onError?: ClientOnErrorFunction;
/**
* Control whether router state updates are internally wrapped in
* [`React.startTransition`](https://react.dev/reference/react/startTransition).
*
* - When left `undefined`, all state updates are wrapped in
* `React.startTransition`
* - This can lead to buggy behaviors if you are wrapping your own
* navigations/fetchers in `startTransition`.
* - When set to `true`, {@link Link} and {@link Form} navigations will be wrapped
* in `React.startTransition` and router state changes will be wrapped in
* `React.startTransition` and also sent through
* [`useOptimistic`](https://react.dev/reference/react/useOptimistic) to
* surface mid-navigation router state changes to the UI.
* - When set to `false`, the router will not leverage `React.startTransition` or
* `React.useOptimistic` on any navigations or state changes.
*
* For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
*/
unstable_useTransitions?: boolean;
}
/**
* Framework-mode router component to be used to hydrate a router from a
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
*
* @public
* @category Framework Routers
* @mode framework
* @param props Props
* @param {dom.HydratedRouterProps.getContext} props.getContext n/a
* @param {dom.HydratedRouterProps.onError} props.onError n/a
* @returns A React element that represents the hydrated application.
*/
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
declare global {
interface Window {
__FLIGHT_DATA: any[];
}
}
/**
* Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
* stream for hydration. Usually passed directly to your
* `react-server-dom-xyz/client`'s `createFromReadableStream`.
*
* @example
* import { startTransition, StrictMode } from "react";
* import { hydrateRoot } from "react-dom/client";
* import {
* unstable_getRSCStream as getRSCStream,
* unstable_RSCHydratedRouter as RSCHydratedRouter,
* } from "react-router";
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
*
* createFromReadableStream(getRSCStream()).then(
* (payload: RSCServerPayload) => {
* startTransition(async () => {
* hydrateRoot(
* document,
* <StrictMode>
* <RSCHydratedRouter {...props} />
* </StrictMode>,
* {
* // Options
* }
* );
* });
* }
* );
*
* @name unstable_getRSCStream
* @public
* @category RSC
* @mode data
* @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
* data for hydration.
*/
declare function getRSCStream(): ReadableStream;
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };

1021
node_modules/react-router/dist/development/dom-export.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

1013
node_modules/react-router/dist/development/dom-export.mjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
export { Q as MemoryRouter, T as Navigate, U as Outlet, V as Route, W as Router, X as RouterProvider, Y as Routes, A as UNSAFE_AwaitContextProvider, ab as UNSAFE_WithComponentProps, af as UNSAFE_WithErrorBoundaryProps, ad as UNSAFE_WithHydrateFallbackProps } from './context-phCt_zmH.mjs';
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-BwWaHAr3.mjs';
import './routeModules-BRrCYrSL.mjs';
import 'react';

View File

@ -0,0 +1,4 @@
export { W as BrowserRouter, $ as Form, X as HashRouter, Y as Link, an as Links, j as MemoryRouter, am as Meta, _ as NavLink, k as Navigate, l as Outlet, m as Route, n as Router, o as RouterProvider, p as Routes, a0 as ScrollRestoration, ak as StaticRouter, al as StaticRouterProvider, b as UNSAFE_AwaitContextProvider, aH as UNSAFE_WithComponentProps, aL as UNSAFE_WithErrorBoundaryProps, aJ as UNSAFE_WithHydrateFallbackProps, Z as unstable_HistoryRouter } from './index-react-server-client-luDbagNU.js';
import './instrumentation-BYr6ff5D.js';
import './routeModules-CA7kSxJJ.js';
import 'react';

View File

@ -0,0 +1,61 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
"use client";
var _chunkNXTEWSJOjs = require('./chunk-NXTEWSJO.js');
var _chunkIK6APEEGjs = require('./chunk-IK6APEEG.js');
exports.BrowserRouter = _chunkNXTEWSJOjs.BrowserRouter; exports.Form = _chunkNXTEWSJOjs.Form; exports.HashRouter = _chunkNXTEWSJOjs.HashRouter; exports.Link = _chunkNXTEWSJOjs.Link; exports.Links = _chunkIK6APEEGjs.Links; exports.MemoryRouter = _chunkIK6APEEGjs.MemoryRouter; exports.Meta = _chunkIK6APEEGjs.Meta; exports.NavLink = _chunkNXTEWSJOjs.NavLink; exports.Navigate = _chunkIK6APEEGjs.Navigate; exports.Outlet = _chunkIK6APEEGjs.Outlet; exports.Route = _chunkIK6APEEGjs.Route; exports.Router = _chunkIK6APEEGjs.Router; exports.RouterProvider = _chunkIK6APEEGjs.RouterProvider; exports.Routes = _chunkIK6APEEGjs.Routes; exports.ScrollRestoration = _chunkNXTEWSJOjs.ScrollRestoration; exports.StaticRouter = _chunkNXTEWSJOjs.StaticRouter; exports.StaticRouterProvider = _chunkNXTEWSJOjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkIK6APEEGjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunkIK6APEEGjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkIK6APEEGjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkIK6APEEGjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkNXTEWSJOjs.HistoryRouter;

View File

@ -0,0 +1,59 @@
/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
"use client";
import {
AwaitContextProvider,
BrowserRouter,
Form,
HashRouter,
HistoryRouter,
Link,
Links,
MemoryRouter,
Meta,
NavLink,
Navigate,
Outlet,
Route,
Router,
RouterProvider,
Routes,
ScrollRestoration,
StaticRouter,
StaticRouterProvider,
WithComponentProps,
WithErrorBoundaryProps,
WithHydrateFallbackProps
} from "./chunk-QFMPRPBF.mjs";
export {
BrowserRouter,
Form,
HashRouter,
Link,
Links,
MemoryRouter,
Meta,
NavLink,
Navigate,
Outlet,
Route,
Router,
RouterProvider,
Routes,
ScrollRestoration,
StaticRouter,
StaticRouterProvider,
AwaitContextProvider as UNSAFE_AwaitContextProvider,
WithComponentProps as UNSAFE_WithComponentProps,
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
HistoryRouter as unstable_HistoryRouter
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1390
node_modules/react-router/dist/development/index.d.mts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1390
node_modules/react-router/dist/development/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

2608
node_modules/react-router/dist/development/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

275
node_modules/react-router/dist/development/index.mjs generated vendored Normal file
View File

@ -0,0 +1,275 @@
/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
"use client";
import {
RSCDefaultRootErrorBoundary,
RSCStaticRouter,
ServerMode,
ServerRouter,
createCookie,
createCookieSessionStorage,
createMemorySessionStorage,
createRequestHandler,
createRoutesStub,
createSession,
createSessionStorage,
deserializeErrors,
getHydrationData,
href,
isCookie,
isSession,
routeRSCServerRequest,
setDevServerHooks
} from "./chunk-2UH5WJXA.mjs";
import {
Action,
Await,
AwaitContextProvider,
BrowserRouter,
DataRouterContext,
DataRouterStateContext,
ErrorResponseImpl,
FetchersContext,
Form,
FrameworkContext,
HashRouter,
HistoryRouter,
IDLE_BLOCKER,
IDLE_FETCHER,
IDLE_NAVIGATION,
Link,
Links,
LocationContext,
MemoryRouter,
Meta,
NavLink,
Navigate,
NavigationContext,
Outlet,
PrefetchPageLinks,
RemixErrorBoundary,
Route,
RouteContext,
Router,
RouterContextProvider,
RouterProvider,
Routes,
Scripts,
ScrollRestoration,
SingleFetchRedirectSymbol,
StaticRouter,
StaticRouterProvider,
ViewTransitionContext,
WithComponentProps,
WithErrorBoundaryProps,
WithHydrateFallbackProps,
createBrowserHistory,
createBrowserRouter,
createClientRoutes,
createClientRoutesWithHMRRevalidationOptOut,
createContext,
createHashHistory,
createHashRouter,
createMemoryHistory,
createMemoryRouter,
createPath,
createRouter,
createRoutesFromChildren,
createRoutesFromElements,
createSearchParams,
createStaticHandler2 as createStaticHandler,
createStaticRouter,
data,
decodeViaTurboStream,
generatePath,
getPatchRoutesOnNavigationFunction,
getTurboStreamSingleFetchDataStrategy,
hydrationRouteProperties,
invariant,
isRouteErrorResponse,
mapRouteProperties,
matchPath,
matchRoutes,
parsePath,
redirect,
redirectDocument,
renderMatches,
replace,
resolvePath,
shouldHydrateRouteLoader,
useActionData,
useAsyncError,
useAsyncValue,
useBeforeUnload,
useBlocker,
useFetcher,
useFetchers,
useFogOFWarDiscovery,
useFormAction,
useHref,
useInRouterContext,
useLinkClickHandler,
useLoaderData,
useLocation,
useMatch,
useMatches,
useNavigate,
useNavigation,
useNavigationType,
useOutlet,
useOutletContext,
useParams,
usePrompt,
useResolvedPath,
useRevalidator,
useRoute,
useRouteError,
useRouteLoaderData,
useRoutes,
useScrollRestoration,
useSearchParams,
useSubmit,
useViewTransitionState,
withComponentProps,
withErrorBoundaryProps,
withHydrateFallbackProps
} from "./chunk-QFMPRPBF.mjs";
export {
Await,
BrowserRouter,
Form,
HashRouter,
IDLE_BLOCKER,
IDLE_FETCHER,
IDLE_NAVIGATION,
Link,
Links,
MemoryRouter,
Meta,
NavLink,
Navigate,
Action as NavigationType,
Outlet,
PrefetchPageLinks,
Route,
Router,
RouterContextProvider,
RouterProvider,
Routes,
Scripts,
ScrollRestoration,
ServerRouter,
StaticRouter,
StaticRouterProvider,
AwaitContextProvider as UNSAFE_AwaitContextProvider,
DataRouterContext as UNSAFE_DataRouterContext,
DataRouterStateContext as UNSAFE_DataRouterStateContext,
ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
FetchersContext as UNSAFE_FetchersContext,
FrameworkContext as UNSAFE_FrameworkContext,
LocationContext as UNSAFE_LocationContext,
NavigationContext as UNSAFE_NavigationContext,
RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary,
RemixErrorBoundary as UNSAFE_RemixErrorBoundary,
RouteContext as UNSAFE_RouteContext,
ServerMode as UNSAFE_ServerMode,
SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol,
ViewTransitionContext as UNSAFE_ViewTransitionContext,
WithComponentProps as UNSAFE_WithComponentProps,
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
createBrowserHistory as UNSAFE_createBrowserHistory,
createClientRoutes as UNSAFE_createClientRoutes,
createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
createHashHistory as UNSAFE_createHashHistory,
createMemoryHistory as UNSAFE_createMemoryHistory,
createRouter as UNSAFE_createRouter,
decodeViaTurboStream as UNSAFE_decodeViaTurboStream,
deserializeErrors as UNSAFE_deserializeErrors,
getHydrationData as UNSAFE_getHydrationData,
getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction,
getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy,
hydrationRouteProperties as UNSAFE_hydrationRouteProperties,
invariant as UNSAFE_invariant,
mapRouteProperties as UNSAFE_mapRouteProperties,
shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader,
useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,
useScrollRestoration as UNSAFE_useScrollRestoration,
withComponentProps as UNSAFE_withComponentProps,
withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps,
withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps,
createBrowserRouter,
createContext,
createCookie,
createCookieSessionStorage,
createHashRouter,
createMemoryRouter,
createMemorySessionStorage,
createPath,
createRequestHandler,
createRoutesFromChildren,
createRoutesFromElements,
createRoutesStub,
createSearchParams,
createSession,
createSessionStorage,
createStaticHandler,
createStaticRouter,
data,
generatePath,
href,
isCookie,
isRouteErrorResponse,
isSession,
matchPath,
matchRoutes,
parsePath,
redirect,
redirectDocument,
renderMatches,
replace,
resolvePath,
HistoryRouter as unstable_HistoryRouter,
RSCStaticRouter as unstable_RSCStaticRouter,
routeRSCServerRequest as unstable_routeRSCServerRequest,
setDevServerHooks as unstable_setDevServerHooks,
usePrompt as unstable_usePrompt,
useRoute as unstable_useRoute,
useActionData,
useAsyncError,
useAsyncValue,
useBeforeUnload,
useBlocker,
useFetcher,
useFetchers,
useFormAction,
useHref,
useInRouterContext,
useLinkClickHandler,
useLoaderData,
useLocation,
useMatch,
useMatches,
useNavigate,
useNavigation,
useNavigationType,
useOutlet,
useOutletContext,
useParams,
useResolvedPath,
useRevalidator,
useRouteError,
useRouteLoaderData,
useRoutes,
useSearchParams,
useSubmit,
useViewTransitionState
};

View File

@ -0,0 +1,657 @@
import { e as RouteObject, f as History, g as MaybePromise, c as RouterContextProvider, h as MapRoutePropertiesFunction, i as Action, L as Location, D as DataRouteMatch, j as Submission, k as RouteData, l as DataStrategyFunction, m as PatchRoutesOnNavigationFunction, n as DataRouteObject, U as UIMatch, T as To, o as HTMLFormMethod, F as FormEncType, p as Path, q as LoaderFunctionArgs, r as MiddlewareEnabled, s as AppLoadContext } from './routeModules-CA7kSxJJ.js';
/**
* A Router instance manages all navigation and data loading/mutations
*/
interface Router {
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the basename for the router
*/
get basename(): RouterInit["basename"];
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the future config for the router
*/
get future(): FutureConfig;
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the current state of the router
*/
get state(): RouterState;
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the routes for this router instance
*/
get routes(): DataRouteObject[];
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the window associated with the router
*/
get window(): RouterInit["window"];
/**
* @private
* PRIVATE - DO NOT USE
*
* Initialize the router, including adding history listeners and kicking off
* initial data fetches. Returns a function to cleanup listeners and abort
* any in-progress loads
*/
initialize(): Router;
/**
* @private
* PRIVATE - DO NOT USE
*
* Subscribe to router.state updates
*
* @param fn function to call with the new state
*/
subscribe(fn: RouterSubscriber): () => void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Enable scroll restoration behavior in the router
*
* @param savedScrollPositions Object that will manage positions, in case
* it's being restored from sessionStorage
* @param getScrollPosition Function to get the active Y scroll position
* @param getKey Function to get the key to use for restoration
*/
enableScrollRestoration(savedScrollPositions: Record<string, number>, getScrollPosition: GetScrollPositionFunction, getKey?: GetScrollRestorationKeyFunction): () => void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Navigate forward/backward in the history stack
* @param to Delta to move in the history stack
*/
navigate(to: number): Promise<void>;
/**
* Navigate to the given path
* @param to Path to navigate to
* @param opts Navigation options (method, submission, etc.)
*/
navigate(to: To | null, opts?: RouterNavigateOptions): Promise<void>;
/**
* @private
* PRIVATE - DO NOT USE
*
* Trigger a fetcher load/submission
*
* @param key Fetcher key
* @param routeId Route that owns the fetcher
* @param href href to fetch
* @param opts Fetcher options, (method, submission, etc.)
*/
fetch(key: string, routeId: string, href: string | null, opts?: RouterFetchOptions): Promise<void>;
/**
* @private
* PRIVATE - DO NOT USE
*
* Trigger a revalidation of all current route loaders and fetcher loads
*/
revalidate(): Promise<void>;
/**
* @private
* PRIVATE - DO NOT USE
*
* Utility function to create an href for the given location
* @param location
*/
createHref(location: Location | URL): string;
/**
* @private
* PRIVATE - DO NOT USE
*
* Utility function to URL encode a destination path according to the internal
* history implementation
* @param to
*/
encodeLocation(to: To): Path;
/**
* @private
* PRIVATE - DO NOT USE
*
* Get/create a fetcher for the given key
* @param key
*/
getFetcher<TData = any>(key: string): Fetcher<TData>;
/**
* @internal
* PRIVATE - DO NOT USE
*
* Reset the fetcher for a given key
* @param key
*/
resetFetcher(key: string, opts?: {
reason?: unknown;
}): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Delete the fetcher for a given key
* @param key
*/
deleteFetcher(key: string): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Cleanup listeners and abort any in-progress loads
*/
dispose(): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Get a navigation blocker
* @param key The identifier for the blocker
* @param fn The blocker function implementation
*/
getBlocker(key: string, fn: BlockerFunction): Blocker;
/**
* @private
* PRIVATE - DO NOT USE
*
* Delete a navigation blocker
* @param key The identifier for the blocker
*/
deleteBlocker(key: string): void;
/**
* @private
* PRIVATE DO NOT USE
*
* Patch additional children routes into an existing parent route
* @param routeId The parent route id or a callback function accepting `patch`
* to perform batch patching
* @param children The additional children routes
* @param unstable_allowElementMutations Allow mutation or route elements on
* existing routes. Intended for RSC-usage
* only.
*/
patchRoutes(routeId: string | null, children: RouteObject[], unstable_allowElementMutations?: boolean): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* HMR needs to pass in-flight route updates to React Router
* TODO: Replace this with granular route update APIs (addRoute, updateRoute, deleteRoute)
*/
_internalSetRoutes(routes: RouteObject[]): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Cause subscribers to re-render. This is used to force a re-render.
*/
_internalSetStateDoNotUseOrYouWillBreakYourApp(state: Partial<RouterState>): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Internal fetch AbortControllers accessed by unit tests
*/
_internalFetchControllers: Map<string, AbortController>;
}
/**
* State maintained internally by the router. During a navigation, all states
* reflect the "old" location unless otherwise noted.
*/
interface RouterState {
/**
* The action of the most recent navigation
*/
historyAction: Action;
/**
* The current location reflected by the router
*/
location: Location;
/**
* The current set of route matches
*/
matches: DataRouteMatch[];
/**
* Tracks whether we've completed our initial data load
*/
initialized: boolean;
/**
* Tracks whether we should be rendering a HydrateFallback during hydration
*/
renderFallback: boolean;
/**
* Current scroll position we should start at for a new view
* - number -> scroll position to restore to
* - false -> do not restore scroll at all (used during submissions/revalidations)
* - null -> don't have a saved position, scroll to hash or top of page
*/
restoreScrollPosition: number | false | null;
/**
* Indicate whether this navigation should skip resetting the scroll position
* if we are unable to restore the scroll position
*/
preventScrollReset: boolean;
/**
* Tracks the state of the current navigation
*/
navigation: Navigation;
/**
* Tracks any in-progress revalidations
*/
revalidation: RevalidationState;
/**
* Data from the loaders for the current matches
*/
loaderData: RouteData;
/**
* Data from the action for the current matches
*/
actionData: RouteData | null;
/**
* Errors caught from loaders for the current matches
*/
errors: RouteData | null;
/**
* Map of current fetchers
*/
fetchers: Map<string, Fetcher>;
/**
* Map of current blockers
*/
blockers: Map<string, Blocker>;
}
/**
* Data that can be passed into hydrate a Router from SSR
*/
type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
/**
* Future flags to toggle new feature behavior
*/
interface FutureConfig {
unstable_passThroughRequests: boolean;
}
/**
* Initialization options for createRouter
*/
interface RouterInit {
routes: RouteObject[];
history: History;
basename?: string;
getContext?: () => MaybePromise<RouterContextProvider>;
unstable_instrumentations?: unstable_ClientInstrumentation[];
mapRouteProperties?: MapRoutePropertiesFunction;
future?: Partial<FutureConfig>;
hydrationRouteProperties?: string[];
hydrationData?: HydrationState;
window?: Window;
dataStrategy?: DataStrategyFunction;
patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
}
/**
* State returned from a server-side query() call
*/
interface StaticHandlerContext {
basename: Router["basename"];
location: RouterState["location"];
matches: RouterState["matches"];
loaderData: RouterState["loaderData"];
actionData: RouterState["actionData"];
errors: RouterState["errors"];
statusCode: number;
loaderHeaders: Record<string, Headers>;
actionHeaders: Record<string, Headers>;
_deepestRenderedBoundaryId?: string | null;
}
/**
* A StaticHandler instance manages a singular SSR navigation/fetch event
*/
interface StaticHandler {
dataRoutes: DataRouteObject[];
query(request: Request, opts?: {
requestContext?: unknown;
filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
skipLoaderErrorBubbling?: boolean;
skipRevalidation?: boolean;
dataStrategy?: DataStrategyFunction<unknown>;
generateMiddlewareResponse?: (query: (r: Request, args?: {
filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
}) => Promise<StaticHandlerContext | Response>) => MaybePromise<Response>;
unstable_normalizePath?: (request: Request) => Path;
}): Promise<StaticHandlerContext | Response>;
queryRoute(request: Request, opts?: {
routeId?: string;
requestContext?: unknown;
dataStrategy?: DataStrategyFunction<unknown>;
generateMiddlewareResponse?: (queryRoute: (r: Request) => Promise<Response>) => MaybePromise<Response>;
unstable_normalizePath?: (request: Request) => Path;
}): Promise<any>;
}
type ViewTransitionOpts = {
currentLocation: Location;
nextLocation: Location;
};
/**
* Subscriber function signature for changes to router state
*/
interface RouterSubscriber {
(state: RouterState, opts: {
deletedFetchers: string[];
newErrors: RouteData | null;
viewTransitionOpts?: ViewTransitionOpts;
flushSync: boolean;
}): void;
}
/**
* Function signature for determining the key to be used in scroll restoration
* for a given location
*/
interface GetScrollRestorationKeyFunction {
(location: Location, matches: UIMatch[]): string | null;
}
/**
* Function signature for determining the current scroll position
*/
interface GetScrollPositionFunction {
(): number;
}
/**
* - "route": relative to the route hierarchy so `..` means remove all segments
* of the current route even if it has many. For example, a `route("posts/:id")`
* would have both `:id` and `posts` removed from the url.
* - "path": relative to the pathname so `..` means remove one segment of the
* pathname. For example, a `route("posts/:id")` would have only `:id` removed
* from the url.
*/
type RelativeRoutingType = "route" | "path";
type BaseNavigateOrFetchOptions = {
preventScrollReset?: boolean;
relative?: RelativeRoutingType;
flushSync?: boolean;
unstable_defaultShouldRevalidate?: boolean;
};
type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
replace?: boolean;
state?: any;
fromRouteId?: string;
viewTransition?: boolean;
unstable_mask?: To;
};
type BaseSubmissionOptions = {
formMethod?: HTMLFormMethod;
formEncType?: FormEncType;
} & ({
formData: FormData;
body?: undefined;
} | {
formData?: undefined;
body: any;
});
/**
* Options for a navigate() call for a normal (non-submission) navigation
*/
type LinkNavigateOptions = BaseNavigateOptions;
/**
* Options for a navigate() call for a submission navigation
*/
type SubmissionNavigateOptions = BaseNavigateOptions & BaseSubmissionOptions;
/**
* Options to pass to navigate() for a navigation
*/
type RouterNavigateOptions = LinkNavigateOptions | SubmissionNavigateOptions;
/**
* Options for a fetch() load
*/
type LoadFetchOptions = BaseNavigateOrFetchOptions;
/**
* Options for a fetch() submission
*/
type SubmitFetchOptions = BaseNavigateOrFetchOptions & BaseSubmissionOptions;
/**
* Options to pass to fetch()
*/
type RouterFetchOptions = LoadFetchOptions | SubmitFetchOptions;
/**
* Potential states for state.navigation
*/
type NavigationStates = {
Idle: {
state: "idle";
location: undefined;
formMethod: undefined;
formAction: undefined;
formEncType: undefined;
formData: undefined;
json: undefined;
text: undefined;
};
Loading: {
state: "loading";
location: Location;
formMethod: Submission["formMethod"] | undefined;
formAction: Submission["formAction"] | undefined;
formEncType: Submission["formEncType"] | undefined;
formData: Submission["formData"] | undefined;
json: Submission["json"] | undefined;
text: Submission["text"] | undefined;
};
Submitting: {
state: "submitting";
location: Location;
formMethod: Submission["formMethod"];
formAction: Submission["formAction"];
formEncType: Submission["formEncType"];
formData: Submission["formData"];
json: Submission["json"];
text: Submission["text"];
};
};
type Navigation = NavigationStates[keyof NavigationStates];
type RevalidationState = "idle" | "loading";
/**
* Potential states for fetchers
*/
type FetcherStates<TData = any> = {
/**
* The fetcher is not calling a loader or action
*
* ```tsx
* fetcher.state === "idle"
* ```
*/
Idle: {
state: "idle";
formMethod: undefined;
formAction: undefined;
formEncType: undefined;
text: undefined;
formData: undefined;
json: undefined;
/**
* If the fetcher has never been called, this will be undefined.
*/
data: TData | undefined;
};
/**
* The fetcher is loading data from a {@link LoaderFunction | loader} from a
* call to {@link FetcherWithComponents.load | `fetcher.load`}.
*
* ```tsx
* // somewhere
* <button onClick={() => fetcher.load("/some/route") }>Load</button>
*
* // the state will update
* fetcher.state === "loading"
* ```
*/
Loading: {
state: "loading";
formMethod: Submission["formMethod"] | undefined;
formAction: Submission["formAction"] | undefined;
formEncType: Submission["formEncType"] | undefined;
text: Submission["text"] | undefined;
formData: Submission["formData"] | undefined;
json: Submission["json"] | undefined;
data: TData | undefined;
};
/**
The fetcher is submitting to a {@link LoaderFunction} (GET) or {@link ActionFunction} (POST) from a {@link FetcherWithComponents.Form | `fetcher.Form`} or {@link FetcherWithComponents.submit | `fetcher.submit`}.
```tsx
// somewhere
<input
onChange={e => {
fetcher.submit(event.currentTarget.form, { method: "post" });
}}
/>
// the state will update
fetcher.state === "submitting"
// and formData will be available
fetcher.formData
```
*/
Submitting: {
state: "submitting";
formMethod: Submission["formMethod"];
formAction: Submission["formAction"];
formEncType: Submission["formEncType"];
text: Submission["text"];
formData: Submission["formData"];
json: Submission["json"];
data: TData | undefined;
};
};
type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
interface BlockerBlocked {
state: "blocked";
reset: () => void;
proceed: () => void;
location: Location;
}
interface BlockerUnblocked {
state: "unblocked";
reset: undefined;
proceed: undefined;
location: undefined;
}
interface BlockerProceeding {
state: "proceeding";
reset: undefined;
proceed: undefined;
location: Location;
}
type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;
type BlockerFunction = (args: {
currentLocation: Location;
nextLocation: Location;
historyAction: Action;
}) => boolean;
declare const IDLE_NAVIGATION: NavigationStates["Idle"];
declare const IDLE_FETCHER: FetcherStates["Idle"];
declare const IDLE_BLOCKER: BlockerUnblocked;
/**
* Create a router and listen to history POP navigations
*/
declare function createRouter(init: RouterInit): Router;
interface CreateStaticHandlerOptions {
basename?: string;
mapRouteProperties?: MapRoutePropertiesFunction;
unstable_instrumentations?: Pick<unstable_ServerInstrumentation, "route">[];
future?: Partial<FutureConfig>;
}
type unstable_ServerInstrumentation = {
handler?: unstable_InstrumentRequestHandlerFunction;
route?: unstable_InstrumentRouteFunction;
};
type unstable_ClientInstrumentation = {
router?: unstable_InstrumentRouterFunction;
route?: unstable_InstrumentRouteFunction;
};
type unstable_InstrumentRequestHandlerFunction = (handler: InstrumentableRequestHandler) => void;
type unstable_InstrumentRouterFunction = (router: InstrumentableRouter) => void;
type unstable_InstrumentRouteFunction = (route: InstrumentableRoute) => void;
type unstable_InstrumentationHandlerResult = {
status: "success";
error: undefined;
} | {
status: "error";
error: Error;
};
type InstrumentFunction<T> = (handler: () => Promise<unstable_InstrumentationHandlerResult>, info: T) => Promise<void>;
type ReadonlyRequest = {
method: string;
url: string;
headers: Pick<Headers, "get">;
};
type ReadonlyContext = MiddlewareEnabled extends true ? Pick<RouterContextProvider, "get"> : Readonly<AppLoadContext>;
type InstrumentableRoute = {
id: string;
index: boolean | undefined;
path: string | undefined;
instrument(instrumentations: RouteInstrumentations): void;
};
type RouteInstrumentations = {
lazy?: InstrumentFunction<RouteLazyInstrumentationInfo>;
"lazy.loader"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
"lazy.action"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
"lazy.middleware"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
middleware?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
loader?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
action?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
};
type RouteLazyInstrumentationInfo = undefined;
type RouteHandlerInstrumentationInfo = Readonly<{
request: ReadonlyRequest;
params: LoaderFunctionArgs["params"];
unstable_pattern: string;
context: ReadonlyContext;
}>;
type InstrumentableRouter = {
instrument(instrumentations: RouterInstrumentations): void;
};
type RouterInstrumentations = {
navigate?: InstrumentFunction<RouterNavigationInstrumentationInfo>;
fetch?: InstrumentFunction<RouterFetchInstrumentationInfo>;
};
type RouterNavigationInstrumentationInfo = Readonly<{
to: string | number;
currentUrl: string;
formMethod?: HTMLFormMethod;
formEncType?: FormEncType;
formData?: FormData;
body?: any;
}>;
type RouterFetchInstrumentationInfo = Readonly<{
href: string;
currentUrl: string;
fetcherKey: string;
formMethod?: HTMLFormMethod;
formEncType?: FormEncType;
formData?: FormData;
body?: any;
}>;
type InstrumentableRequestHandler = {
instrument(instrumentations: RequestHandlerInstrumentations): void;
};
type RequestHandlerInstrumentations = {
request?: InstrumentFunction<RequestHandlerInstrumentationInfo>;
};
type RequestHandlerInstrumentationInfo = Readonly<{
request: ReadonlyRequest;
context: ReadonlyContext | undefined;
}>;
export { type BlockerFunction as B, type CreateStaticHandlerOptions as C, type Fetcher as F, type GetScrollPositionFunction as G, type HydrationState as H, IDLE_NAVIGATION as I, type Navigation as N, type RouterInit as R, type StaticHandler as S, type Router as a, type Blocker as b, type RelativeRoutingType as c, type RouterState as d, type GetScrollRestorationKeyFunction as e, type StaticHandlerContext as f, type NavigationStates as g, type RouterSubscriber as h, type RouterNavigateOptions as i, type RouterFetchOptions as j, type RevalidationState as k, type unstable_ServerInstrumentation as l, type unstable_InstrumentRequestHandlerFunction as m, type unstable_InstrumentRouterFunction as n, type unstable_InstrumentRouteFunction as o, type unstable_InstrumentationHandlerResult as p, IDLE_FETCHER as q, IDLE_BLOCKER as r, createRouter as s, type FutureConfig as t, type unstable_ClientInstrumentation as u };

View File

@ -0,0 +1,184 @@
import { R as RouteModule, e as LinkDescriptor, L as Location, F as Func, f as Pretty, g as MetaDescriptor, G as GetLoaderData, h as ServerDataFunctionArgs, i as MiddlewareNextFunction, j as ClientDataFunctionArgs, D as DataStrategyResult, k as ServerDataFrom, N as Normalize, l as GetActionData } from '../../routeModules-BRrCYrSL.mjs';
import { R as RouteFiles, P as Pages } from '../../register-CTxsJBKQ.mjs';
import 'react';
type MaybePromise<T> = T | Promise<T>;
type Props = {
params: unknown;
loaderData: unknown;
actionData: unknown;
};
type RouteInfo = Props & {
module: RouteModule;
matches: Array<MatchInfo>;
};
type MatchInfo = {
id: string;
module: RouteModule;
};
type MetaMatch<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
meta: MetaDescriptor[];
/** @deprecated Use `MetaMatch.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle?: unknown;
error?: unknown;
}>;
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
ErrorBoundary: Func;
} ? true : false;
type CreateMetaArgs<T extends RouteInfo> = {
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
location: Location;
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
params: T["params"];
/**
* The return value for this route's server loader function
*
* @deprecated Use `Route.MetaArgs.loaderData` instead
*/
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** The return value for this route's server loader function */
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
error?: unknown;
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
matches: MetaMatches<T["matches"]>;
};
type MetaDescriptors = MetaDescriptor[];
type HeadersArgs = {
loaderHeaders: Headers;
parentHeaders: Headers;
actionHeaders: Headers;
errorHeaders: Headers | undefined;
};
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
};
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
};
type CreateHydrateFallbackProps<T extends RouteInfo, RSCEnabled extends boolean> = {
params: T["params"];
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type Match<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
/** @deprecated Use `Match.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle: unknown;
}>;
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export default function Component({
* params,
* }: Route.ComponentProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
matches: Matches<T["matches"]>;
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type CreateErrorBoundaryProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function ErrorBoundary({
* params,
* }: Route.ErrorBoundaryProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
error: unknown;
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type GetAnnotations<Info extends RouteInfo> = {
LinkDescriptors: LinkDescriptor[];
LinksFunction: () => LinkDescriptor[];
MetaArgs: CreateMetaArgs<Info>;
MetaDescriptors: MetaDescriptors;
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
HeadersArgs: HeadersArgs;
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
LoaderArgs: CreateServerLoaderArgs<Info>;
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
ActionArgs: CreateServerActionArgs<Info>;
ClientActionArgs: CreateClientActionArgs<Info>;
HydrateFallbackProps: CreateHydrateFallbackProps<Info, false>;
ServerHydrateFallbackProps: CreateHydrateFallbackProps<Info, true>;
ComponentProps: CreateComponentProps<Info, false>;
ServerComponentProps: CreateComponentProps<Info, true>;
ErrorBoundaryProps: CreateErrorBoundaryProps<Info, false>;
ServerErrorBoundaryProps: CreateErrorBoundaryProps<Info, true>;
};
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
type GetInfo<T extends {
file: keyof RouteFiles;
module: RouteModule;
}> = {
params: Params<T["file"]>;
loaderData: GetLoaderData<T["module"]>;
actionData: GetActionData<T["module"]>;
};
export type { GetAnnotations, GetInfo };

View File

@ -0,0 +1,184 @@
import { R as RouteModule, t as LinkDescriptor, L as Location, u as Func, v as Pretty, w as MetaDescriptor, G as GetLoaderData, x as ServerDataFunctionArgs, y as MiddlewareNextFunction, z as ClientDataFunctionArgs, B as DataStrategyResult, E as ServerDataFrom, N as Normalize, I as GetActionData } from '../../routeModules-CA7kSxJJ.js';
import { R as RouteFiles, P as Pages } from '../../register-CkcGwv27.js';
import 'react';
type MaybePromise<T> = T | Promise<T>;
type Props = {
params: unknown;
loaderData: unknown;
actionData: unknown;
};
type RouteInfo = Props & {
module: RouteModule;
matches: Array<MatchInfo>;
};
type MatchInfo = {
id: string;
module: RouteModule;
};
type MetaMatch<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
meta: MetaDescriptor[];
/** @deprecated Use `MetaMatch.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle?: unknown;
error?: unknown;
}>;
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
ErrorBoundary: Func;
} ? true : false;
type CreateMetaArgs<T extends RouteInfo> = {
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
location: Location;
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
params: T["params"];
/**
* The return value for this route's server loader function
*
* @deprecated Use `Route.MetaArgs.loaderData` instead
*/
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** The return value for this route's server loader function */
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
error?: unknown;
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
matches: MetaMatches<T["matches"]>;
};
type MetaDescriptors = MetaDescriptor[];
type HeadersArgs = {
loaderHeaders: Headers;
parentHeaders: Headers;
actionHeaders: Headers;
errorHeaders: Headers | undefined;
};
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
};
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
};
type CreateHydrateFallbackProps<T extends RouteInfo, RSCEnabled extends boolean> = {
params: T["params"];
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type Match<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
/** @deprecated Use `Match.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle: unknown;
}>;
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export default function Component({
* params,
* }: Route.ComponentProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
matches: Matches<T["matches"]>;
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type CreateErrorBoundaryProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function ErrorBoundary({
* params,
* }: Route.ErrorBoundaryProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
error: unknown;
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type GetAnnotations<Info extends RouteInfo> = {
LinkDescriptors: LinkDescriptor[];
LinksFunction: () => LinkDescriptor[];
MetaArgs: CreateMetaArgs<Info>;
MetaDescriptors: MetaDescriptors;
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
HeadersArgs: HeadersArgs;
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
LoaderArgs: CreateServerLoaderArgs<Info>;
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
ActionArgs: CreateServerActionArgs<Info>;
ClientActionArgs: CreateClientActionArgs<Info>;
HydrateFallbackProps: CreateHydrateFallbackProps<Info, false>;
ServerHydrateFallbackProps: CreateHydrateFallbackProps<Info, true>;
ComponentProps: CreateComponentProps<Info, false>;
ServerComponentProps: CreateComponentProps<Info, true>;
ErrorBoundaryProps: CreateErrorBoundaryProps<Info, false>;
ServerErrorBoundaryProps: CreateErrorBoundaryProps<Info, true>;
};
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
type GetInfo<T extends {
file: keyof RouteFiles;
module: RouteModule;
}> = {
params: Params<T["file"]>;
loaderData: GetLoaderData<T["module"]>;
actionData: GetActionData<T["module"]>;
};
export type { GetAnnotations, GetInfo };

View File

@ -0,0 +1,10 @@
"use strict";/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

View File

@ -0,0 +1,10 @@
/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

View File

@ -0,0 +1,30 @@
import { R as RouteModule } from './routeModules-BRrCYrSL.mjs';
/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, string | undefined>;
type AnyPages = Record<string, {
params: AnyParams;
}>;
type Pages = Register extends {
pages: infer Registered extends AnyPages;
} ? Registered : AnyPages;
type AnyRouteFiles = Record<string, {
id: string;
page: string;
}>;
type RouteFiles = Register extends {
routeFiles: infer Registered extends AnyRouteFiles;
} ? Registered : AnyRouteFiles;
type AnyRouteModules = Record<string, RouteModule>;
type RouteModules = Register extends {
routeModules: infer Registered extends AnyRouteModules;
} ? Registered : AnyRouteModules;
export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };

View File

@ -0,0 +1,30 @@
import { R as RouteModule } from './routeModules-CA7kSxJJ.js';
/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, string | undefined>;
type AnyPages = Record<string, {
params: AnyParams;
}>;
type Pages = Register extends {
pages: infer Registered extends AnyPages;
} ? Registered : AnyPages;
type AnyRouteFiles = Record<string, {
id: string;
page: string;
}>;
type RouteFiles = Register extends {
routeFiles: infer Registered extends AnyRouteFiles;
} ? Registered : AnyRouteFiles;
type AnyRouteModules = Record<string, RouteModule>;
type RouteModules = Register extends {
routeModules: infer Registered extends AnyRouteModules;
} ? Registered : AnyRouteModules;
export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,318 @@
import * as React from 'react';
import { R as RouterInit } from './instrumentation-BYr6ff5D.js';
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './routeModules-CA7kSxJJ.js';
declare function getRequest(): Request;
type RSCRouteConfigEntryBase = {
action?: ActionFunction;
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
ErrorBoundary?: React.ComponentType<any>;
handle?: any;
headers?: HeadersFunction;
HydrateFallback?: React.ComponentType<any>;
Layout?: React.ComponentType<any>;
links?: LinksFunction;
loader?: LoaderFunction;
meta?: MetaFunction;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteConfigEntry = RSCRouteConfigEntryBase & {
id: string;
path?: string;
Component?: React.ComponentType<any>;
lazy?: () => Promise<RSCRouteConfigEntryBase & ({
default?: React.ComponentType<any>;
Component?: never;
} | {
default?: never;
Component?: React.ComponentType<any>;
})>;
} & ({
index: true;
} | {
children?: RSCRouteConfigEntry[];
});
type RSCRouteConfig = Array<RSCRouteConfigEntry>;
type RSCRouteManifest = {
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
element?: React.ReactElement | false;
errorElement?: React.ReactElement;
handle?: any;
hasAction: boolean;
hasComponent: boolean;
hasErrorBoundary: boolean;
hasLoader: boolean;
hydrateFallbackElement?: React.ReactElement;
id: string;
index?: boolean;
links?: LinksFunction;
meta?: MetaFunction;
parentId?: string;
path?: string;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteMatch = RSCRouteManifest & {
params: Params;
pathname: string;
pathnameBase: string;
};
type RSCRenderPayload = {
type: "render";
actionData: Record<string, any> | null;
basename: string | undefined;
errors: Record<string, any> | null;
loaderData: Record<string, any>;
location: Location;
routeDiscovery: RouteDiscovery;
matches: RSCRouteMatch[];
patches?: Promise<RSCRouteManifest[]>;
nonce?: string;
formState?: unknown;
};
type RSCManifestPayload = {
type: "manifest";
patches: Promise<RSCRouteManifest[]>;
};
type RSCActionPayload = {
type: "action";
actionResult: Promise<unknown>;
rerender?: Promise<RSCRenderPayload | RSCRedirectPayload>;
};
type RSCRedirectPayload = {
type: "redirect";
status: number;
location: string;
replace: boolean;
reload: boolean;
actionResult?: Promise<unknown>;
};
type RSCPayload = RSCRenderPayload | RSCManifestPayload | RSCActionPayload | RSCRedirectPayload;
type RSCMatch = {
statusCode: number;
headers: Headers;
payload: RSCPayload;
};
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
type DecodeReplyFunction = (reply: FormData | string, options: {
temporaryReferences: unknown;
}) => Promise<unknown[]>;
type LoadServerActionFunction = (id: string) => Promise<Function>;
type RouteDiscovery = {
mode: "lazy";
manifestPath?: string | undefined;
} | {
mode: "initial";
};
/**
* Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* and returns an [RSC](https://react.dev/reference/rsc/server-components)
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
* enabled client router.
*
* @example
* import {
* createTemporaryReferenceSet,
* decodeAction,
* decodeReply,
* loadServerAction,
* renderToReadableStream,
* } from "@vitejs/plugin-rsc/rsc";
* import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
*
* matchRSCServerRequest({
* createTemporaryReferenceSet,
* decodeAction,
* decodeFormState,
* decodeReply,
* loadServerAction,
* request,
* routes: routes(),
* generateResponse(match) {
* return new Response(
* renderToReadableStream(match.payload),
* {
* status: match.statusCode,
* headers: match.headers,
* }
* );
* },
* });
*
* @name unstable_matchRSCServerRequest
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.allowedActionOrigins Origin patterns that are allowed to execute actions.
* @param opts.basename The basename to use when matching the request.
* @param opts.createTemporaryReferenceSet A function that returns a temporary
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
* stream.
* @param opts.decodeAction Your `react-server-dom-xyz/server`'s `decodeAction`
* function, responsible for loading a server action.
* @param opts.decodeFormState A function responsible for decoding form state for
* progressively enhanceable forms with React's [`useActionState`](https://react.dev/reference/react/useActionState)
* using your `react-server-dom-xyz/server`'s `decodeFormState`.
* @param opts.decodeReply Your `react-server-dom-xyz/server`'s `decodeReply`
* function, used to decode the server function's arguments and bind them to the
* implementation for invocation by the router.
* @param opts.generateResponse A function responsible for using your
* `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding the {@link unstable_RSCPayload}.
* @param opts.loadServerAction Your `react-server-dom-xyz/server`'s
* `loadServerAction` function, used to load a server action by ID.
* @param opts.onError An optional error handler that will be called with any
* errors that occur during the request processing.
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* to match against.
* @param opts.requestContext An instance of {@link RouterContextProvider}
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* @param opts.routeDiscovery The route discovery configuration, used to determine how the router should discover new routes during navigations.
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
* data for hydration.
*/
declare function matchRSCServerRequest({ allowedActionOrigins, createTemporaryReferenceSet, basename, decodeReply, requestContext, routeDiscovery, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
allowedActionOrigins?: string[];
createTemporaryReferenceSet: () => unknown;
basename?: string;
decodeReply?: DecodeReplyFunction;
decodeAction?: DecodeActionFunction;
decodeFormState?: DecodeFormStateFunction;
requestContext?: RouterContextProvider;
loadServerAction?: LoadServerActionFunction;
onError?: (error: unknown) => void;
request: Request;
routes: RSCRouteConfigEntry[];
routeDiscovery?: RouteDiscovery;
generateResponse: (match: RSCMatch, { onError, temporaryReferences, }: {
onError(error: unknown): string | undefined;
temporaryReferences: unknown;
}) => Response;
}): Promise<Response>;
type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
temporaryReferences: unknown;
}) => Promise<unknown>;
type EncodeReplyFunction = (args: unknown[], options: {
temporaryReferences: unknown;
}) => Promise<BodyInit>;
/**
* Create a React `callServer` implementation for React Router.
*
* @example
* import {
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* setServerCallback,
* } from "@vitejs/plugin-rsc/browser";
* import { unstable_createCallServer as createCallServer } from "react-router";
*
* setServerCallback(
* createCallServer({
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* })
* );
*
* @name unstable_createCallServer
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.createFromReadableStream Your `react-server-dom-xyz/client`'s
* `createFromReadableStream`. Used to decode payloads from the server.
* @param opts.createTemporaryReferenceSet A function that creates a temporary
* reference set for the [RSC](https://react.dev/reference/rsc/server-components)
* payload.
* @param opts.encodeReply Your `react-server-dom-xyz/client`'s `encodeReply`.
* Used when sending payloads to the server.
* @param opts.fetch Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
* implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
* @returns A function that can be used to call server actions.
*/
declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
createTemporaryReferenceSet: () => unknown;
encodeReply: EncodeReplyFunction;
fetch?: (request: Request) => Promise<Response>;
}): (id: string, args: unknown[]) => Promise<unknown>;
/**
* Props for the {@link unstable_RSCHydratedRouter} component.
*
* @name unstable_RSCHydratedRouterProps
* @category Types
*/
interface RSCHydratedRouterProps {
/**
* Your `react-server-dom-xyz/client`'s `createFromReadableStream` function,
* used to decode payloads from the server.
*/
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
/**
* Optional fetch implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
*/
fetch?: (request: Request) => Promise<Response>;
/**
* The decoded {@link unstable_RSCPayload} to hydrate.
*/
payload: RSCPayload;
/**
* A function that returns an {@link RouterContextProvider} instance
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* This function is called to generate a fresh `context` instance on each
* navigation or fetcher call.
*/
getContext?: RouterInit["getContext"];
}
/**
* Hydrates a server rendered {@link unstable_RSCPayload} in the browser.
*
* @example
* import { startTransition, StrictMode } from "react";
* import { hydrateRoot } from "react-dom/client";
* import {
* unstable_getRSCStream as getRSCStream,
* unstable_RSCHydratedRouter as RSCHydratedRouter,
* } from "react-router";
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
*
* createFromReadableStream(getRSCStream()).then((payload) =>
* startTransition(async () => {
* hydrateRoot(
* document,
* <StrictMode>
* <RSCHydratedRouter
* createFromReadableStream={createFromReadableStream}
* payload={payload}
* />
* </StrictMode>,
* { formState: await getFormState(payload) },
* );
* }),
* );
*
* @name unstable_RSCHydratedRouter
* @public
* @category RSC
* @mode data
* @param props Props
* @param {unstable_RSCHydratedRouterProps.createFromReadableStream} props.createFromReadableStream n/a
* @param {unstable_RSCHydratedRouterProps.fetch} props.fetch n/a
* @param {unstable_RSCHydratedRouterProps.getContext} props.getContext n/a
* @param {unstable_RSCHydratedRouterProps.payload} props.payload n/a
* @returns A hydrated {@link DataRouter} that can be used to navigate and
* render routes.
*/
declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, getContext, }: RSCHydratedRouterProps): React.JSX.Element;
export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, RSCHydratedRouter as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, createCallServer as c, type RSCManifestPayload as d, type RSCPayload as e, type RSCRenderPayload as f, getRequest as g, type RSCHydratedRouterProps as h, type RSCMatch as i, type RSCRouteManifest as j, type RSCRouteMatch as k, type RSCRouteConfigEntry as l, matchRSCServerRequest as m, type RSCRouteConfig as n };

View File

@ -0,0 +1,318 @@
import * as React from 'react';
import { R as RouterInit } from './context-phCt_zmH.mjs';
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './routeModules-BRrCYrSL.mjs';
declare function getRequest(): Request;
type RSCRouteConfigEntryBase = {
action?: ActionFunction;
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
ErrorBoundary?: React.ComponentType<any>;
handle?: any;
headers?: HeadersFunction;
HydrateFallback?: React.ComponentType<any>;
Layout?: React.ComponentType<any>;
links?: LinksFunction;
loader?: LoaderFunction;
meta?: MetaFunction;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteConfigEntry = RSCRouteConfigEntryBase & {
id: string;
path?: string;
Component?: React.ComponentType<any>;
lazy?: () => Promise<RSCRouteConfigEntryBase & ({
default?: React.ComponentType<any>;
Component?: never;
} | {
default?: never;
Component?: React.ComponentType<any>;
})>;
} & ({
index: true;
} | {
children?: RSCRouteConfigEntry[];
});
type RSCRouteConfig = Array<RSCRouteConfigEntry>;
type RSCRouteManifest = {
clientAction?: ClientActionFunction;
clientLoader?: ClientLoaderFunction;
element?: React.ReactElement | false;
errorElement?: React.ReactElement;
handle?: any;
hasAction: boolean;
hasComponent: boolean;
hasErrorBoundary: boolean;
hasLoader: boolean;
hydrateFallbackElement?: React.ReactElement;
id: string;
index?: boolean;
links?: LinksFunction;
meta?: MetaFunction;
parentId?: string;
path?: string;
shouldRevalidate?: ShouldRevalidateFunction;
};
type RSCRouteMatch = RSCRouteManifest & {
params: Params;
pathname: string;
pathnameBase: string;
};
type RSCRenderPayload = {
type: "render";
actionData: Record<string, any> | null;
basename: string | undefined;
errors: Record<string, any> | null;
loaderData: Record<string, any>;
location: Location;
routeDiscovery: RouteDiscovery;
matches: RSCRouteMatch[];
patches?: Promise<RSCRouteManifest[]>;
nonce?: string;
formState?: unknown;
};
type RSCManifestPayload = {
type: "manifest";
patches: Promise<RSCRouteManifest[]>;
};
type RSCActionPayload = {
type: "action";
actionResult: Promise<unknown>;
rerender?: Promise<RSCRenderPayload | RSCRedirectPayload>;
};
type RSCRedirectPayload = {
type: "redirect";
status: number;
location: string;
replace: boolean;
reload: boolean;
actionResult?: Promise<unknown>;
};
type RSCPayload = RSCRenderPayload | RSCManifestPayload | RSCActionPayload | RSCRedirectPayload;
type RSCMatch = {
statusCode: number;
headers: Headers;
payload: RSCPayload;
};
type DecodeActionFunction = (formData: FormData) => Promise<() => Promise<unknown>>;
type DecodeFormStateFunction = (result: unknown, formData: FormData) => unknown;
type DecodeReplyFunction = (reply: FormData | string, options: {
temporaryReferences: unknown;
}) => Promise<unknown[]>;
type LoadServerActionFunction = (id: string) => Promise<Function>;
type RouteDiscovery = {
mode: "lazy";
manifestPath?: string | undefined;
} | {
mode: "initial";
};
/**
* Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* and returns an [RSC](https://react.dev/reference/rsc/server-components)
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding an {@link unstable_RSCPayload} for consumption by an [RSC](https://react.dev/reference/rsc/server-components)
* enabled client router.
*
* @example
* import {
* createTemporaryReferenceSet,
* decodeAction,
* decodeReply,
* loadServerAction,
* renderToReadableStream,
* } from "@vitejs/plugin-rsc/rsc";
* import { unstable_matchRSCServerRequest as matchRSCServerRequest } from "react-router";
*
* matchRSCServerRequest({
* createTemporaryReferenceSet,
* decodeAction,
* decodeFormState,
* decodeReply,
* loadServerAction,
* request,
* routes: routes(),
* generateResponse(match) {
* return new Response(
* renderToReadableStream(match.payload),
* {
* status: match.statusCode,
* headers: match.headers,
* }
* );
* },
* });
*
* @name unstable_matchRSCServerRequest
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.allowedActionOrigins Origin patterns that are allowed to execute actions.
* @param opts.basename The basename to use when matching the request.
* @param opts.createTemporaryReferenceSet A function that returns a temporary
* reference set for the request, used to track temporary references in the [RSC](https://react.dev/reference/rsc/server-components)
* stream.
* @param opts.decodeAction Your `react-server-dom-xyz/server`'s `decodeAction`
* function, responsible for loading a server action.
* @param opts.decodeFormState A function responsible for decoding form state for
* progressively enhanceable forms with React's [`useActionState`](https://react.dev/reference/react/useActionState)
* using your `react-server-dom-xyz/server`'s `decodeFormState`.
* @param opts.decodeReply Your `react-server-dom-xyz/server`'s `decodeReply`
* function, used to decode the server function's arguments and bind them to the
* implementation for invocation by the router.
* @param opts.generateResponse A function responsible for using your
* `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* encoding the {@link unstable_RSCPayload}.
* @param opts.loadServerAction Your `react-server-dom-xyz/server`'s
* `loadServerAction` function, used to load a server action by ID.
* @param opts.onError An optional error handler that will be called with any
* errors that occur during the request processing.
* @param opts.request The [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
* to match against.
* @param opts.requestContext An instance of {@link RouterContextProvider}
* that should be created per request, to be passed to [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* @param opts.routeDiscovery The route discovery configuration, used to determine how the router should discover new routes during navigations.
* @param opts.routes Your {@link unstable_RSCRouteConfigEntry | route definitions}.
* @returns A [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
* data for hydration.
*/
declare function matchRSCServerRequest({ allowedActionOrigins, createTemporaryReferenceSet, basename, decodeReply, requestContext, routeDiscovery, loadServerAction, decodeAction, decodeFormState, onError, request, routes, generateResponse, }: {
allowedActionOrigins?: string[];
createTemporaryReferenceSet: () => unknown;
basename?: string;
decodeReply?: DecodeReplyFunction;
decodeAction?: DecodeActionFunction;
decodeFormState?: DecodeFormStateFunction;
requestContext?: RouterContextProvider;
loadServerAction?: LoadServerActionFunction;
onError?: (error: unknown) => void;
request: Request;
routes: RSCRouteConfigEntry[];
routeDiscovery?: RouteDiscovery;
generateResponse: (match: RSCMatch, { onError, temporaryReferences, }: {
onError(error: unknown): string | undefined;
temporaryReferences: unknown;
}) => Response;
}): Promise<Response>;
type BrowserCreateFromReadableStreamFunction = (body: ReadableStream<Uint8Array>, { temporaryReferences, }: {
temporaryReferences: unknown;
}) => Promise<unknown>;
type EncodeReplyFunction = (args: unknown[], options: {
temporaryReferences: unknown;
}) => Promise<BodyInit>;
/**
* Create a React `callServer` implementation for React Router.
*
* @example
* import {
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* setServerCallback,
* } from "@vitejs/plugin-rsc/browser";
* import { unstable_createCallServer as createCallServer } from "react-router";
*
* setServerCallback(
* createCallServer({
* createFromReadableStream,
* createTemporaryReferenceSet,
* encodeReply,
* })
* );
*
* @name unstable_createCallServer
* @public
* @category RSC
* @mode data
* @param opts Options
* @param opts.createFromReadableStream Your `react-server-dom-xyz/client`'s
* `createFromReadableStream`. Used to decode payloads from the server.
* @param opts.createTemporaryReferenceSet A function that creates a temporary
* reference set for the [RSC](https://react.dev/reference/rsc/server-components)
* payload.
* @param opts.encodeReply Your `react-server-dom-xyz/client`'s `encodeReply`.
* Used when sending payloads to the server.
* @param opts.fetch Optional [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
* implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
* @returns A function that can be used to call server actions.
*/
declare function createCallServer({ createFromReadableStream, createTemporaryReferenceSet, encodeReply, fetch: fetchImplementation, }: {
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
createTemporaryReferenceSet: () => unknown;
encodeReply: EncodeReplyFunction;
fetch?: (request: Request) => Promise<Response>;
}): (id: string, args: unknown[]) => Promise<unknown>;
/**
* Props for the {@link unstable_RSCHydratedRouter} component.
*
* @name unstable_RSCHydratedRouterProps
* @category Types
*/
interface RSCHydratedRouterProps {
/**
* Your `react-server-dom-xyz/client`'s `createFromReadableStream` function,
* used to decode payloads from the server.
*/
createFromReadableStream: BrowserCreateFromReadableStreamFunction;
/**
* Optional fetch implementation. Defaults to global [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch).
*/
fetch?: (request: Request) => Promise<Response>;
/**
* The decoded {@link unstable_RSCPayload} to hydrate.
*/
payload: RSCPayload;
/**
* A function that returns an {@link RouterContextProvider} instance
* which is provided as the `context` argument to client [`action`](../../start/data/route-object#action)s,
* [`loader`](../../start/data/route-object#loader)s and [middleware](../../how-to/middleware).
* This function is called to generate a fresh `context` instance on each
* navigation or fetcher call.
*/
getContext?: RouterInit["getContext"];
}
/**
* Hydrates a server rendered {@link unstable_RSCPayload} in the browser.
*
* @example
* import { startTransition, StrictMode } from "react";
* import { hydrateRoot } from "react-dom/client";
* import {
* unstable_getRSCStream as getRSCStream,
* unstable_RSCHydratedRouter as RSCHydratedRouter,
* } from "react-router";
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
*
* createFromReadableStream(getRSCStream()).then((payload) =>
* startTransition(async () => {
* hydrateRoot(
* document,
* <StrictMode>
* <RSCHydratedRouter
* createFromReadableStream={createFromReadableStream}
* payload={payload}
* />
* </StrictMode>,
* { formState: await getFormState(payload) },
* );
* }),
* );
*
* @name unstable_RSCHydratedRouter
* @public
* @category RSC
* @mode data
* @param props Props
* @param {unstable_RSCHydratedRouterProps.createFromReadableStream} props.createFromReadableStream n/a
* @param {unstable_RSCHydratedRouterProps.fetch} props.fetch n/a
* @param {unstable_RSCHydratedRouterProps.getContext} props.getContext n/a
* @param {unstable_RSCHydratedRouterProps.payload} props.payload n/a
* @returns A hydrated {@link DataRouter} that can be used to navigate and
* render routes.
*/
declare function RSCHydratedRouter({ createFromReadableStream, fetch: fetchImplementation, payload, getContext, }: RSCHydratedRouterProps): React.JSX.Element;
export { type BrowserCreateFromReadableStreamFunction as B, type DecodeActionFunction as D, type EncodeReplyFunction as E, type LoadServerActionFunction as L, RSCHydratedRouter as R, type DecodeFormStateFunction as a, type DecodeReplyFunction as b, createCallServer as c, type RSCManifestPayload as d, type RSCPayload as e, type RSCRenderPayload as f, getRequest as g, type RSCHydratedRouterProps as h, type RSCMatch as i, type RSCRouteManifest as j, type RSCRouteMatch as k, type RSCRouteConfigEntry as l, matchRSCServerRequest as m, type RSCRouteConfig as n };

View File

@ -0,0 +1,188 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
var _chunk4TJ7T2OQjs = require('./chunk-4TJ7T2OQ.js');
// lib/dom/ssr/hydration.tsx
function getHydrationData({
state,
routes,
getRouteInfo,
location,
basename,
isSpaMode
}) {
let hydrationData = {
...state,
loaderData: { ...state.loaderData }
};
let initialMatches = _chunk4TJ7T2OQjs.matchRoutes.call(void 0, routes, location, basename);
if (initialMatches) {
for (let match of initialMatches) {
let routeId = match.route.id;
let routeInfo = getRouteInfo(routeId);
if (_chunk4TJ7T2OQjs.shouldHydrateRouteLoader.call(void 0,
routeId,
routeInfo.clientLoader,
routeInfo.hasLoader,
isSpaMode
) && (routeInfo.hasHydrateFallback || !routeInfo.hasLoader)) {
delete hydrationData.loaderData[routeId];
} else if (!routeInfo.hasLoader) {
hydrationData.loaderData[routeId] = null;
}
}
}
return hydrationData;
}
// lib/rsc/errorBoundaries.tsx
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
var RSCRouterGlobalErrorBoundary = class extends _react2.default.Component {
constructor(props) {
super(props);
this.state = { error: null, location: props.location };
}
static getDerivedStateFromError(error) {
return { error };
}
static getDerivedStateFromProps(props, state) {
if (state.location !== props.location) {
return { error: null, location: props.location };
}
return { error: state.error, location: state.location };
}
render() {
if (this.state.error) {
return /* @__PURE__ */ _react2.default.createElement(
RSCDefaultRootErrorBoundaryImpl,
{
error: this.state.error,
renderAppShell: true
}
);
} else {
return this.props.children;
}
}
};
function ErrorWrapper({
renderAppShell,
title,
children
}) {
if (!renderAppShell) {
return children;
}
return /* @__PURE__ */ _react2.default.createElement("html", { lang: "en" }, /* @__PURE__ */ _react2.default.createElement("head", null, /* @__PURE__ */ _react2.default.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ _react2.default.createElement(
"meta",
{
name: "viewport",
content: "width=device-width,initial-scale=1,viewport-fit=cover"
}
), /* @__PURE__ */ _react2.default.createElement("title", null, title)), /* @__PURE__ */ _react2.default.createElement("body", null, /* @__PURE__ */ _react2.default.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, children)));
}
function RSCDefaultRootErrorBoundaryImpl({
error,
renderAppShell
}) {
console.error(error);
let heyDeveloper = /* @__PURE__ */ _react2.default.createElement(
"script",
{
dangerouslySetInnerHTML: {
__html: `
console.log(
"\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
);
`
}
}
);
if (_chunk4TJ7T2OQjs.isRouteErrorResponse.call(void 0, error)) {
return /* @__PURE__ */ _react2.default.createElement(
ErrorWrapper,
{
renderAppShell,
title: "Unhandled Thrown Response!"
},
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
_chunk4TJ7T2OQjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
);
}
let errorInstance;
if (error instanceof Error) {
errorInstance = error;
} else {
let errorString = error == null ? "Unknown Error" : typeof error === "object" && "toString" in error ? error.toString() : JSON.stringify(error);
errorInstance = new Error(errorString);
}
return /* @__PURE__ */ _react2.default.createElement(ErrorWrapper, { renderAppShell, title: "Application Error!" }, /* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ _react2.default.createElement(
"pre",
{
style: {
padding: "2rem",
background: "hsla(10, 50%, 50%, 0.1)",
color: "red",
overflow: "auto"
}
},
errorInstance.stack
), heyDeveloper);
}
function RSCDefaultRootErrorBoundary({
hasRootLayout
}) {
let error = _chunk4TJ7T2OQjs.useRouteError.call(void 0, );
if (hasRootLayout === void 0) {
throw new Error("Missing 'hasRootLayout' prop");
}
return /* @__PURE__ */ _react2.default.createElement(
RSCDefaultRootErrorBoundaryImpl,
{
renderAppShell: !hasRootLayout,
error
}
);
}
// lib/rsc/route-modules.ts
function createRSCRouteModules(payload) {
const routeModules = {};
for (const match of payload.matches) {
populateRSCRouteModules(routeModules, match);
}
return routeModules;
}
function populateRSCRouteModules(routeModules, matches) {
matches = Array.isArray(matches) ? matches : [matches];
for (const match of matches) {
routeModules[match.id] = {
links: match.links,
meta: match.meta,
default: noopComponent
};
}
}
var noopComponent = () => null;
exports.getHydrationData = getHydrationData; exports.RSCRouterGlobalErrorBoundary = RSCRouterGlobalErrorBoundary; exports.RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.createRSCRouteModules = createRSCRouteModules; exports.populateRSCRouteModules = populateRSCRouteModules;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,172 @@
import * as React from 'react';
import { a as RouterProviderProps$1, R as RouterInit, u as unstable_ClientInstrumentation, C as ClientOnErrorFunction } from './context-phCt_zmH.mjs';
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-vtIR1Kpe.mjs';
import './routeModules-BRrCYrSL.mjs';
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
/**
* Props for the {@link dom.HydratedRouter} component.
*
* @category Types
*/
interface HydratedRouterProps {
/**
* Context factory function to be passed through to {@link createBrowserRouter}.
* This function will be called to create a fresh `context` instance on each
* navigation/fetch and made available to
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* functions.
*/
getContext?: RouterInit["getContext"];
/**
* Array of instrumentation objects allowing you to instrument the router and
* individual routes prior to router initialization (and on any subsequently
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
* mostly useful for observability such as wrapping navigations, fetches,
* as well as route loaders/actions/middlewares with logging and/or performance
* tracing. See the [docs](../../how-to/instrumentation) for more information.
*
* ```tsx
* const logging = {
* router({ instrument }) {
* instrument({
* navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
* fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
* });
* },
* route({ instrument, id }) {
* instrument({
* middleware: (impl, { request }) => logExecution(
* `middleware ${request.url} (route ${id})`,
* impl
* ),
* loader: (impl, { request }) => logExecution(
* `loader ${request.url} (route ${id})`,
* impl
* ),
* action: (impl, { request }) => logExecution(
* `action ${request.url} (route ${id})`,
* impl
* ),
* })
* }
* };
*
* async function logExecution(label: string, impl: () => Promise<void>) {
* let start = performance.now();
* console.log(`start ${label}`);
* await impl();
* let duration = Math.round(performance.now() - start);
* console.log(`end ${label} (${duration}ms)`);
* }
*
* startTransition(() => {
* hydrateRoot(
* document,
* <HydratedRouter unstable_instrumentations={[logging]} />
* );
* });
* ```
*/
unstable_instrumentations?: unstable_ClientInstrumentation[];
/**
* An error handler function that will be called for any middleware, loader, action,
* or render errors that are encountered in your application. This is useful for
* logging or reporting errors instead of in the {@link ErrorBoundary} because it's not
* subject to re-rendering and will only run one time per error.
*
* The `errorInfo` parameter is passed along from
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
* and is only present for render errors.
*
* ```tsx
* <HydratedRouter onError=(error, info) => {
* let { location, params, unstable_pattern, errorInfo } = info;
* console.error(error, location, errorInfo);
* reportToErrorService(error, location, errorInfo);
* }} />
* ```
*/
onError?: ClientOnErrorFunction;
/**
* Control whether router state updates are internally wrapped in
* [`React.startTransition`](https://react.dev/reference/react/startTransition).
*
* - When left `undefined`, all state updates are wrapped in
* `React.startTransition`
* - This can lead to buggy behaviors if you are wrapping your own
* navigations/fetchers in `startTransition`.
* - When set to `true`, {@link Link} and {@link Form} navigations will be wrapped
* in `React.startTransition` and router state changes will be wrapped in
* `React.startTransition` and also sent through
* [`useOptimistic`](https://react.dev/reference/react/useOptimistic) to
* surface mid-navigation router state changes to the UI.
* - When set to `false`, the router will not leverage `React.startTransition` or
* `React.useOptimistic` on any navigations or state changes.
*
* For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
*/
unstable_useTransitions?: boolean;
}
/**
* Framework-mode router component to be used to hydrate a router from a
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
*
* @public
* @category Framework Routers
* @mode framework
* @param props Props
* @param {dom.HydratedRouterProps.getContext} props.getContext n/a
* @param {dom.HydratedRouterProps.onError} props.onError n/a
* @returns A React element that represents the hydrated application.
*/
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
declare global {
interface Window {
__FLIGHT_DATA: any[];
}
}
/**
* Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
* stream for hydration. Usually passed directly to your
* `react-server-dom-xyz/client`'s `createFromReadableStream`.
*
* @example
* import { startTransition, StrictMode } from "react";
* import { hydrateRoot } from "react-dom/client";
* import {
* unstable_getRSCStream as getRSCStream,
* unstable_RSCHydratedRouter as RSCHydratedRouter,
* } from "react-router";
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
*
* createFromReadableStream(getRSCStream()).then(
* (payload: RSCServerPayload) => {
* startTransition(async () => {
* hydrateRoot(
* document,
* <StrictMode>
* <RSCHydratedRouter {...props} />
* </StrictMode>,
* {
* // Options
* }
* );
* });
* }
* );
*
* @name unstable_getRSCStream
* @public
* @category RSC
* @mode data
* @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
* data for hydration.
*/
declare function getRSCStream(): ReadableStream;
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };

View File

@ -0,0 +1,173 @@
import * as React from 'react';
import { RouterProviderProps as RouterProviderProps$1, RouterInit, ClientOnErrorFunction } from 'react-router';
import { u as unstable_ClientInstrumentation } from './instrumentation-BYr6ff5D.js';
export { D as unstable_DecodeActionFunction, a as unstable_DecodeFormStateFunction, b as unstable_DecodeReplyFunction, R as unstable_RSCHydratedRouter, d as unstable_RSCManifestPayload, e as unstable_RSCPayload, f as unstable_RSCRenderPayload, c as unstable_createCallServer } from './browser-C9Ar1yxG.js';
import './routeModules-CA7kSxJJ.js';
type RouterProviderProps = Omit<RouterProviderProps$1, "flushSync">;
declare function RouterProvider(props: Omit<RouterProviderProps, "flushSync">): React.JSX.Element;
/**
* Props for the {@link dom.HydratedRouter} component.
*
* @category Types
*/
interface HydratedRouterProps {
/**
* Context factory function to be passed through to {@link createBrowserRouter}.
* This function will be called to create a fresh `context` instance on each
* navigation/fetch and made available to
* [`clientAction`](../../start/framework/route-module#clientAction)/[`clientLoader`](../../start/framework/route-module#clientLoader)
* functions.
*/
getContext?: RouterInit["getContext"];
/**
* Array of instrumentation objects allowing you to instrument the router and
* individual routes prior to router initialization (and on any subsequently
* added routes via `route.lazy` or `patchRoutesOnNavigation`). This is
* mostly useful for observability such as wrapping navigations, fetches,
* as well as route loaders/actions/middlewares with logging and/or performance
* tracing. See the [docs](../../how-to/instrumentation) for more information.
*
* ```tsx
* const logging = {
* router({ instrument }) {
* instrument({
* navigate: (impl, { to }) => logExecution(`navigate ${to}`, impl),
* fetch: (impl, { to }) => logExecution(`fetch ${to}`, impl)
* });
* },
* route({ instrument, id }) {
* instrument({
* middleware: (impl, { request }) => logExecution(
* `middleware ${request.url} (route ${id})`,
* impl
* ),
* loader: (impl, { request }) => logExecution(
* `loader ${request.url} (route ${id})`,
* impl
* ),
* action: (impl, { request }) => logExecution(
* `action ${request.url} (route ${id})`,
* impl
* ),
* })
* }
* };
*
* async function logExecution(label: string, impl: () => Promise<void>) {
* let start = performance.now();
* console.log(`start ${label}`);
* await impl();
* let duration = Math.round(performance.now() - start);
* console.log(`end ${label} (${duration}ms)`);
* }
*
* startTransition(() => {
* hydrateRoot(
* document,
* <HydratedRouter unstable_instrumentations={[logging]} />
* );
* });
* ```
*/
unstable_instrumentations?: unstable_ClientInstrumentation[];
/**
* An error handler function that will be called for any middleware, loader, action,
* or render errors that are encountered in your application. This is useful for
* logging or reporting errors instead of in the {@link ErrorBoundary} because it's not
* subject to re-rendering and will only run one time per error.
*
* The `errorInfo` parameter is passed along from
* [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
* and is only present for render errors.
*
* ```tsx
* <HydratedRouter onError=(error, info) => {
* let { location, params, unstable_pattern, errorInfo } = info;
* console.error(error, location, errorInfo);
* reportToErrorService(error, location, errorInfo);
* }} />
* ```
*/
onError?: ClientOnErrorFunction;
/**
* Control whether router state updates are internally wrapped in
* [`React.startTransition`](https://react.dev/reference/react/startTransition).
*
* - When left `undefined`, all state updates are wrapped in
* `React.startTransition`
* - This can lead to buggy behaviors if you are wrapping your own
* navigations/fetchers in `startTransition`.
* - When set to `true`, {@link Link} and {@link Form} navigations will be wrapped
* in `React.startTransition` and router state changes will be wrapped in
* `React.startTransition` and also sent through
* [`useOptimistic`](https://react.dev/reference/react/useOptimistic) to
* surface mid-navigation router state changes to the UI.
* - When set to `false`, the router will not leverage `React.startTransition` or
* `React.useOptimistic` on any navigations or state changes.
*
* For more information, please see the [docs](https://reactrouter.com/explanation/react-transitions).
*/
unstable_useTransitions?: boolean;
}
/**
* Framework-mode router component to be used to hydrate a router from a
* {@link ServerRouter}. See [`entry.client.tsx`](../framework-conventions/entry.client.tsx).
*
* @public
* @category Framework Routers
* @mode framework
* @param props Props
* @param {dom.HydratedRouterProps.getContext} props.getContext n/a
* @param {dom.HydratedRouterProps.onError} props.onError n/a
* @returns A React element that represents the hydrated application.
*/
declare function HydratedRouter(props: HydratedRouterProps): React.JSX.Element;
declare global {
interface Window {
__FLIGHT_DATA: any[];
}
}
/**
* Get the prerendered [RSC](https://react.dev/reference/rsc/server-components)
* stream for hydration. Usually passed directly to your
* `react-server-dom-xyz/client`'s `createFromReadableStream`.
*
* @example
* import { startTransition, StrictMode } from "react";
* import { hydrateRoot } from "react-dom/client";
* import {
* unstable_getRSCStream as getRSCStream,
* unstable_RSCHydratedRouter as RSCHydratedRouter,
* } from "react-router";
* import type { unstable_RSCPayload as RSCPayload } from "react-router";
*
* createFromReadableStream(getRSCStream()).then(
* (payload: RSCServerPayload) => {
* startTransition(async () => {
* hydrateRoot(
* document,
* <StrictMode>
* <RSCHydratedRouter {...props} />
* </StrictMode>,
* {
* // Options
* }
* );
* });
* }
* );
*
* @name unstable_getRSCStream
* @public
* @category RSC
* @mode data
* @returns A [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
* that contains the [RSC](https://react.dev/reference/rsc/server-components)
* data for hydration.
*/
declare function getRSCStream(): ReadableStream;
export { HydratedRouter, type HydratedRouterProps, RouterProvider, type RouterProviderProps, getRSCStream as unstable_getRSCStream };

1021
node_modules/react-router/dist/production/dom-export.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

1013
node_modules/react-router/dist/production/dom-export.mjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
export { Q as MemoryRouter, T as Navigate, U as Outlet, V as Route, W as Router, X as RouterProvider, Y as Routes, A as UNSAFE_AwaitContextProvider, ab as UNSAFE_WithComponentProps, af as UNSAFE_WithErrorBoundaryProps, ad as UNSAFE_WithHydrateFallbackProps } from './context-phCt_zmH.mjs';
export { l as BrowserRouter, q as Form, m as HashRouter, n as Link, X as Links, W as Meta, p as NavLink, r as ScrollRestoration, T as StaticRouter, V as StaticRouterProvider, o as unstable_HistoryRouter } from './index-react-server-client-BwWaHAr3.mjs';
import './routeModules-BRrCYrSL.mjs';
import 'react';

View File

@ -0,0 +1,4 @@
export { W as BrowserRouter, $ as Form, X as HashRouter, Y as Link, an as Links, j as MemoryRouter, am as Meta, _ as NavLink, k as Navigate, l as Outlet, m as Route, n as Router, o as RouterProvider, p as Routes, a0 as ScrollRestoration, ak as StaticRouter, al as StaticRouterProvider, b as UNSAFE_AwaitContextProvider, aH as UNSAFE_WithComponentProps, aL as UNSAFE_WithErrorBoundaryProps, aJ as UNSAFE_WithHydrateFallbackProps, Z as unstable_HistoryRouter } from './index-react-server-client-luDbagNU.js';
import './instrumentation-BYr6ff5D.js';
import './routeModules-CA7kSxJJ.js';
import 'react';

View File

@ -0,0 +1,61 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
"use client";
var _chunkFPT5DLVJjs = require('./chunk-FPT5DLVJ.js');
var _chunk4TJ7T2OQjs = require('./chunk-4TJ7T2OQ.js');
exports.BrowserRouter = _chunkFPT5DLVJjs.BrowserRouter; exports.Form = _chunkFPT5DLVJjs.Form; exports.HashRouter = _chunkFPT5DLVJjs.HashRouter; exports.Link = _chunkFPT5DLVJjs.Link; exports.Links = _chunk4TJ7T2OQjs.Links; exports.MemoryRouter = _chunk4TJ7T2OQjs.MemoryRouter; exports.Meta = _chunk4TJ7T2OQjs.Meta; exports.NavLink = _chunkFPT5DLVJjs.NavLink; exports.Navigate = _chunk4TJ7T2OQjs.Navigate; exports.Outlet = _chunk4TJ7T2OQjs.Outlet; exports.Route = _chunk4TJ7T2OQjs.Route; exports.Router = _chunk4TJ7T2OQjs.Router; exports.RouterProvider = _chunk4TJ7T2OQjs.RouterProvider; exports.Routes = _chunk4TJ7T2OQjs.Routes; exports.ScrollRestoration = _chunkFPT5DLVJjs.ScrollRestoration; exports.StaticRouter = _chunkFPT5DLVJjs.StaticRouter; exports.StaticRouterProvider = _chunkFPT5DLVJjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk4TJ7T2OQjs.AwaitContextProvider; exports.UNSAFE_WithComponentProps = _chunk4TJ7T2OQjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk4TJ7T2OQjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk4TJ7T2OQjs.WithHydrateFallbackProps; exports.unstable_HistoryRouter = _chunkFPT5DLVJjs.HistoryRouter;

View File

@ -0,0 +1,59 @@
/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
"use client";
import {
AwaitContextProvider,
BrowserRouter,
Form,
HashRouter,
HistoryRouter,
Link,
Links,
MemoryRouter,
Meta,
NavLink,
Navigate,
Outlet,
Route,
Router,
RouterProvider,
Routes,
ScrollRestoration,
StaticRouter,
StaticRouterProvider,
WithComponentProps,
WithErrorBoundaryProps,
WithHydrateFallbackProps
} from "./chunk-HZQGQD2X.mjs";
export {
BrowserRouter,
Form,
HashRouter,
Link,
Links,
MemoryRouter,
Meta,
NavLink,
Navigate,
Outlet,
Route,
Router,
RouterProvider,
Routes,
ScrollRestoration,
StaticRouter,
StaticRouterProvider,
AwaitContextProvider as UNSAFE_AwaitContextProvider,
WithComponentProps as UNSAFE_WithComponentProps,
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
HistoryRouter as unstable_HistoryRouter
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1390
node_modules/react-router/dist/production/index.d.mts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1390
node_modules/react-router/dist/production/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

2608
node_modules/react-router/dist/production/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

275
node_modules/react-router/dist/production/index.mjs generated vendored Normal file
View File

@ -0,0 +1,275 @@
/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
"use client";
import {
RSCDefaultRootErrorBoundary,
RSCStaticRouter,
ServerMode,
ServerRouter,
createCookie,
createCookieSessionStorage,
createMemorySessionStorage,
createRequestHandler,
createRoutesStub,
createSession,
createSessionStorage,
deserializeErrors,
getHydrationData,
href,
isCookie,
isSession,
routeRSCServerRequest,
setDevServerHooks
} from "./chunk-X5LK27NZ.mjs";
import {
Action,
Await,
AwaitContextProvider,
BrowserRouter,
DataRouterContext,
DataRouterStateContext,
ErrorResponseImpl,
FetchersContext,
Form,
FrameworkContext,
HashRouter,
HistoryRouter,
IDLE_BLOCKER,
IDLE_FETCHER,
IDLE_NAVIGATION,
Link,
Links,
LocationContext,
MemoryRouter,
Meta,
NavLink,
Navigate,
NavigationContext,
Outlet,
PrefetchPageLinks,
RemixErrorBoundary,
Route,
RouteContext,
Router,
RouterContextProvider,
RouterProvider,
Routes,
Scripts,
ScrollRestoration,
SingleFetchRedirectSymbol,
StaticRouter,
StaticRouterProvider,
ViewTransitionContext,
WithComponentProps,
WithErrorBoundaryProps,
WithHydrateFallbackProps,
createBrowserHistory,
createBrowserRouter,
createClientRoutes,
createClientRoutesWithHMRRevalidationOptOut,
createContext,
createHashHistory,
createHashRouter,
createMemoryHistory,
createMemoryRouter,
createPath,
createRouter,
createRoutesFromChildren,
createRoutesFromElements,
createSearchParams,
createStaticHandler2 as createStaticHandler,
createStaticRouter,
data,
decodeViaTurboStream,
generatePath,
getPatchRoutesOnNavigationFunction,
getTurboStreamSingleFetchDataStrategy,
hydrationRouteProperties,
invariant,
isRouteErrorResponse,
mapRouteProperties,
matchPath,
matchRoutes,
parsePath,
redirect,
redirectDocument,
renderMatches,
replace,
resolvePath,
shouldHydrateRouteLoader,
useActionData,
useAsyncError,
useAsyncValue,
useBeforeUnload,
useBlocker,
useFetcher,
useFetchers,
useFogOFWarDiscovery,
useFormAction,
useHref,
useInRouterContext,
useLinkClickHandler,
useLoaderData,
useLocation,
useMatch,
useMatches,
useNavigate,
useNavigation,
useNavigationType,
useOutlet,
useOutletContext,
useParams,
usePrompt,
useResolvedPath,
useRevalidator,
useRoute,
useRouteError,
useRouteLoaderData,
useRoutes,
useScrollRestoration,
useSearchParams,
useSubmit,
useViewTransitionState,
withComponentProps,
withErrorBoundaryProps,
withHydrateFallbackProps
} from "./chunk-HZQGQD2X.mjs";
export {
Await,
BrowserRouter,
Form,
HashRouter,
IDLE_BLOCKER,
IDLE_FETCHER,
IDLE_NAVIGATION,
Link,
Links,
MemoryRouter,
Meta,
NavLink,
Navigate,
Action as NavigationType,
Outlet,
PrefetchPageLinks,
Route,
Router,
RouterContextProvider,
RouterProvider,
Routes,
Scripts,
ScrollRestoration,
ServerRouter,
StaticRouter,
StaticRouterProvider,
AwaitContextProvider as UNSAFE_AwaitContextProvider,
DataRouterContext as UNSAFE_DataRouterContext,
DataRouterStateContext as UNSAFE_DataRouterStateContext,
ErrorResponseImpl as UNSAFE_ErrorResponseImpl,
FetchersContext as UNSAFE_FetchersContext,
FrameworkContext as UNSAFE_FrameworkContext,
LocationContext as UNSAFE_LocationContext,
NavigationContext as UNSAFE_NavigationContext,
RSCDefaultRootErrorBoundary as UNSAFE_RSCDefaultRootErrorBoundary,
RemixErrorBoundary as UNSAFE_RemixErrorBoundary,
RouteContext as UNSAFE_RouteContext,
ServerMode as UNSAFE_ServerMode,
SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol,
ViewTransitionContext as UNSAFE_ViewTransitionContext,
WithComponentProps as UNSAFE_WithComponentProps,
WithErrorBoundaryProps as UNSAFE_WithErrorBoundaryProps,
WithHydrateFallbackProps as UNSAFE_WithHydrateFallbackProps,
createBrowserHistory as UNSAFE_createBrowserHistory,
createClientRoutes as UNSAFE_createClientRoutes,
createClientRoutesWithHMRRevalidationOptOut as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
createHashHistory as UNSAFE_createHashHistory,
createMemoryHistory as UNSAFE_createMemoryHistory,
createRouter as UNSAFE_createRouter,
decodeViaTurboStream as UNSAFE_decodeViaTurboStream,
deserializeErrors as UNSAFE_deserializeErrors,
getHydrationData as UNSAFE_getHydrationData,
getPatchRoutesOnNavigationFunction as UNSAFE_getPatchRoutesOnNavigationFunction,
getTurboStreamSingleFetchDataStrategy as UNSAFE_getTurboStreamSingleFetchDataStrategy,
hydrationRouteProperties as UNSAFE_hydrationRouteProperties,
invariant as UNSAFE_invariant,
mapRouteProperties as UNSAFE_mapRouteProperties,
shouldHydrateRouteLoader as UNSAFE_shouldHydrateRouteLoader,
useFogOFWarDiscovery as UNSAFE_useFogOFWarDiscovery,
useScrollRestoration as UNSAFE_useScrollRestoration,
withComponentProps as UNSAFE_withComponentProps,
withErrorBoundaryProps as UNSAFE_withErrorBoundaryProps,
withHydrateFallbackProps as UNSAFE_withHydrateFallbackProps,
createBrowserRouter,
createContext,
createCookie,
createCookieSessionStorage,
createHashRouter,
createMemoryRouter,
createMemorySessionStorage,
createPath,
createRequestHandler,
createRoutesFromChildren,
createRoutesFromElements,
createRoutesStub,
createSearchParams,
createSession,
createSessionStorage,
createStaticHandler,
createStaticRouter,
data,
generatePath,
href,
isCookie,
isRouteErrorResponse,
isSession,
matchPath,
matchRoutes,
parsePath,
redirect,
redirectDocument,
renderMatches,
replace,
resolvePath,
HistoryRouter as unstable_HistoryRouter,
RSCStaticRouter as unstable_RSCStaticRouter,
routeRSCServerRequest as unstable_routeRSCServerRequest,
setDevServerHooks as unstable_setDevServerHooks,
usePrompt as unstable_usePrompt,
useRoute as unstable_useRoute,
useActionData,
useAsyncError,
useAsyncValue,
useBeforeUnload,
useBlocker,
useFetcher,
useFetchers,
useFormAction,
useHref,
useInRouterContext,
useLinkClickHandler,
useLoaderData,
useLocation,
useMatch,
useMatches,
useNavigate,
useNavigation,
useNavigationType,
useOutlet,
useOutletContext,
useParams,
useResolvedPath,
useRevalidator,
useRouteError,
useRouteLoaderData,
useRoutes,
useSearchParams,
useSubmit,
useViewTransitionState
};

View File

@ -0,0 +1,657 @@
import { e as RouteObject, f as History, g as MaybePromise, c as RouterContextProvider, h as MapRoutePropertiesFunction, i as Action, L as Location, D as DataRouteMatch, j as Submission, k as RouteData, l as DataStrategyFunction, m as PatchRoutesOnNavigationFunction, n as DataRouteObject, U as UIMatch, T as To, o as HTMLFormMethod, F as FormEncType, p as Path, q as LoaderFunctionArgs, r as MiddlewareEnabled, s as AppLoadContext } from './routeModules-CA7kSxJJ.js';
/**
* A Router instance manages all navigation and data loading/mutations
*/
interface Router {
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the basename for the router
*/
get basename(): RouterInit["basename"];
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the future config for the router
*/
get future(): FutureConfig;
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the current state of the router
*/
get state(): RouterState;
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the routes for this router instance
*/
get routes(): DataRouteObject[];
/**
* @private
* PRIVATE - DO NOT USE
*
* Return the window associated with the router
*/
get window(): RouterInit["window"];
/**
* @private
* PRIVATE - DO NOT USE
*
* Initialize the router, including adding history listeners and kicking off
* initial data fetches. Returns a function to cleanup listeners and abort
* any in-progress loads
*/
initialize(): Router;
/**
* @private
* PRIVATE - DO NOT USE
*
* Subscribe to router.state updates
*
* @param fn function to call with the new state
*/
subscribe(fn: RouterSubscriber): () => void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Enable scroll restoration behavior in the router
*
* @param savedScrollPositions Object that will manage positions, in case
* it's being restored from sessionStorage
* @param getScrollPosition Function to get the active Y scroll position
* @param getKey Function to get the key to use for restoration
*/
enableScrollRestoration(savedScrollPositions: Record<string, number>, getScrollPosition: GetScrollPositionFunction, getKey?: GetScrollRestorationKeyFunction): () => void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Navigate forward/backward in the history stack
* @param to Delta to move in the history stack
*/
navigate(to: number): Promise<void>;
/**
* Navigate to the given path
* @param to Path to navigate to
* @param opts Navigation options (method, submission, etc.)
*/
navigate(to: To | null, opts?: RouterNavigateOptions): Promise<void>;
/**
* @private
* PRIVATE - DO NOT USE
*
* Trigger a fetcher load/submission
*
* @param key Fetcher key
* @param routeId Route that owns the fetcher
* @param href href to fetch
* @param opts Fetcher options, (method, submission, etc.)
*/
fetch(key: string, routeId: string, href: string | null, opts?: RouterFetchOptions): Promise<void>;
/**
* @private
* PRIVATE - DO NOT USE
*
* Trigger a revalidation of all current route loaders and fetcher loads
*/
revalidate(): Promise<void>;
/**
* @private
* PRIVATE - DO NOT USE
*
* Utility function to create an href for the given location
* @param location
*/
createHref(location: Location | URL): string;
/**
* @private
* PRIVATE - DO NOT USE
*
* Utility function to URL encode a destination path according to the internal
* history implementation
* @param to
*/
encodeLocation(to: To): Path;
/**
* @private
* PRIVATE - DO NOT USE
*
* Get/create a fetcher for the given key
* @param key
*/
getFetcher<TData = any>(key: string): Fetcher<TData>;
/**
* @internal
* PRIVATE - DO NOT USE
*
* Reset the fetcher for a given key
* @param key
*/
resetFetcher(key: string, opts?: {
reason?: unknown;
}): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Delete the fetcher for a given key
* @param key
*/
deleteFetcher(key: string): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Cleanup listeners and abort any in-progress loads
*/
dispose(): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Get a navigation blocker
* @param key The identifier for the blocker
* @param fn The blocker function implementation
*/
getBlocker(key: string, fn: BlockerFunction): Blocker;
/**
* @private
* PRIVATE - DO NOT USE
*
* Delete a navigation blocker
* @param key The identifier for the blocker
*/
deleteBlocker(key: string): void;
/**
* @private
* PRIVATE DO NOT USE
*
* Patch additional children routes into an existing parent route
* @param routeId The parent route id or a callback function accepting `patch`
* to perform batch patching
* @param children The additional children routes
* @param unstable_allowElementMutations Allow mutation or route elements on
* existing routes. Intended for RSC-usage
* only.
*/
patchRoutes(routeId: string | null, children: RouteObject[], unstable_allowElementMutations?: boolean): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* HMR needs to pass in-flight route updates to React Router
* TODO: Replace this with granular route update APIs (addRoute, updateRoute, deleteRoute)
*/
_internalSetRoutes(routes: RouteObject[]): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Cause subscribers to re-render. This is used to force a re-render.
*/
_internalSetStateDoNotUseOrYouWillBreakYourApp(state: Partial<RouterState>): void;
/**
* @private
* PRIVATE - DO NOT USE
*
* Internal fetch AbortControllers accessed by unit tests
*/
_internalFetchControllers: Map<string, AbortController>;
}
/**
* State maintained internally by the router. During a navigation, all states
* reflect the "old" location unless otherwise noted.
*/
interface RouterState {
/**
* The action of the most recent navigation
*/
historyAction: Action;
/**
* The current location reflected by the router
*/
location: Location;
/**
* The current set of route matches
*/
matches: DataRouteMatch[];
/**
* Tracks whether we've completed our initial data load
*/
initialized: boolean;
/**
* Tracks whether we should be rendering a HydrateFallback during hydration
*/
renderFallback: boolean;
/**
* Current scroll position we should start at for a new view
* - number -> scroll position to restore to
* - false -> do not restore scroll at all (used during submissions/revalidations)
* - null -> don't have a saved position, scroll to hash or top of page
*/
restoreScrollPosition: number | false | null;
/**
* Indicate whether this navigation should skip resetting the scroll position
* if we are unable to restore the scroll position
*/
preventScrollReset: boolean;
/**
* Tracks the state of the current navigation
*/
navigation: Navigation;
/**
* Tracks any in-progress revalidations
*/
revalidation: RevalidationState;
/**
* Data from the loaders for the current matches
*/
loaderData: RouteData;
/**
* Data from the action for the current matches
*/
actionData: RouteData | null;
/**
* Errors caught from loaders for the current matches
*/
errors: RouteData | null;
/**
* Map of current fetchers
*/
fetchers: Map<string, Fetcher>;
/**
* Map of current blockers
*/
blockers: Map<string, Blocker>;
}
/**
* Data that can be passed into hydrate a Router from SSR
*/
type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
/**
* Future flags to toggle new feature behavior
*/
interface FutureConfig {
unstable_passThroughRequests: boolean;
}
/**
* Initialization options for createRouter
*/
interface RouterInit {
routes: RouteObject[];
history: History;
basename?: string;
getContext?: () => MaybePromise<RouterContextProvider>;
unstable_instrumentations?: unstable_ClientInstrumentation[];
mapRouteProperties?: MapRoutePropertiesFunction;
future?: Partial<FutureConfig>;
hydrationRouteProperties?: string[];
hydrationData?: HydrationState;
window?: Window;
dataStrategy?: DataStrategyFunction;
patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
}
/**
* State returned from a server-side query() call
*/
interface StaticHandlerContext {
basename: Router["basename"];
location: RouterState["location"];
matches: RouterState["matches"];
loaderData: RouterState["loaderData"];
actionData: RouterState["actionData"];
errors: RouterState["errors"];
statusCode: number;
loaderHeaders: Record<string, Headers>;
actionHeaders: Record<string, Headers>;
_deepestRenderedBoundaryId?: string | null;
}
/**
* A StaticHandler instance manages a singular SSR navigation/fetch event
*/
interface StaticHandler {
dataRoutes: DataRouteObject[];
query(request: Request, opts?: {
requestContext?: unknown;
filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
skipLoaderErrorBubbling?: boolean;
skipRevalidation?: boolean;
dataStrategy?: DataStrategyFunction<unknown>;
generateMiddlewareResponse?: (query: (r: Request, args?: {
filterMatchesToLoad?: (match: DataRouteMatch) => boolean;
}) => Promise<StaticHandlerContext | Response>) => MaybePromise<Response>;
unstable_normalizePath?: (request: Request) => Path;
}): Promise<StaticHandlerContext | Response>;
queryRoute(request: Request, opts?: {
routeId?: string;
requestContext?: unknown;
dataStrategy?: DataStrategyFunction<unknown>;
generateMiddlewareResponse?: (queryRoute: (r: Request) => Promise<Response>) => MaybePromise<Response>;
unstable_normalizePath?: (request: Request) => Path;
}): Promise<any>;
}
type ViewTransitionOpts = {
currentLocation: Location;
nextLocation: Location;
};
/**
* Subscriber function signature for changes to router state
*/
interface RouterSubscriber {
(state: RouterState, opts: {
deletedFetchers: string[];
newErrors: RouteData | null;
viewTransitionOpts?: ViewTransitionOpts;
flushSync: boolean;
}): void;
}
/**
* Function signature for determining the key to be used in scroll restoration
* for a given location
*/
interface GetScrollRestorationKeyFunction {
(location: Location, matches: UIMatch[]): string | null;
}
/**
* Function signature for determining the current scroll position
*/
interface GetScrollPositionFunction {
(): number;
}
/**
* - "route": relative to the route hierarchy so `..` means remove all segments
* of the current route even if it has many. For example, a `route("posts/:id")`
* would have both `:id` and `posts` removed from the url.
* - "path": relative to the pathname so `..` means remove one segment of the
* pathname. For example, a `route("posts/:id")` would have only `:id` removed
* from the url.
*/
type RelativeRoutingType = "route" | "path";
type BaseNavigateOrFetchOptions = {
preventScrollReset?: boolean;
relative?: RelativeRoutingType;
flushSync?: boolean;
unstable_defaultShouldRevalidate?: boolean;
};
type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
replace?: boolean;
state?: any;
fromRouteId?: string;
viewTransition?: boolean;
unstable_mask?: To;
};
type BaseSubmissionOptions = {
formMethod?: HTMLFormMethod;
formEncType?: FormEncType;
} & ({
formData: FormData;
body?: undefined;
} | {
formData?: undefined;
body: any;
});
/**
* Options for a navigate() call for a normal (non-submission) navigation
*/
type LinkNavigateOptions = BaseNavigateOptions;
/**
* Options for a navigate() call for a submission navigation
*/
type SubmissionNavigateOptions = BaseNavigateOptions & BaseSubmissionOptions;
/**
* Options to pass to navigate() for a navigation
*/
type RouterNavigateOptions = LinkNavigateOptions | SubmissionNavigateOptions;
/**
* Options for a fetch() load
*/
type LoadFetchOptions = BaseNavigateOrFetchOptions;
/**
* Options for a fetch() submission
*/
type SubmitFetchOptions = BaseNavigateOrFetchOptions & BaseSubmissionOptions;
/**
* Options to pass to fetch()
*/
type RouterFetchOptions = LoadFetchOptions | SubmitFetchOptions;
/**
* Potential states for state.navigation
*/
type NavigationStates = {
Idle: {
state: "idle";
location: undefined;
formMethod: undefined;
formAction: undefined;
formEncType: undefined;
formData: undefined;
json: undefined;
text: undefined;
};
Loading: {
state: "loading";
location: Location;
formMethod: Submission["formMethod"] | undefined;
formAction: Submission["formAction"] | undefined;
formEncType: Submission["formEncType"] | undefined;
formData: Submission["formData"] | undefined;
json: Submission["json"] | undefined;
text: Submission["text"] | undefined;
};
Submitting: {
state: "submitting";
location: Location;
formMethod: Submission["formMethod"];
formAction: Submission["formAction"];
formEncType: Submission["formEncType"];
formData: Submission["formData"];
json: Submission["json"];
text: Submission["text"];
};
};
type Navigation = NavigationStates[keyof NavigationStates];
type RevalidationState = "idle" | "loading";
/**
* Potential states for fetchers
*/
type FetcherStates<TData = any> = {
/**
* The fetcher is not calling a loader or action
*
* ```tsx
* fetcher.state === "idle"
* ```
*/
Idle: {
state: "idle";
formMethod: undefined;
formAction: undefined;
formEncType: undefined;
text: undefined;
formData: undefined;
json: undefined;
/**
* If the fetcher has never been called, this will be undefined.
*/
data: TData | undefined;
};
/**
* The fetcher is loading data from a {@link LoaderFunction | loader} from a
* call to {@link FetcherWithComponents.load | `fetcher.load`}.
*
* ```tsx
* // somewhere
* <button onClick={() => fetcher.load("/some/route") }>Load</button>
*
* // the state will update
* fetcher.state === "loading"
* ```
*/
Loading: {
state: "loading";
formMethod: Submission["formMethod"] | undefined;
formAction: Submission["formAction"] | undefined;
formEncType: Submission["formEncType"] | undefined;
text: Submission["text"] | undefined;
formData: Submission["formData"] | undefined;
json: Submission["json"] | undefined;
data: TData | undefined;
};
/**
The fetcher is submitting to a {@link LoaderFunction} (GET) or {@link ActionFunction} (POST) from a {@link FetcherWithComponents.Form | `fetcher.Form`} or {@link FetcherWithComponents.submit | `fetcher.submit`}.
```tsx
// somewhere
<input
onChange={e => {
fetcher.submit(event.currentTarget.form, { method: "post" });
}}
/>
// the state will update
fetcher.state === "submitting"
// and formData will be available
fetcher.formData
```
*/
Submitting: {
state: "submitting";
formMethod: Submission["formMethod"];
formAction: Submission["formAction"];
formEncType: Submission["formEncType"];
text: Submission["text"];
formData: Submission["formData"];
json: Submission["json"];
data: TData | undefined;
};
};
type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
interface BlockerBlocked {
state: "blocked";
reset: () => void;
proceed: () => void;
location: Location;
}
interface BlockerUnblocked {
state: "unblocked";
reset: undefined;
proceed: undefined;
location: undefined;
}
interface BlockerProceeding {
state: "proceeding";
reset: undefined;
proceed: undefined;
location: Location;
}
type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;
type BlockerFunction = (args: {
currentLocation: Location;
nextLocation: Location;
historyAction: Action;
}) => boolean;
declare const IDLE_NAVIGATION: NavigationStates["Idle"];
declare const IDLE_FETCHER: FetcherStates["Idle"];
declare const IDLE_BLOCKER: BlockerUnblocked;
/**
* Create a router and listen to history POP navigations
*/
declare function createRouter(init: RouterInit): Router;
interface CreateStaticHandlerOptions {
basename?: string;
mapRouteProperties?: MapRoutePropertiesFunction;
unstable_instrumentations?: Pick<unstable_ServerInstrumentation, "route">[];
future?: Partial<FutureConfig>;
}
type unstable_ServerInstrumentation = {
handler?: unstable_InstrumentRequestHandlerFunction;
route?: unstable_InstrumentRouteFunction;
};
type unstable_ClientInstrumentation = {
router?: unstable_InstrumentRouterFunction;
route?: unstable_InstrumentRouteFunction;
};
type unstable_InstrumentRequestHandlerFunction = (handler: InstrumentableRequestHandler) => void;
type unstable_InstrumentRouterFunction = (router: InstrumentableRouter) => void;
type unstable_InstrumentRouteFunction = (route: InstrumentableRoute) => void;
type unstable_InstrumentationHandlerResult = {
status: "success";
error: undefined;
} | {
status: "error";
error: Error;
};
type InstrumentFunction<T> = (handler: () => Promise<unstable_InstrumentationHandlerResult>, info: T) => Promise<void>;
type ReadonlyRequest = {
method: string;
url: string;
headers: Pick<Headers, "get">;
};
type ReadonlyContext = MiddlewareEnabled extends true ? Pick<RouterContextProvider, "get"> : Readonly<AppLoadContext>;
type InstrumentableRoute = {
id: string;
index: boolean | undefined;
path: string | undefined;
instrument(instrumentations: RouteInstrumentations): void;
};
type RouteInstrumentations = {
lazy?: InstrumentFunction<RouteLazyInstrumentationInfo>;
"lazy.loader"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
"lazy.action"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
"lazy.middleware"?: InstrumentFunction<RouteLazyInstrumentationInfo>;
middleware?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
loader?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
action?: InstrumentFunction<RouteHandlerInstrumentationInfo>;
};
type RouteLazyInstrumentationInfo = undefined;
type RouteHandlerInstrumentationInfo = Readonly<{
request: ReadonlyRequest;
params: LoaderFunctionArgs["params"];
unstable_pattern: string;
context: ReadonlyContext;
}>;
type InstrumentableRouter = {
instrument(instrumentations: RouterInstrumentations): void;
};
type RouterInstrumentations = {
navigate?: InstrumentFunction<RouterNavigationInstrumentationInfo>;
fetch?: InstrumentFunction<RouterFetchInstrumentationInfo>;
};
type RouterNavigationInstrumentationInfo = Readonly<{
to: string | number;
currentUrl: string;
formMethod?: HTMLFormMethod;
formEncType?: FormEncType;
formData?: FormData;
body?: any;
}>;
type RouterFetchInstrumentationInfo = Readonly<{
href: string;
currentUrl: string;
fetcherKey: string;
formMethod?: HTMLFormMethod;
formEncType?: FormEncType;
formData?: FormData;
body?: any;
}>;
type InstrumentableRequestHandler = {
instrument(instrumentations: RequestHandlerInstrumentations): void;
};
type RequestHandlerInstrumentations = {
request?: InstrumentFunction<RequestHandlerInstrumentationInfo>;
};
type RequestHandlerInstrumentationInfo = Readonly<{
request: ReadonlyRequest;
context: ReadonlyContext | undefined;
}>;
export { type BlockerFunction as B, type CreateStaticHandlerOptions as C, type Fetcher as F, type GetScrollPositionFunction as G, type HydrationState as H, IDLE_NAVIGATION as I, type Navigation as N, type RouterInit as R, type StaticHandler as S, type Router as a, type Blocker as b, type RelativeRoutingType as c, type RouterState as d, type GetScrollRestorationKeyFunction as e, type StaticHandlerContext as f, type NavigationStates as g, type RouterSubscriber as h, type RouterNavigateOptions as i, type RouterFetchOptions as j, type RevalidationState as k, type unstable_ServerInstrumentation as l, type unstable_InstrumentRequestHandlerFunction as m, type unstable_InstrumentRouterFunction as n, type unstable_InstrumentRouteFunction as o, type unstable_InstrumentationHandlerResult as p, IDLE_FETCHER as q, IDLE_BLOCKER as r, createRouter as s, type FutureConfig as t, type unstable_ClientInstrumentation as u };

View File

@ -0,0 +1,184 @@
import { R as RouteModule, e as LinkDescriptor, L as Location, F as Func, f as Pretty, g as MetaDescriptor, G as GetLoaderData, h as ServerDataFunctionArgs, i as MiddlewareNextFunction, j as ClientDataFunctionArgs, D as DataStrategyResult, k as ServerDataFrom, N as Normalize, l as GetActionData } from '../../routeModules-BRrCYrSL.mjs';
import { R as RouteFiles, P as Pages } from '../../register-CTxsJBKQ.mjs';
import 'react';
type MaybePromise<T> = T | Promise<T>;
type Props = {
params: unknown;
loaderData: unknown;
actionData: unknown;
};
type RouteInfo = Props & {
module: RouteModule;
matches: Array<MatchInfo>;
};
type MatchInfo = {
id: string;
module: RouteModule;
};
type MetaMatch<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
meta: MetaDescriptor[];
/** @deprecated Use `MetaMatch.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle?: unknown;
error?: unknown;
}>;
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
ErrorBoundary: Func;
} ? true : false;
type CreateMetaArgs<T extends RouteInfo> = {
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
location: Location;
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
params: T["params"];
/**
* The return value for this route's server loader function
*
* @deprecated Use `Route.MetaArgs.loaderData` instead
*/
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** The return value for this route's server loader function */
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
error?: unknown;
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
matches: MetaMatches<T["matches"]>;
};
type MetaDescriptors = MetaDescriptor[];
type HeadersArgs = {
loaderHeaders: Headers;
parentHeaders: Headers;
actionHeaders: Headers;
errorHeaders: Headers | undefined;
};
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
};
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
};
type CreateHydrateFallbackProps<T extends RouteInfo, RSCEnabled extends boolean> = {
params: T["params"];
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type Match<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
/** @deprecated Use `Match.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle: unknown;
}>;
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export default function Component({
* params,
* }: Route.ComponentProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
matches: Matches<T["matches"]>;
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type CreateErrorBoundaryProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function ErrorBoundary({
* params,
* }: Route.ErrorBoundaryProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
error: unknown;
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type GetAnnotations<Info extends RouteInfo> = {
LinkDescriptors: LinkDescriptor[];
LinksFunction: () => LinkDescriptor[];
MetaArgs: CreateMetaArgs<Info>;
MetaDescriptors: MetaDescriptors;
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
HeadersArgs: HeadersArgs;
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
LoaderArgs: CreateServerLoaderArgs<Info>;
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
ActionArgs: CreateServerActionArgs<Info>;
ClientActionArgs: CreateClientActionArgs<Info>;
HydrateFallbackProps: CreateHydrateFallbackProps<Info, false>;
ServerHydrateFallbackProps: CreateHydrateFallbackProps<Info, true>;
ComponentProps: CreateComponentProps<Info, false>;
ServerComponentProps: CreateComponentProps<Info, true>;
ErrorBoundaryProps: CreateErrorBoundaryProps<Info, false>;
ServerErrorBoundaryProps: CreateErrorBoundaryProps<Info, true>;
};
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
type GetInfo<T extends {
file: keyof RouteFiles;
module: RouteModule;
}> = {
params: Params<T["file"]>;
loaderData: GetLoaderData<T["module"]>;
actionData: GetActionData<T["module"]>;
};
export type { GetAnnotations, GetInfo };

View File

@ -0,0 +1,184 @@
import { R as RouteModule, t as LinkDescriptor, L as Location, u as Func, v as Pretty, w as MetaDescriptor, G as GetLoaderData, x as ServerDataFunctionArgs, y as MiddlewareNextFunction, z as ClientDataFunctionArgs, B as DataStrategyResult, E as ServerDataFrom, N as Normalize, I as GetActionData } from '../../routeModules-CA7kSxJJ.js';
import { R as RouteFiles, P as Pages } from '../../register-CkcGwv27.js';
import 'react';
type MaybePromise<T> = T | Promise<T>;
type Props = {
params: unknown;
loaderData: unknown;
actionData: unknown;
};
type RouteInfo = Props & {
module: RouteModule;
matches: Array<MatchInfo>;
};
type MatchInfo = {
id: string;
module: RouteModule;
};
type MetaMatch<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
meta: MetaDescriptor[];
/** @deprecated Use `MetaMatch.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle?: unknown;
error?: unknown;
}>;
type MetaMatches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [MetaMatch<F>, ...MetaMatches<R>] : Array<MetaMatch<MatchInfo> | undefined>;
type HasErrorBoundary<T extends RouteInfo> = T["module"] extends {
ErrorBoundary: Func;
} ? true : false;
type CreateMetaArgs<T extends RouteInfo> = {
/** This is the current router `Location` object. This is useful for generating tags for routes at specific paths or query parameters. */
location: Location;
/** {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route. */
params: T["params"];
/**
* The return value for this route's server loader function
*
* @deprecated Use `Route.MetaArgs.loaderData` instead
*/
data: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** The return value for this route's server loader function */
loaderData: T["loaderData"] | (HasErrorBoundary<T> extends true ? undefined : never);
/** Thrown errors that trigger error boundaries will be passed to the meta function. This is useful for generating metadata for error pages. */
error?: unknown;
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
matches: MetaMatches<T["matches"]>;
};
type MetaDescriptors = MetaDescriptor[];
type HeadersArgs = {
loaderHeaders: Headers;
parentHeaders: Headers;
actionHeaders: Headers;
errorHeaders: Headers | undefined;
};
type CreateServerMiddlewareFunction<T extends RouteInfo> = (args: ServerDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Response>) => MaybePromise<Response | void>;
type CreateClientMiddlewareFunction<T extends RouteInfo> = (args: ClientDataFunctionArgs<T["params"]>, next: MiddlewareNextFunction<Record<string, DataStrategyResult>>) => MaybePromise<Record<string, DataStrategyResult> | void>;
type CreateServerLoaderArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientLoaderArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function to get the data from the server loader for this route. On client-side navigations, this will make a {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server loader. If you opt-into running your clientLoader on hydration, then this function will return the data that was already loaded on the server (via Promise.resolve). */
serverLoader: () => Promise<ServerDataFrom<T["module"]["loader"]>>;
};
type CreateServerActionArgs<T extends RouteInfo> = ServerDataFunctionArgs<T["params"]>;
type CreateClientActionArgs<T extends RouteInfo> = ClientDataFunctionArgs<T["params"]> & {
/** This is an asynchronous function that makes the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API fetch} call to the React Router server action for this route. */
serverAction: () => Promise<ServerDataFrom<T["module"]["action"]>>;
};
type CreateHydrateFallbackProps<T extends RouteInfo, RSCEnabled extends boolean> = {
params: T["params"];
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type Match<T extends MatchInfo> = Pretty<{
id: T["id"];
params: Record<string, string | undefined>;
pathname: string;
/** @deprecated Use `Match.loaderData` instead */
data: GetLoaderData<T["module"]>;
loaderData: GetLoaderData<T["module"]>;
handle: unknown;
}>;
type Matches<T extends Array<MatchInfo>> = T extends [infer F extends MatchInfo, ...infer R extends Array<MatchInfo>] ? [Match<F>, ...Matches<R>] : Array<Match<MatchInfo> | undefined>;
type CreateComponentProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export default function Component({
* params,
* }: Route.ComponentProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
/** An array of the current {@link https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html route matches}, including parent route matches. */
matches: Matches<T["matches"]>;
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type CreateErrorBoundaryProps<T extends RouteInfo, RSCEnabled extends boolean> = {
/**
* {@link https://reactrouter.com/start/framework/routing#dynamic-segments Dynamic route params} for the current route.
* @example
* // app/routes.ts
* route("teams/:teamId", "./team.tsx"),
*
* // app/team.tsx
* export function ErrorBoundary({
* params,
* }: Route.ErrorBoundaryProps) {
* params.teamId;
* // ^ string
* }
**/
params: T["params"];
error: unknown;
} & (RSCEnabled extends true ? {
/** The data returned from the `loader` */
loaderData?: ServerDataFrom<T["module"]["loader"]>;
/** The data returned from the `action` following an action submission. */
actionData?: ServerDataFrom<T["module"]["action"]>;
} : {
/** The data returned from the `loader` or `clientLoader` */
loaderData?: T["loaderData"];
/** The data returned from the `action` or `clientAction` following an action submission. */
actionData?: T["actionData"];
});
type GetAnnotations<Info extends RouteInfo> = {
LinkDescriptors: LinkDescriptor[];
LinksFunction: () => LinkDescriptor[];
MetaArgs: CreateMetaArgs<Info>;
MetaDescriptors: MetaDescriptors;
MetaFunction: (args: CreateMetaArgs<Info>) => MetaDescriptors;
HeadersArgs: HeadersArgs;
HeadersFunction: (args: HeadersArgs) => Headers | HeadersInit;
MiddlewareFunction: CreateServerMiddlewareFunction<Info>;
ClientMiddlewareFunction: CreateClientMiddlewareFunction<Info>;
LoaderArgs: CreateServerLoaderArgs<Info>;
ClientLoaderArgs: CreateClientLoaderArgs<Info>;
ActionArgs: CreateServerActionArgs<Info>;
ClientActionArgs: CreateClientActionArgs<Info>;
HydrateFallbackProps: CreateHydrateFallbackProps<Info, false>;
ServerHydrateFallbackProps: CreateHydrateFallbackProps<Info, true>;
ComponentProps: CreateComponentProps<Info, false>;
ServerComponentProps: CreateComponentProps<Info, true>;
ErrorBoundaryProps: CreateErrorBoundaryProps<Info, false>;
ServerErrorBoundaryProps: CreateErrorBoundaryProps<Info, true>;
};
type Params<RouteFile extends keyof RouteFiles> = Normalize<Pages[RouteFiles[RouteFile]["page"]]["params"]>;
type GetInfo<T extends {
file: keyof RouteFiles;
module: RouteModule;
}> = {
params: Params<T["file"]>;
loaderData: GetLoaderData<T["module"]>;
actionData: GetActionData<T["module"]>;
};
export type { GetAnnotations, GetInfo };

View File

@ -0,0 +1,10 @@
"use strict";/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

View File

@ -0,0 +1,10 @@
/**
* react-router v7.14.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

View File

@ -0,0 +1,30 @@
import { R as RouteModule } from './routeModules-BRrCYrSL.mjs';
/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, string | undefined>;
type AnyPages = Record<string, {
params: AnyParams;
}>;
type Pages = Register extends {
pages: infer Registered extends AnyPages;
} ? Registered : AnyPages;
type AnyRouteFiles = Record<string, {
id: string;
page: string;
}>;
type RouteFiles = Register extends {
routeFiles: infer Registered extends AnyRouteFiles;
} ? Registered : AnyRouteFiles;
type AnyRouteModules = Record<string, RouteModule>;
type RouteModules = Register extends {
routeModules: infer Registered extends AnyRouteModules;
} ? Registered : AnyRouteModules;
export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };

View File

@ -0,0 +1,30 @@
import { R as RouteModule } from './routeModules-CA7kSxJJ.js';
/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, string | undefined>;
type AnyPages = Record<string, {
params: AnyParams;
}>;
type Pages = Register extends {
pages: infer Registered extends AnyPages;
} ? Registered : AnyPages;
type AnyRouteFiles = Record<string, {
id: string;
page: string;
}>;
type RouteFiles = Register extends {
routeFiles: infer Registered extends AnyRouteFiles;
} ? Registered : AnyRouteFiles;
type AnyRouteModules = Record<string, RouteModule>;
type RouteModules = Register extends {
routeModules: infer Registered extends AnyRouteModules;
} ? Registered : AnyRouteModules;
export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

163
node_modules/react-router/package.json generated vendored Normal file
View File

@ -0,0 +1,163 @@
{
"name": "react-router",
"version": "7.14.0",
"description": "Declarative routing for React",
"keywords": [
"react",
"router",
"route",
"routing",
"history",
"link"
],
"repository": {
"type": "git",
"url": "https://github.com/remix-run/react-router",
"directory": "packages/react-router"
},
"license": "MIT",
"author": "Remix Software <hello@remix.run>",
"sideEffects": false,
"types": "./dist/development/index.d.ts",
"main": "./dist/development/index.js",
"module": "./dist/development/index.mjs",
"exports": {
".": {
"react-server": {
"module": "./dist/development/index-react-server.mjs",
"default": "./dist/development/index-react-server.js"
},
"node": {
"types": "./dist/development/index.d.ts",
"module": "./dist/development/index.mjs",
"module-sync": "./dist/development/index.mjs",
"default": "./dist/development/index.js"
},
"module": {
"types": "./dist/development/index.d.mts",
"default": "./dist/development/index.mjs"
},
"import": {
"types": "./dist/development/index.d.mts",
"default": "./dist/development/index.mjs"
},
"default": {
"types": "./dist/development/index.d.ts",
"default": "./dist/development/index.js"
}
},
"./dom": {
"node": {
"types": "./dist/development/dom-export.d.ts",
"module": "./dist/development/dom-export.mjs",
"module-sync": "./dist/development/dom-export.mjs",
"default": "./dist/development/dom-export.js"
},
"module": {
"types": "./dist/development/dom-export.d.mts",
"default": "./dist/development/dom-export.mjs"
},
"import": {
"types": "./dist/development/dom-export.d.mts",
"default": "./dist/development/dom-export.mjs"
},
"default": {
"types": "./dist/development/dom-export.d.ts",
"default": "./dist/development/dom-export.js"
}
},
"./internal": {
"node": {
"types": "./dist/development/lib/types/internal.d.ts"
},
"import": {
"types": "./dist/development/lib/types/internal.d.mts"
},
"default": {
"types": "./dist/development/lib/types/index.d.ts"
}
},
"./internal/react-server-client": {
"react-server": {
"module": "./dist/development/index-react-server-client.mjs",
"default": "./dist/development/index-react-server-client.js"
},
"node": {
"types": "./dist/development/index.d.ts",
"module": "./dist/development/index.mjs",
"module-sync": "./dist/development/index.mjs",
"default": "./dist/development/index.js"
},
"module": {
"types": "./dist/development/index.d.mts",
"default": "./dist/development/index.mjs"
},
"import": {
"types": "./dist/development/index.d.mts",
"default": "./dist/development/index.mjs"
},
"default": {
"types": "./dist/development/index.d.ts",
"default": "./dist/development/index.js"
}
},
"./package.json": "./package.json"
},
"wireit": {
"build": {
"command": "premove dist && tsup && tsup --config tsup.config.rsc.ts",
"files": [
"../../pnpm-workspace.yaml",
"lib/**",
"*.ts",
"tsconfig.json",
"package.json"
],
"output": [
"dist/**"
]
}
},
"dependencies": {
"cookie": "^1.0.1",
"set-cookie-parser": "^2.6.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/set-cookie-parser": "^2.4.1",
"jest-environment-jsdom": "^29.6.2",
"premove": "^4.0.0",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"react-test-renderer": "^19.1.0",
"tsup": "^8.3.0",
"typescript": "^5.4.5",
"undici": "^6.19.2",
"wireit": "0.14.9"
},
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18"
},
"peerDependenciesMeta": {
"react-dom": {
"optional": true
}
},
"files": [
"dist/",
"CHANGELOG.md",
"LICENSE.md",
"README.md"
],
"engines": {
"node": ">=20.0.0"
},
"scripts": {
"build": "wireit",
"watch": "tsup --watch & tsup --config tsup.config.rsc.ts --watch",
"typecheck": "tsc"
}
}

21
node_modules/react/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

37
node_modules/react/README.md generated vendored Normal file
View File

@ -0,0 +1,37 @@
# `react`
React is a JavaScript library for creating user interfaces.
The `react` package contains only the functionality necessary to define React components. It is typically used together with a React renderer like `react-dom` for the web, or `react-native` for the native environments.
**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the [production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) when deploying your application.
## Usage
```js
import { useState } from 'react';
import { createRoot } from 'react-dom/client';
function Counter() {
const [count, setCount] = useState(0);
return (
<>
<h1>{count}</h1>
<button onClick={() => setCount(count + 1)}>
Increment
</button>
</>
);
}
const root = createRoot(document.getElementById('root'));
root.render(<Counter />);
```
## Documentation
See https://react.dev/
## API
See https://react.dev/reference/react

View File

@ -0,0 +1,24 @@
/**
* @license React
* react-compiler-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
var ReactSharedInternals =
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
exports.c = function (size) {
var dispatcher = ReactSharedInternals.H;
null === dispatcher &&
console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher.useMemoCache(size);
};
})();

View File

@ -0,0 +1,16 @@
/**
* @license React
* react-compiler-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var ReactSharedInternals =
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
exports.c = function (size) {
return ReactSharedInternals.H.useMemoCache(size);
};

View File

@ -0,0 +1,16 @@
/**
* @license React
* react-compiler-runtime.profiling.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var ReactSharedInternals =
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
exports.c = function (size) {
return ReactSharedInternals.H.useMemoCache(size);
};

View File

@ -0,0 +1,338 @@
/**
* @license React
* react-jsx-dev-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
debugStack,
debugTask
) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (
isStaticChildren = 0;
isStaticChildren < children.length;
isStaticChildren++
)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function (k) {
return "key" !== k;
});
isStaticChildren =
0 < keys.length
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
: "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] ||
((keys =
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
),
(didWarnAboutKeySpread[children + isStaticChildren] = !0));
}
children = null;
void 0 !== maybeKey &&
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (children = "" + config.key));
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children &&
defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
return ReactElement(
type,
children,
maybeKey,
getOwner(),
debugStack,
debugTask
);
}
function validateChildKeys(node) {
isValidElement(node)
? node._store && (node._store.validated = 1)
: "object" === typeof node &&
null !== node &&
node.$$typeof === REACT_LAZY_TYPE &&
("fulfilled" === node._payload.status
? isValidElement(node._payload.value) &&
node._payload.value._store &&
(node._payload.value._store.validated = 1)
: node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
ReactSharedInternals =
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
hasOwnProperty = Object.prototype.hasOwnProperty,
isArrayImpl = Array.isArray,
createTask = console.createTask
? console.createTask
: function () {
return null;
};
React = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
var trackActualOwner =
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
})();

View File

@ -0,0 +1,14 @@
/**
* @license React
* react-jsx-dev-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsxDEV = void 0;

View File

@ -0,0 +1,14 @@
/**
* @license React
* react-jsx-dev-runtime.profiling.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsxDEV = void 0;

View File

@ -0,0 +1,370 @@
/**
* @license React
* react-jsx-dev-runtime.react-server.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternalsServer.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
debugStack,
debugTask
) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (
isStaticChildren = 0;
isStaticChildren < children.length;
isStaticChildren++
)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function (k) {
return "key" !== k;
});
isStaticChildren =
0 < keys.length
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
: "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] ||
((keys =
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
),
(didWarnAboutKeySpread[children + isStaticChildren] = !0));
}
children = null;
void 0 !== maybeKey &&
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (children = "" + config.key));
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children &&
defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
return ReactElement(
type,
children,
maybeKey,
getOwner(),
debugStack,
debugTask
);
}
function validateChildKeys(node) {
isValidElement(node)
? node._store && (node._store.validated = 1)
: "object" === typeof node &&
null !== node &&
node.$$typeof === REACT_LAZY_TYPE &&
("fulfilled" === node._payload.status
? isValidElement(node._payload.value) &&
node._payload.value._store &&
(node._payload.value._store.validated = 1)
: node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
ReactSharedInternalsServer =
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
if (!ReactSharedInternalsServer)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
var hasOwnProperty = Object.prototype.hasOwnProperty,
isArrayImpl = Array.isArray,
createTask = console.createTask
? console.createTask
: function () {
return null;
};
React = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = function (type, config, maybeKey) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!1,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxs = function (type, config, maybeKey) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!0,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
})();

View File

@ -0,0 +1,40 @@
/**
* @license React
* react-jsx-dev-runtime.react-server.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxDEV = void 0;
exports.jsxs = jsxProd;

352
node_modules/react/cjs/react-jsx-runtime.development.js generated vendored Normal file
View File

@ -0,0 +1,352 @@
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
debugStack,
debugTask
) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (
isStaticChildren = 0;
isStaticChildren < children.length;
isStaticChildren++
)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function (k) {
return "key" !== k;
});
isStaticChildren =
0 < keys.length
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
: "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] ||
((keys =
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
),
(didWarnAboutKeySpread[children + isStaticChildren] = !0));
}
children = null;
void 0 !== maybeKey &&
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (children = "" + config.key));
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children &&
defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
return ReactElement(
type,
children,
maybeKey,
getOwner(),
debugStack,
debugTask
);
}
function validateChildKeys(node) {
isValidElement(node)
? node._store && (node._store.validated = 1)
: "object" === typeof node &&
null !== node &&
node.$$typeof === REACT_LAZY_TYPE &&
("fulfilled" === node._payload.status
? isValidElement(node._payload.value) &&
node._payload.value._store &&
(node._payload.value._store.validated = 1)
: node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
ReactSharedInternals =
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
hasOwnProperty = Object.prototype.hasOwnProperty,
isArrayImpl = Array.isArray,
createTask = console.createTask
? console.createTask
: function () {
return null;
};
React = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = function (type, config, maybeKey) {
var trackActualOwner =
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!1,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxs = function (type, config, maybeKey) {
var trackActualOwner =
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!0,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
})();

34
node_modules/react/cjs/react-jsx-runtime.production.js generated vendored Normal file
View File

@ -0,0 +1,34 @@
/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxs = jsxProd;

34
node_modules/react/cjs/react-jsx-runtime.profiling.js generated vendored Normal file
View File

@ -0,0 +1,34 @@
/**
* @license React
* react-jsx-runtime.profiling.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxs = jsxProd;

View File

@ -0,0 +1,370 @@
/**
* @license React
* react-jsx-runtime.react-server.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternalsServer.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
debugStack,
debugTask
) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (
isStaticChildren = 0;
isStaticChildren < children.length;
isStaticChildren++
)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function (k) {
return "key" !== k;
});
isStaticChildren =
0 < keys.length
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
: "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] ||
((keys =
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
),
(didWarnAboutKeySpread[children + isStaticChildren] = !0));
}
children = null;
void 0 !== maybeKey &&
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (children = "" + config.key));
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children &&
defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
return ReactElement(
type,
children,
maybeKey,
getOwner(),
debugStack,
debugTask
);
}
function validateChildKeys(node) {
isValidElement(node)
? node._store && (node._store.validated = 1)
: "object" === typeof node &&
null !== node &&
node.$$typeof === REACT_LAZY_TYPE &&
("fulfilled" === node._payload.status
? isValidElement(node._payload.value) &&
node._payload.value._store &&
(node._payload.value._store.validated = 1)
: node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
ReactSharedInternalsServer =
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
if (!ReactSharedInternalsServer)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
var hasOwnProperty = Object.prototype.hasOwnProperty,
isArrayImpl = Array.isArray,
createTask = console.createTask
? console.createTask
: function () {
return null;
};
React = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = function (type, config, maybeKey) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!1,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxs = function (type, config, maybeKey) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!0,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
})();

View File

@ -0,0 +1,40 @@
/**
* @license React
* react-jsx-runtime.react-server.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxDEV = void 0;
exports.jsxs = jsxProd;

1284
node_modules/react/cjs/react.development.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

542
node_modules/react/cjs/react.production.js generated vendored Normal file
View File

@ -0,0 +1,542 @@
/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
maybeIterable =
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
var ReactNoopUpdateQueue = {
isMounted: function () {
return !1;
},
enqueueForceUpdate: function () {},
enqueueReplaceState: function () {},
enqueueSetState: function () {}
},
assign = Object.assign,
emptyObject = {};
function Component(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
Component.prototype.isReactComponent = {};
Component.prototype.setState = function (partialState, callback) {
if (
"object" !== typeof partialState &&
"function" !== typeof partialState &&
null != partialState
)
throw Error(
"takes an object of state variables to update or a function which returns an object of state variables."
);
this.updater.enqueueSetState(this, partialState, callback, "setState");
};
Component.prototype.forceUpdate = function (callback) {
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
};
function ComponentDummy() {}
ComponentDummy.prototype = Component.prototype;
function PureComponent(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
pureComponentPrototype.constructor = PureComponent;
assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = !0;
var isArrayImpl = Array.isArray;
function noop() {}
var ReactSharedInternals = { H: null, A: null, T: null, S: null },
hasOwnProperty = Object.prototype.hasOwnProperty;
function ReactElement(type, key, props) {
var refProp = props.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== refProp ? refProp : null,
props: props
};
}
function cloneAndReplaceKey(oldElement, newKey) {
return ReactElement(oldElement.type, newKey, oldElement.props);
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
function escape(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return (
"$" +
key.replace(/[=:]/g, function (match) {
return escaperLookup[match];
})
);
}
var userProvidedKeyEscapeRegex = /\/+/g;
function getElementKey(element, index) {
return "object" === typeof element && null !== element && null != element.key
? escape("" + element.key)
: index.toString(36);
}
function resolveThenable(thenable) {
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
default:
switch (
("string" === typeof thenable.status
? thenable.then(noop, noop)
: ((thenable.status = "pending"),
thenable.then(
function (fulfilledValue) {
"pending" === thenable.status &&
((thenable.status = "fulfilled"),
(thenable.value = fulfilledValue));
},
function (error) {
"pending" === thenable.status &&
((thenable.status = "rejected"), (thenable.reason = error));
}
)),
thenable.status)
) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = !1;
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = !0;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = !0;
break;
case REACT_LAZY_TYPE:
return (
(invokeCallback = children._init),
mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
)
);
}
}
if (invokeCallback)
return (
(callback = callback(children)),
(invokeCallback =
"" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
isArrayImpl(callback)
? ((escapedPrefix = ""),
null != invokeCallback &&
(escapedPrefix =
invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
return c;
}))
: null != callback &&
(isValidElement(callback) &&
(callback = cloneAndReplaceKey(
callback,
escapedPrefix +
(null == callback.key ||
(children && children.key === callback.key)
? ""
: ("" + callback.key).replace(
userProvidedKeyEscapeRegex,
"$&/"
) + "/") +
invokeCallback
)),
array.push(callback)),
1
);
invokeCallback = 0;
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i = 0; i < children.length; i++)
(nameSoFar = children[i]),
(type = nextNamePrefix + getElementKey(nameSoFar, i)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if (((i = getIteratorFn(children)), "function" === typeof i))
for (
children = i.call(children), i = 0;
!(nameSoFar = children.next()).done;
)
(nameSoFar = nameSoFar.value),
(type = nextNamePrefix + getElementKey(nameSoFar, i++)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: " +
("[object Object]" === array
? "object with keys {" + Object.keys(children).join(", ") + "}"
: array) +
"). If you meant to render a collection of children, use an array instead."
);
}
return invokeCallback;
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [],
count = 0;
mapIntoArray(children, result, "", "", function (child) {
return func.call(context, child, count++);
});
return result;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ctor = payload._result;
ctor = ctor();
ctor.then(
function (moduleObject) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 1), (payload._result = moduleObject);
},
function (error) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 2), (payload._result = error);
}
);
-1 === payload._status && ((payload._status = 0), (payload._result = ctor));
}
if (1 === payload._status) return payload._result.default;
throw payload._result;
}
var reportGlobalError =
"function" === typeof reportError
? reportError
: function (error) {
if (
"object" === typeof window &&
"function" === typeof window.ErrorEvent
) {
var event = new window.ErrorEvent("error", {
bubbles: !0,
cancelable: !0,
message:
"object" === typeof error &&
null !== error &&
"string" === typeof error.message
? String(error.message)
: String(error),
error: error
});
if (!window.dispatchEvent(event)) return;
} else if (
"object" === typeof process &&
"function" === typeof process.emit
) {
process.emit("uncaughtException", error);
return;
}
console.error(error);
},
Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
mapChildren(
children,
function () {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function (children) {
var n = 0;
mapChildren(children, function () {
n++;
});
return n;
},
toArray: function (children) {
return (
mapChildren(children, function (child) {
return child;
}) || []
);
},
only: function (children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."
);
return children;
}
};
exports.Activity = REACT_ACTIVITY_TYPE;
exports.Children = Children;
exports.Component = Component;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.PureComponent = PureComponent;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
ReactSharedInternals;
exports.__COMPILER_RUNTIME = {
__proto__: null,
c: function (size) {
return ReactSharedInternals.H.useMemoCache(size);
}
};
exports.cache = function (fn) {
return function () {
return fn.apply(null, arguments);
};
};
exports.cacheSignal = function () {
return null;
};
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(
"The argument must be a React element, but you passed " + element + "."
);
var props = assign({}, element.props),
key = element.key;
if (null != config)
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
!hasOwnProperty.call(config, propName) ||
"key" === propName ||
"__self" === propName ||
"__source" === propName ||
("ref" === propName && void 0 === config.ref) ||
(props[propName] = config[propName]);
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
for (var childArray = Array(propName), i = 0; i < propName; i++)
childArray[i] = arguments[i + 2];
props.children = childArray;
}
return ReactElement(element.type, key, props);
};
exports.createContext = function (defaultValue) {
defaultValue = {
$$typeof: REACT_CONTEXT_TYPE,
_currentValue: defaultValue,
_currentValue2: defaultValue,
_threadCount: 0,
Provider: null,
Consumer: null
};
defaultValue.Provider = defaultValue;
defaultValue.Consumer = {
$$typeof: REACT_CONSUMER_TYPE,
_context: defaultValue
};
return defaultValue;
};
exports.createElement = function (type, config, children) {
var propName,
props = {},
key = null;
if (null != config)
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
hasOwnProperty.call(config, propName) &&
"key" !== propName &&
"__self" !== propName &&
"__source" !== propName &&
(props[propName] = config[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) props.children = children;
else if (1 < childrenLength) {
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
childArray[i] = arguments[i + 2];
props.children = childArray;
}
if (type && type.defaultProps)
for (propName in ((childrenLength = type.defaultProps), childrenLength))
void 0 === props[propName] &&
(props[propName] = childrenLength[propName]);
return ReactElement(type, key, props);
};
exports.createRef = function () {
return { current: null };
};
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
exports.isValidElement = isValidElement;
exports.lazy = function (ctor) {
return {
$$typeof: REACT_LAZY_TYPE,
_payload: { _status: -1, _result: ctor },
_init: lazyInitializer
};
};
exports.memo = function (type, compare) {
return {
$$typeof: REACT_MEMO_TYPE,
type: type,
compare: void 0 === compare ? null : compare
};
};
exports.startTransition = function (scope) {
var prevTransition = ReactSharedInternals.T,
currentTransition = {};
ReactSharedInternals.T = currentTransition;
try {
var returnValue = scope(),
onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish &&
onStartTransitionFinish(currentTransition, returnValue);
"object" === typeof returnValue &&
null !== returnValue &&
"function" === typeof returnValue.then &&
returnValue.then(noop, reportGlobalError);
} catch (error) {
reportGlobalError(error);
} finally {
null !== prevTransition &&
null !== currentTransition.types &&
(prevTransition.types = currentTransition.types),
(ReactSharedInternals.T = prevTransition);
}
};
exports.unstable_useCacheRefresh = function () {
return ReactSharedInternals.H.useCacheRefresh();
};
exports.use = function (usable) {
return ReactSharedInternals.H.use(usable);
};
exports.useActionState = function (action, initialState, permalink) {
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
};
exports.useCallback = function (callback, deps) {
return ReactSharedInternals.H.useCallback(callback, deps);
};
exports.useContext = function (Context) {
return ReactSharedInternals.H.useContext(Context);
};
exports.useDebugValue = function () {};
exports.useDeferredValue = function (value, initialValue) {
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
};
exports.useEffect = function (create, deps) {
return ReactSharedInternals.H.useEffect(create, deps);
};
exports.useEffectEvent = function (callback) {
return ReactSharedInternals.H.useEffectEvent(callback);
};
exports.useId = function () {
return ReactSharedInternals.H.useId();
};
exports.useImperativeHandle = function (ref, create, deps) {
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
};
exports.useInsertionEffect = function (create, deps) {
return ReactSharedInternals.H.useInsertionEffect(create, deps);
};
exports.useLayoutEffect = function (create, deps) {
return ReactSharedInternals.H.useLayoutEffect(create, deps);
};
exports.useMemo = function (create, deps) {
return ReactSharedInternals.H.useMemo(create, deps);
};
exports.useOptimistic = function (passthrough, reducer) {
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
};
exports.useReducer = function (reducer, initialArg, init) {
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
};
exports.useRef = function (initialValue) {
return ReactSharedInternals.H.useRef(initialValue);
};
exports.useState = function (initialState) {
return ReactSharedInternals.H.useState(initialState);
};
exports.useSyncExternalStore = function (
subscribe,
getSnapshot,
getServerSnapshot
) {
return ReactSharedInternals.H.useSyncExternalStore(
subscribe,
getSnapshot,
getServerSnapshot
);
};
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.4";

View File

@ -0,0 +1,848 @@
/**
* @license React
* react.react-server.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function noop() {}
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable)
return null;
maybeIterable =
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function cloneAndReplaceKey(oldElement, newKey) {
newKey = ReactElement(
oldElement.type,
newKey,
oldElement.props,
oldElement._owner,
oldElement._debugStack,
oldElement._debugTask
);
oldElement._store &&
(newKey._store.validated = oldElement._store.validated);
return newKey;
}
function validateChildKeys(node) {
isValidElement(node)
? node._store && (node._store.validated = 1)
: "object" === typeof node &&
null !== node &&
node.$$typeof === REACT_LAZY_TYPE &&
("fulfilled" === node._payload.status
? isValidElement(node._payload.value) &&
node._payload.value._store &&
(node._payload.value._store.validated = 1)
: node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
function escape(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return (
"$" +
key.replace(/[=:]/g, function (match) {
return escaperLookup[match];
})
);
}
function getElementKey(element, index) {
return "object" === typeof element &&
null !== element &&
null != element.key
? (checkKeyStringCoercion(element.key), escape("" + element.key))
: index.toString(36);
}
function resolveThenable(thenable) {
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
default:
switch (
("string" === typeof thenable.status
? thenable.then(noop, noop)
: ((thenable.status = "pending"),
thenable.then(
function (fulfilledValue) {
"pending" === thenable.status &&
((thenable.status = "fulfilled"),
(thenable.value = fulfilledValue));
},
function (error) {
"pending" === thenable.status &&
((thenable.status = "rejected"),
(thenable.reason = error));
}
)),
thenable.status)
) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = !1;
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = !0;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = !0;
break;
case REACT_LAZY_TYPE:
return (
(invokeCallback = children._init),
mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
)
);
}
}
if (invokeCallback) {
invokeCallback = children;
callback = callback(invokeCallback);
var childKey =
"" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
isArrayImpl(callback)
? ((escapedPrefix = ""),
null != childKey &&
(escapedPrefix =
childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
return c;
}))
: null != callback &&
(isValidElement(callback) &&
(null != callback.key &&
((invokeCallback && invokeCallback.key === callback.key) ||
checkKeyStringCoercion(callback.key)),
(escapedPrefix = cloneAndReplaceKey(
callback,
escapedPrefix +
(null == callback.key ||
(invokeCallback && invokeCallback.key === callback.key)
? ""
: ("" + callback.key).replace(
userProvidedKeyEscapeRegex,
"$&/"
) + "/") +
childKey
)),
"" !== nameSoFar &&
null != invokeCallback &&
isValidElement(invokeCallback) &&
null == invokeCallback.key &&
invokeCallback._store &&
!invokeCallback._store.validated &&
(escapedPrefix._store.validated = 2),
(callback = escapedPrefix)),
array.push(callback));
return 1;
}
invokeCallback = 0;
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i = 0; i < children.length; i++)
(nameSoFar = children[i]),
(type = childKey + getElementKey(nameSoFar, i)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if (((i = getIteratorFn(children)), "function" === typeof i))
for (
i === children.entries &&
(didWarnAboutMaps ||
console.warn(
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
),
(didWarnAboutMaps = !0)),
children = i.call(children),
i = 0;
!(nameSoFar = children.next()).done;
)
(nameSoFar = nameSoFar.value),
(type = childKey + getElementKey(nameSoFar, i++)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: " +
("[object Object]" === array
? "object with keys {" + Object.keys(children).join(", ") + "}"
: array) +
"). If you meant to render a collection of children, use an array instead."
);
}
return invokeCallback;
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [],
count = 0;
mapIntoArray(children, result, "", "", function (child) {
return func.call(context, child, count++);
});
return result;
}
function resolveDispatcher() {
var dispatcher = ReactSharedInternals.H;
null === dispatcher &&
console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ioInfo = payload._ioInfo;
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
ioInfo = payload._result;
var thenable = ioInfo();
thenable.then(
function (moduleObject) {
if (0 === payload._status || -1 === payload._status) {
payload._status = 1;
payload._result = moduleObject;
var _ioInfo = payload._ioInfo;
null != _ioInfo && (_ioInfo.end = performance.now());
void 0 === thenable.status &&
((thenable.status = "fulfilled"),
(thenable.value = moduleObject));
}
},
function (error) {
if (0 === payload._status || -1 === payload._status) {
payload._status = 2;
payload._result = error;
var _ioInfo2 = payload._ioInfo;
null != _ioInfo2 && (_ioInfo2.end = performance.now());
void 0 === thenable.status &&
((thenable.status = "rejected"), (thenable.reason = error));
}
}
);
ioInfo = payload._ioInfo;
if (null != ioInfo) {
ioInfo.value = thenable;
var displayName = thenable.displayName;
"string" === typeof displayName && (ioInfo.name = displayName);
}
-1 === payload._status &&
((payload._status = 0), (payload._result = thenable));
}
if (1 === payload._status)
return (
(ioInfo = payload._result),
void 0 === ioInfo &&
console.error(
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
ioInfo
),
"default" in ioInfo ||
console.error(
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
ioInfo
),
ioInfo.default
);
throw payload._result;
}
function createCacheRoot() {
return new WeakMap();
}
function createCacheNode() {
return { s: 0, v: void 0, o: null, p: null };
}
var ReactSharedInternals = {
H: null,
A: null,
getCurrentStack: null,
recentlyCreatedOwnerStacks: 0
},
isArrayImpl = Array.isArray,
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
hasOwnProperty = Object.prototype.hasOwnProperty,
assign = Object.assign,
createTask = console.createTask
? console.createTask
: function () {
return null;
},
createFakeCallStack = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
},
specialPropKeyWarningShown,
didWarnAboutOldJSXRuntime;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack =
createFakeCallStack.react_stack_bottom_frame.bind(
createFakeCallStack,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutMaps = !1,
userProvidedKeyEscapeRegex = /\/+/g;
exports.Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
mapChildren(
children,
function () {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function (children) {
var n = 0;
mapChildren(children, function () {
n++;
});
return n;
},
toArray: function (children) {
return (
mapChildren(children, function (child) {
return child;
}) || []
);
},
only: function (children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."
);
return children;
}
};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
ReactSharedInternals;
exports.cache = function (fn) {
return function () {
var dispatcher = ReactSharedInternals.A;
if (!dispatcher) return fn.apply(null, arguments);
var fnMap = dispatcher.getCacheForType(createCacheRoot);
dispatcher = fnMap.get(fn);
void 0 === dispatcher &&
((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));
fnMap = 0;
for (var l = arguments.length; fnMap < l; fnMap++) {
var arg = arguments[fnMap];
if (
"function" === typeof arg ||
("object" === typeof arg && null !== arg)
) {
var objectCache = dispatcher.o;
null === objectCache &&
(dispatcher.o = objectCache = new WeakMap());
dispatcher = objectCache.get(arg);
void 0 === dispatcher &&
((dispatcher = createCacheNode()),
objectCache.set(arg, dispatcher));
} else
(objectCache = dispatcher.p),
null === objectCache && (dispatcher.p = objectCache = new Map()),
(dispatcher = objectCache.get(arg)),
void 0 === dispatcher &&
((dispatcher = createCacheNode()),
objectCache.set(arg, dispatcher));
}
if (1 === dispatcher.s) return dispatcher.v;
if (2 === dispatcher.s) throw dispatcher.v;
try {
var result = fn.apply(null, arguments);
fnMap = dispatcher;
fnMap.s = 1;
return (fnMap.v = result);
} catch (error) {
throw (
((result = dispatcher), (result.s = 2), (result.v = error), error)
);
}
};
};
exports.cacheSignal = function () {
var dispatcher = ReactSharedInternals.A;
return dispatcher ? dispatcher.cacheSignal() : null;
};
exports.captureOwnerStack = function () {
var getCurrentStack = ReactSharedInternals.getCurrentStack;
return null === getCurrentStack ? null : getCurrentStack();
};
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(
"The argument must be a React element, but you passed " +
element +
"."
);
var props = assign({}, element.props),
key = element.key,
owner = element._owner;
if (null != config) {
var JSCompiler_inline_result;
a: {
if (
hasOwnProperty.call(config, "ref") &&
(JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
config,
"ref"
).get) &&
JSCompiler_inline_result.isReactWarning
) {
JSCompiler_inline_result = !1;
break a;
}
JSCompiler_inline_result = void 0 !== config.ref;
}
JSCompiler_inline_result && (owner = getOwner());
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (key = "" + config.key));
for (propName in config)
!hasOwnProperty.call(config, propName) ||
"key" === propName ||
"__self" === propName ||
"__source" === propName ||
("ref" === propName && void 0 === config.ref) ||
(props[propName] = config[propName]);
}
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
JSCompiler_inline_result = Array(propName);
for (var i = 0; i < propName; i++)
JSCompiler_inline_result[i] = arguments[i + 2];
props.children = JSCompiler_inline_result;
}
props = ReactElement(
element.type,
key,
props,
owner,
element._debugStack,
element._debugTask
);
for (key = 2; key < arguments.length; key++)
validateChildKeys(arguments[key]);
return props;
};
exports.createElement = function (type, config, children) {
for (var i = 2; i < arguments.length; i++)
validateChildKeys(arguments[i]);
i = {};
var key = null;
if (null != config)
for (propName in (didWarnAboutOldJSXRuntime ||
!("__self" in config) ||
"key" in config ||
((didWarnAboutOldJSXRuntime = !0),
console.warn(
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
)),
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (key = "" + config.key)),
config))
hasOwnProperty.call(config, propName) &&
"key" !== propName &&
"__self" !== propName &&
"__source" !== propName &&
(i[propName] = config[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) i.children = children;
else if (1 < childrenLength) {
for (
var childArray = Array(childrenLength), _i = 0;
_i < childrenLength;
_i++
)
childArray[_i] = arguments[_i + 2];
Object.freeze && Object.freeze(childArray);
i.children = childArray;
}
if (type && type.defaultProps)
for (propName in ((childrenLength = type.defaultProps), childrenLength))
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
key &&
defineKeyPropWarningGetter(
i,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
return ReactElement(
type,
key,
i,
getOwner(),
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.createRef = function () {
var refObject = { current: null };
Object.seal(refObject);
return refObject;
};
exports.forwardRef = function (render) {
null != render && render.$$typeof === REACT_MEMO_TYPE
? console.error(
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
)
: "function" !== typeof render
? console.error(
"forwardRef requires a render function but was given %s.",
null === render ? "null" : typeof render
)
: 0 !== render.length &&
2 !== render.length &&
console.error(
"forwardRef render functions accept exactly two parameters: props and ref. %s",
1 === render.length
? "Did you forget to use the ref parameter?"
: "Any additional parameter will be undefined."
);
null != render &&
null != render.defaultProps &&
console.error(
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
);
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
ownName;
Object.defineProperty(elementType, "displayName", {
enumerable: !1,
configurable: !0,
get: function () {
return ownName;
},
set: function (name) {
ownName = name;
render.name ||
render.displayName ||
(Object.defineProperty(render, "name", { value: name }),
(render.displayName = name));
}
});
return elementType;
};
exports.isValidElement = isValidElement;
exports.lazy = function (ctor) {
ctor = { _status: -1, _result: ctor };
var lazyType = {
$$typeof: REACT_LAZY_TYPE,
_payload: ctor,
_init: lazyInitializer
},
ioInfo = {
name: "lazy",
start: -1,
end: -1,
value: null,
owner: null,
debugStack: Error("react-stack-top-frame"),
debugTask: console.createTask ? console.createTask("lazy()") : null
};
ctor._ioInfo = ioInfo;
lazyType._debugInfo = [{ awaited: ioInfo }];
return lazyType;
};
exports.memo = function (type, compare) {
null == type &&
console.error(
"memo: The first argument must be a component. Instead received: %s",
null === type ? "null" : typeof type
);
compare = {
$$typeof: REACT_MEMO_TYPE,
type: type,
compare: void 0 === compare ? null : compare
};
var ownName;
Object.defineProperty(compare, "displayName", {
enumerable: !1,
configurable: !0,
get: function () {
return ownName;
},
set: function (name) {
ownName = name;
type.name ||
type.displayName ||
(Object.defineProperty(type, "name", { value: name }),
(type.displayName = name));
}
});
return compare;
};
exports.use = function (usable) {
return resolveDispatcher().use(usable);
};
exports.useCallback = function (callback, deps) {
return resolveDispatcher().useCallback(callback, deps);
};
exports.useDebugValue = function (value, formatterFn) {
return resolveDispatcher().useDebugValue(value, formatterFn);
};
exports.useId = function () {
return resolveDispatcher().useId();
};
exports.useMemo = function (create, deps) {
return resolveDispatcher().useMemo(create, deps);
};
exports.version = "19.2.4";
})();

423
node_modules/react/cjs/react.react-server.production.js generated vendored Normal file
View File

@ -0,0 +1,423 @@
/**
* @license React
* react.react-server.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var ReactSharedInternals = { H: null, A: null };
function formatProdErrorMessage(code) {
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
"; visit " +
url +
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
);
}
var isArrayImpl = Array.isArray;
function noop() {}
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
maybeIterable =
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
var hasOwnProperty = Object.prototype.hasOwnProperty,
assign = Object.assign;
function ReactElement(type, key, props) {
var refProp = props.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== refProp ? refProp : null,
props: props
};
}
function cloneAndReplaceKey(oldElement, newKey) {
return ReactElement(oldElement.type, newKey, oldElement.props);
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
function escape(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return (
"$" +
key.replace(/[=:]/g, function (match) {
return escaperLookup[match];
})
);
}
var userProvidedKeyEscapeRegex = /\/+/g;
function getElementKey(element, index) {
return "object" === typeof element && null !== element && null != element.key
? escape("" + element.key)
: index.toString(36);
}
function resolveThenable(thenable) {
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
default:
switch (
("string" === typeof thenable.status
? thenable.then(noop, noop)
: ((thenable.status = "pending"),
thenable.then(
function (fulfilledValue) {
"pending" === thenable.status &&
((thenable.status = "fulfilled"),
(thenable.value = fulfilledValue));
},
function (error) {
"pending" === thenable.status &&
((thenable.status = "rejected"), (thenable.reason = error));
}
)),
thenable.status)
) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = !1;
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = !0;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = !0;
break;
case REACT_LAZY_TYPE:
return (
(invokeCallback = children._init),
mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
)
);
}
}
if (invokeCallback)
return (
(callback = callback(children)),
(invokeCallback =
"" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
isArrayImpl(callback)
? ((escapedPrefix = ""),
null != invokeCallback &&
(escapedPrefix =
invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
return c;
}))
: null != callback &&
(isValidElement(callback) &&
(callback = cloneAndReplaceKey(
callback,
escapedPrefix +
(null == callback.key ||
(children && children.key === callback.key)
? ""
: ("" + callback.key).replace(
userProvidedKeyEscapeRegex,
"$&/"
) + "/") +
invokeCallback
)),
array.push(callback)),
1
);
invokeCallback = 0;
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i = 0; i < children.length; i++)
(nameSoFar = children[i]),
(type = nextNamePrefix + getElementKey(nameSoFar, i)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if (((i = getIteratorFn(children)), "function" === typeof i))
for (
children = i.call(children), i = 0;
!(nameSoFar = children.next()).done;
)
(nameSoFar = nameSoFar.value),
(type = nextNamePrefix + getElementKey(nameSoFar, i++)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
formatProdErrorMessage(
31,
"[object Object]" === array
? "object with keys {" + Object.keys(children).join(", ") + "}"
: array
)
);
}
return invokeCallback;
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [],
count = 0;
mapIntoArray(children, result, "", "", function (child) {
return func.call(context, child, count++);
});
return result;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ctor = payload._result;
ctor = ctor();
ctor.then(
function (moduleObject) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 1), (payload._result = moduleObject);
},
function (error) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 2), (payload._result = error);
}
);
-1 === payload._status && ((payload._status = 0), (payload._result = ctor));
}
if (1 === payload._status) return payload._result.default;
throw payload._result;
}
function createCacheRoot() {
return new WeakMap();
}
function createCacheNode() {
return { s: 0, v: void 0, o: null, p: null };
}
exports.Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
mapChildren(
children,
function () {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function (children) {
var n = 0;
mapChildren(children, function () {
n++;
});
return n;
},
toArray: function (children) {
return (
mapChildren(children, function (child) {
return child;
}) || []
);
},
only: function (children) {
if (!isValidElement(children)) throw Error(formatProdErrorMessage(143));
return children;
}
};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
ReactSharedInternals;
exports.cache = function (fn) {
return function () {
var dispatcher = ReactSharedInternals.A;
if (!dispatcher) return fn.apply(null, arguments);
var fnMap = dispatcher.getCacheForType(createCacheRoot);
dispatcher = fnMap.get(fn);
void 0 === dispatcher &&
((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));
fnMap = 0;
for (var l = arguments.length; fnMap < l; fnMap++) {
var arg = arguments[fnMap];
if (
"function" === typeof arg ||
("object" === typeof arg && null !== arg)
) {
var objectCache = dispatcher.o;
null === objectCache && (dispatcher.o = objectCache = new WeakMap());
dispatcher = objectCache.get(arg);
void 0 === dispatcher &&
((dispatcher = createCacheNode()), objectCache.set(arg, dispatcher));
} else
(objectCache = dispatcher.p),
null === objectCache && (dispatcher.p = objectCache = new Map()),
(dispatcher = objectCache.get(arg)),
void 0 === dispatcher &&
((dispatcher = createCacheNode()),
objectCache.set(arg, dispatcher));
}
if (1 === dispatcher.s) return dispatcher.v;
if (2 === dispatcher.s) throw dispatcher.v;
try {
var result = fn.apply(null, arguments);
fnMap = dispatcher;
fnMap.s = 1;
return (fnMap.v = result);
} catch (error) {
throw ((result = dispatcher), (result.s = 2), (result.v = error), error);
}
};
};
exports.cacheSignal = function () {
var dispatcher = ReactSharedInternals.A;
return dispatcher ? dispatcher.cacheSignal() : null;
};
exports.captureOwnerStack = function () {
return null;
};
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(formatProdErrorMessage(267, element));
var props = assign({}, element.props),
key = element.key;
if (null != config)
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
!hasOwnProperty.call(config, propName) ||
"key" === propName ||
"__self" === propName ||
"__source" === propName ||
("ref" === propName && void 0 === config.ref) ||
(props[propName] = config[propName]);
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
for (var childArray = Array(propName), i = 0; i < propName; i++)
childArray[i] = arguments[i + 2];
props.children = childArray;
}
return ReactElement(element.type, key, props);
};
exports.createElement = function (type, config, children) {
var propName,
props = {},
key = null;
if (null != config)
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
hasOwnProperty.call(config, propName) &&
"key" !== propName &&
"__self" !== propName &&
"__source" !== propName &&
(props[propName] = config[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) props.children = children;
else if (1 < childrenLength) {
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
childArray[i] = arguments[i + 2];
props.children = childArray;
}
if (type && type.defaultProps)
for (propName in ((childrenLength = type.defaultProps), childrenLength))
void 0 === props[propName] &&
(props[propName] = childrenLength[propName]);
return ReactElement(type, key, props);
};
exports.createRef = function () {
return { current: null };
};
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
exports.isValidElement = isValidElement;
exports.lazy = function (ctor) {
return {
$$typeof: REACT_LAZY_TYPE,
_payload: { _status: -1, _result: ctor },
_init: lazyInitializer
};
};
exports.memo = function (type, compare) {
return {
$$typeof: REACT_MEMO_TYPE,
type: type,
compare: void 0 === compare ? null : compare
};
};
exports.use = function (usable) {
return ReactSharedInternals.H.use(usable);
};
exports.useCallback = function (callback, deps) {
return ReactSharedInternals.H.useCallback(callback, deps);
};
exports.useDebugValue = function () {};
exports.useId = function () {
return ReactSharedInternals.H.useId();
};
exports.useMemo = function (create, deps) {
return ReactSharedInternals.H.useMemo(create, deps);
};
exports.version = "19.2.4";

Some files were not shown because too many files have changed in this diff Show More