+=======
+1. Git
+1. Node: any version starting with v16.8.0 or greater
+1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
+1. A fork of the repo (for any contributions)
+1. A clone of the [react.dev repo](https://github.com/reactjs/react.dev) on your local machine
+>>>>>>> a5aad0d5e92872ef715b462b1dd6dcbeb45cf781
پیشنهاد میشود بهترتیب از لینکهای زیر شروع کنید:
diff --git a/colors.js b/colors.js
index acf8214ee..872f33cac 100644
--- a/colors.js
+++ b/colors.js
@@ -11,7 +11,7 @@ module.exports = {
tertiary: '#5E687E', // gray-50
'tertiary-dark': '#99A1B3', // gray-30
link: '#087EA4', // blue-50
- 'link-dark': '#149ECA', // blue-40
+ 'link-dark': '#58C4DC', // blue-40
syntax: '#EBECF0', // gray-10
wash: '#FFFFFF',
'wash-dark': '#23272F', // gray-90
@@ -23,6 +23,8 @@ module.exports = {
'border-dark': '#343A46', // gray-80
'secondary-button': '#EBECF0', // gray-10
'secondary-button-dark': '#404756', // gray-70
+ brand: '#087EA4', // blue-40
+ 'brand-dark': '#58C4DC', // blue-40
// Gray
'gray-95': '#16181D',
diff --git a/next-env.d.ts b/next-env.d.ts
index 4f11a03dc..52e831b43 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -2,4 +2,4 @@
///
// NOTE: This file should not be edited
-// see https://nextjs.org/docs/basic-features/typescript for more information.
+// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
diff --git a/next.config.js b/next.config.js
index 61ff1944a..861792c8e 100644
--- a/next.config.js
+++ b/next.config.js
@@ -9,10 +9,8 @@ const nextConfig = {
pageExtensions: ['jsx', 'js', 'ts', 'tsx', 'mdx', 'md'],
reactStrictMode: true,
experimental: {
- // TODO: Remove after https://github.com/vercel/next.js/issues/49355 is fixed
- appDir: false,
scrollRestoration: true,
- legacyBrowsers: false,
+ reactCompiler: true,
},
env: {},
webpack: (config, {dev, isServer, ...options}) => {
diff --git a/package.json b/package.json
index f75ffbb28..07e6136e6 100644
--- a/package.json
+++ b/package.json
@@ -15,28 +15,30 @@
"prettier:diff": "yarn nit:source",
"lint-heading-ids": "node scripts/headingIdLinter.js",
"fix-headings": "node scripts/headingIdLinter.js --fix",
- "ci-check": "npm-run-all prettier:diff --parallel lint tsc lint-heading-ids",
+ "ci-check": "npm-run-all prettier:diff --parallel lint tsc lint-heading-ids rss",
"tsc": "tsc --noEmit",
"start": "next start",
- "postinstall": "patch-package && (is-ci || husky install .husky)",
- "check-all": "npm-run-all prettier lint:fix tsc"
+ "postinstall": "is-ci || husky install .husky",
+ "check-all": "npm-run-all prettier lint:fix tsc rss",
+ "rss": "node scripts/generateRss.js"
},
"dependencies": {
- "@codesandbox/sandpack-react": "2.6.0",
- "@docsearch/css": "3.0.0-alpha.41",
- "@docsearch/react": "3.0.0-alpha.41",
+ "@codesandbox/sandpack-react": "2.13.5",
+ "@docsearch/css": "^3.6.1",
+ "@docsearch/react": "^3.6.1",
"@headlessui/react": "^1.7.0",
+ "@radix-ui/react-context-menu": "^2.1.5",
"body-scroll-lock": "^3.1.3",
"classnames": "^2.2.6",
"date-fns": "^2.16.1",
"debounce": "^1.2.1",
"github-slugger": "^1.3.0",
- "next": "^13.4.1",
+ "next": "15.1.0",
"next-remote-watch": "^1.0.0",
"parse-numeric-range": "^1.2.0",
- "react": "^0.0.0-experimental-16d053d59-20230506",
+ "react": "^19.0.0",
"react-collapsed": "4.0.4",
- "react-dom": "^0.0.0-experimental-16d053d59-20230506",
+ "react-dom": "^19.0.0",
"remark-frontmatter": "^4.0.1",
"remark-gfm": "^3.0.1"
},
@@ -52,13 +54,14 @@
"@types/mdx-js__react": "^1.5.2",
"@types/node": "^14.6.4",
"@types/parse-numeric-range": "^0.0.1",
- "@types/react": "^18.0.9",
- "@types/react-dom": "^18.0.5",
+ "@types/react": "^19.0.0",
+ "@types/react-dom": "^19.0.0",
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"asyncro": "^3.0.0",
"autoprefixer": "^10.4.2",
"babel-eslint": "10.x",
+ "babel-plugin-react-compiler": "19.0.0-beta-e552027-20250112",
"eslint": "7.x",
"eslint-config-next": "12.0.3",
"eslint-config-react-app": "^5.2.1",
@@ -66,6 +69,7 @@
"eslint-plugin-import": "2.x",
"eslint-plugin-jsx-a11y": "6.x",
"eslint-plugin-react": "7.x",
+ "eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
"eslint-plugin-react-hooks": "^0.0.0-experimental-fabef7a6b-20221215",
"fs-extra": "^9.0.1",
"globby": "^11.0.1",
@@ -76,7 +80,6 @@
"mdast-util-to-string": "^1.1.0",
"metro-cache": "0.72.2",
"npm-run-all": "^4.1.5",
- "patch-package": "^6.2.2",
"postcss": "^8.4.5",
"postcss-flexbugs-fixes": "4.2.1",
"postcss-preset-env": "^6.7.0",
@@ -92,12 +95,12 @@
"retext-smartypants": "^4.0.0",
"rss": "^1.2.2",
"tailwindcss": "^3.4.1",
- "typescript": "^4.0.2",
+ "typescript": "^5.7.2",
"unist-util-visit": "^2.0.3",
"webpack-bundle-analyzer": "^4.5.0"
},
"engines": {
- "node": "^16.8.0 || ^18.0.0 || ^19.0.0 || ^20.0.0"
+ "node": ">=16.8.0"
},
"nextBundleAnalysis": {
"budget": null,
@@ -107,5 +110,6 @@
"lint-staged": {
"*.{js,ts,jsx,tsx,css}": "yarn prettier",
"src/**/*.md": "yarn fix-headings"
- }
+ },
+ "packageManager": "yarn@1.22.22"
}
diff --git a/patches/next+13.4.1.patch b/patches/next+13.4.1.patch
deleted file mode 100644
index 6de490aa4..000000000
--- a/patches/next+13.4.1.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/node_modules/next/dist/server/render.js b/node_modules/next/dist/server/render.js
-index a1f8648..1b3d608 100644
---- a/node_modules/next/dist/server/render.js
-+++ b/node_modules/next/dist/server/render.js
-@@ -758,9 +758,14 @@ async function renderToHTML(req, res, pathname, query, renderOpts) {
- // Always using react concurrent rendering mode with required react version 18.x
- const renderShell = async (EnhancedApp, EnhancedComponent)=>{
- const content = renderContent(EnhancedApp, EnhancedComponent);
-- return await (0, _nodewebstreamshelper.renderToInitialStream)({
-- ReactDOMServer: _serverbrowser.default,
-- element: content
-+ return new Promise((resolve, reject) => {
-+ (0, _nodewebstreamshelper.renderToInitialStream)({
-+ ReactDOMServer: _serverbrowser.default,
-+ element: content,
-+ streamOptions: {
-+ onError: reject
-+ }
-+ }).then(resolve, reject);
- });
- };
- const createBodyResult = (0, _tracer.getTracer)().wrap(_constants2.RenderSpan.createBodyResult, (initialStream, suffix)=>{
diff --git a/patches/next-remote-watch+1.0.0.patch b/patches/next-remote-watch+1.0.0.patch
deleted file mode 100644
index c9ecef84d..000000000
--- a/patches/next-remote-watch+1.0.0.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/node_modules/next-remote-watch/bin/next-remote-watch b/node_modules/next-remote-watch/bin/next-remote-watch
-index c055b66..a2f749c 100755
---- a/node_modules/next-remote-watch/bin/next-remote-watch
-+++ b/node_modules/next-remote-watch/bin/next-remote-watch
-@@ -66,7 +66,10 @@ app.prepare().then(() => {
- }
- }
-
-- app.server.hotReloader.send('reloadPage')
-+ app.server.hotReloader.send({
-+ event: 'serverOnlyChanges',
-+ pages: ['/[[...markdownPath]]']
-+ });
- }
- )
- }
diff --git a/public/.well-known/atproto-did b/public/.well-known/atproto-did
new file mode 100644
index 000000000..ad8b0a36b
--- /dev/null
+++ b/public/.well-known/atproto-did
@@ -0,0 +1 @@
+did:plc:uorpbnp2q32vuvyeruwauyhe
\ No newline at end of file
diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png
new file mode 100644
index 000000000..5de701e13
Binary files /dev/null and b/public/android-chrome-192x192.png differ
diff --git a/public/android-chrome-384x384.png b/public/android-chrome-384x384.png
new file mode 100644
index 000000000..f42a6776e
Binary files /dev/null and b/public/android-chrome-384x384.png differ
diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png
new file mode 100644
index 000000000..2fdbf6902
Binary files /dev/null and b/public/android-chrome-512x512.png differ
diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png
new file mode 100644
index 000000000..baf1332a3
Binary files /dev/null and b/public/apple-touch-icon.png differ
diff --git a/public/browserconfig.xml b/public/browserconfig.xml
new file mode 100644
index 000000000..f9c2e67fe
--- /dev/null
+++ b/public/browserconfig.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+ #2b5797
+
+
+
diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png
new file mode 100644
index 000000000..d24cb4f76
Binary files /dev/null and b/public/favicon-16x16.png differ
diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png
new file mode 100644
index 000000000..953ae4cc3
Binary files /dev/null and b/public/favicon-32x32.png differ
diff --git a/public/favicon.ico b/public/favicon.ico
index 38fd8641c..519b939a0 100644
Binary files a/public/favicon.ico and b/public/favicon.ico differ
diff --git a/public/favicon_old.ico b/public/favicon_old.ico
new file mode 100644
index 000000000..20b59d440
Binary files /dev/null and b/public/favicon_old.ico differ
diff --git a/public/images/brand/logo_dark.svg b/public/images/brand/logo_dark.svg
new file mode 100644
index 000000000..265777fa3
--- /dev/null
+++ b/public/images/brand/logo_dark.svg
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/public/images/brand/logo_light.svg b/public/images/brand/logo_light.svg
new file mode 100644
index 000000000..bbe5a8994
--- /dev/null
+++ b/public/images/brand/logo_light.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/public/images/brand/wordmark_dark.svg b/public/images/brand/wordmark_dark.svg
new file mode 100644
index 000000000..ec028ae21
--- /dev/null
+++ b/public/images/brand/wordmark_dark.svg
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/public/images/brand/wordmark_light.svg b/public/images/brand/wordmark_light.svg
new file mode 100644
index 000000000..2de8f3cc7
--- /dev/null
+++ b/public/images/brand/wordmark_light.svg
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/public/images/docs/diagrams/prerender.dark.png b/public/images/docs/diagrams/prerender.dark.png
new file mode 100644
index 000000000..1e7d67e13
Binary files /dev/null and b/public/images/docs/diagrams/prerender.dark.png differ
diff --git a/public/images/docs/diagrams/prerender.png b/public/images/docs/diagrams/prerender.png
new file mode 100644
index 000000000..ababa5493
Binary files /dev/null and b/public/images/docs/diagrams/prerender.png differ
diff --git a/public/images/docs/diagrams/prewarm.dark.png b/public/images/docs/diagrams/prewarm.dark.png
new file mode 100644
index 000000000..461406039
Binary files /dev/null and b/public/images/docs/diagrams/prewarm.dark.png differ
diff --git a/public/images/docs/diagrams/prewarm.png b/public/images/docs/diagrams/prewarm.png
new file mode 100644
index 000000000..f6ec1c49d
Binary files /dev/null and b/public/images/docs/diagrams/prewarm.png differ
diff --git a/public/images/team/jack-pope.jpg b/public/images/team/jack-pope.jpg
new file mode 100644
index 000000000..601e5840e
Binary files /dev/null and b/public/images/team/jack-pope.jpg differ
diff --git a/public/images/team/lauren.jpg b/public/images/team/lauren.jpg
index 1485cf8ff..26d46bd2f 100644
Binary files a/public/images/team/lauren.jpg and b/public/images/team/lauren.jpg differ
diff --git a/public/images/team/lesiutin.jpg b/public/images/team/lesiutin.jpg
new file mode 100644
index 000000000..edfc942e0
Binary files /dev/null and b/public/images/team/lesiutin.jpg differ
diff --git a/public/images/uwu.png b/public/images/uwu.png
new file mode 100644
index 000000000..a09d245ea
Binary files /dev/null and b/public/images/uwu.png differ
diff --git a/public/mstile-150x150.png b/public/mstile-150x150.png
new file mode 100644
index 000000000..d36e7ee9e
Binary files /dev/null and b/public/mstile-150x150.png differ
diff --git a/public/safari-pinned-tab.svg b/public/safari-pinned-tab.svg
new file mode 100644
index 000000000..7e4874b2f
--- /dev/null
+++ b/public/safari-pinned-tab.svg
@@ -0,0 +1,60 @@
+
+
+
diff --git a/public/site.webmanifest b/public/site.webmanifest
new file mode 100644
index 000000000..337446d52
--- /dev/null
+++ b/public/site.webmanifest
@@ -0,0 +1,19 @@
+{
+ "name": "React",
+ "short_name": "React",
+ "icons": [
+ {
+ "src": "/android-chrome-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "/android-chrome-384x384.png",
+ "sizes": "384x384",
+ "type": "image/png"
+ }
+ ],
+ "theme_color": "#23272f",
+ "background_color": "#23272f",
+ "display": "standalone"
+}
diff --git a/scripts/generateRss.js b/scripts/generateRss.js
new file mode 100644
index 000000000..e0f3d5561
--- /dev/null
+++ b/scripts/generateRss.js
@@ -0,0 +1,6 @@
+/*
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ */
+const {generateRssFeed} = require('../src/utils/rss');
+
+generateRssFeed();
diff --git a/src/components/ButtonLink.tsx b/src/components/ButtonLink.tsx
index 15ab83f2b..23c971756 100644
--- a/src/components/ButtonLink.tsx
+++ b/src/components/ButtonLink.tsx
@@ -26,7 +26,8 @@ function ButtonLink({
className,
'active:scale-[.98] transition-transform inline-flex font-bold items-center outline-none focus:outline-none focus-visible:outline focus-visible:outline-link focus:outline-offset-2 focus-visible:dark:focus:outline-link-dark leading-snug',
{
- 'bg-link text-white hover:bg-opacity-80': type === 'primary',
+ 'bg-link text-white dark:bg-brand-dark dark:text-secondary hover:bg-opacity-80':
+ type === 'primary',
'text-primary dark:text-primary-dark shadow-secondary-button-stroke dark:shadow-secondary-button-stroke-dark hover:bg-gray-40/5 active:bg-gray-40/10 hover:dark:bg-gray-60/5 active:dark:bg-gray-60/10':
type === 'secondary',
'text-lg py-3 rounded-full px-4 sm:px-6': size === 'lg',
diff --git a/src/components/ExternalLink.tsx b/src/components/ExternalLink.tsx
index 38b1f2c5f..13fe6d3a9 100644
--- a/src/components/ExternalLink.tsx
+++ b/src/components/ExternalLink.tsx
@@ -1,13 +1,17 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
+import type {DetailedHTMLProps, AnchorHTMLAttributes} from 'react';
export function ExternalLink({
href,
target,
children,
...props
-}: JSX.IntrinsicElements['a']) {
+}: DetailedHTMLProps<
+ AnchorHTMLAttributes,
+ HTMLAnchorElement
+>) {
return (
{children}
diff --git a/src/components/Icon/IconArrow.tsx b/src/components/Icon/IconArrow.tsx
index 714cccd82..61e4e52cd 100644
--- a/src/components/Icon/IconArrow.tsx
+++ b/src/components/Icon/IconArrow.tsx
@@ -4,9 +4,10 @@
import {memo} from 'react';
import cn from 'classnames';
+import type {SVGProps} from 'react';
export const IconArrow = memo<
- JSX.IntrinsicElements['svg'] & {
+ SVGProps & {
/**
* The direction the arrow should point.
* `start` and `end` are relative to the current locale.
diff --git a/src/components/Icon/IconArrowSmall.tsx b/src/components/Icon/IconArrowSmall.tsx
index 6653dc387..4a3d3ad02 100644
--- a/src/components/Icon/IconArrowSmall.tsx
+++ b/src/components/Icon/IconArrowSmall.tsx
@@ -4,9 +4,10 @@
import {memo} from 'react';
import cn from 'classnames';
+import type {SVGProps} from 'react';
export const IconArrowSmall = memo<
- JSX.IntrinsicElements['svg'] & {
+ SVGProps & {
/**
* The direction the arrow should point.
* `start` and `end` are relative to the current locale.
diff --git a/src/components/Icon/IconBsky.tsx b/src/components/Icon/IconBsky.tsx
new file mode 100644
index 000000000..5d461556f
--- /dev/null
+++ b/src/components/Icon/IconBsky.tsx
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ */
+
+import {memo} from 'react';
+import type {SVGProps} from 'react';
+
+export const IconBsky = memo>(function IconBsky(props) {
+ return (
+
+ );
+});
diff --git a/src/components/Icon/IconCanary.tsx b/src/components/Icon/IconCanary.tsx
index a7782b141..7f584fed7 100644
--- a/src/components/Icon/IconCanary.tsx
+++ b/src/components/Icon/IconCanary.tsx
@@ -4,29 +4,35 @@
import {memo} from 'react';
-export const IconCanary = memo(
- function IconCanary({className, title}) {
- return (
-
- );
+export const IconCanary = memo<
+ JSX.IntrinsicElements['svg'] & {title?: string; size?: 's' | 'md'}
+>(function IconCanary(
+ {className, title, size} = {
+ className: undefined,
+ title: undefined,
+ size: 'md',
}
-);
+) {
+ return (
+
+ );
+});
diff --git a/src/components/Icon/IconClose.tsx b/src/components/Icon/IconClose.tsx
index 5ad352cf0..d685fb217 100644
--- a/src/components/Icon/IconClose.tsx
+++ b/src/components/Icon/IconClose.tsx
@@ -3,8 +3,9 @@
*/
import {memo} from 'react';
+import type {SVGProps} from 'react';
-export const IconClose = memo(function IconClose(
+export const IconClose = memo>(function IconClose(
props
) {
return (
diff --git a/src/components/Icon/IconFacebookCircle.tsx b/src/components/Icon/IconFacebookCircle.tsx
index 0900d6815..7f1080afa 100644
--- a/src/components/Icon/IconFacebookCircle.tsx
+++ b/src/components/Icon/IconFacebookCircle.tsx
@@ -3,8 +3,9 @@
*/
import {memo} from 'react';
+import type {SVGProps} from 'react';
-export const IconFacebookCircle = memo(
+export const IconFacebookCircle = memo>(
function IconFacebookCircle(props) {
return (