From 904f8fdd7b54243a7eff9809ffd7b1916b4fc6e0 Mon Sep 17 00:00:00 2001 From: AlexZengArchiPro Date: Fri, 9 Aug 2024 11:32:53 +1200 Subject: [PATCH 1/4] feat: first try of ReactJs 19.x + NextJs 15.x + MUI 6.x --- README.md | 12 +- package.json | 12 +- src/components/Homepage.tsx | 2 + .../shared/DisplayRandomPicture.tsx | 91 ++-- src/components/shared/ReactActionForm.tsx | 206 ++++++++++ src/components/shared/ReactHookForm.tsx | 1 - yarn.lock | 388 +++++++++++++----- 7 files changed, 547 insertions(+), 165 deletions(-) create mode 100644 src/components/shared/ReactActionForm.tsx diff --git a/README.md b/README.md index c36b92c..69f4dc8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# NextJs 14.x + MUI 5.x + React Hook Form + TypeScript Starter and Boilerplate +# ReactJs 19.x + NextJs 15.x + MUI 6.x + TypeScript Starter and Boilerplate
-

2024/2025: 🔋 NextJs 14.x + MUI 5.x + TypeScript Starter

-

The scaffold for NextJs 14.x (App Router), React Hook Form, Material UI(MUI 5.x),Typescript and ESLint, and TypeScript with Absolute Import, Seo, Link component, pre-configured with Husky.

+

2024/2025: 🔋 ReactJs 19.x + NextJs 15.x + MUI 6.x + TypeScript Starter

+

The scaffold for NextJs 15.x (App Router), React Hook Form, Material UI(MUI 6.x),Typescript and ESLint, and TypeScript with Absolute Import, Seo, Link component, pre-configured with Husky.

-

With simple example of NextJs API, React-hook-form with zod, fetch remote api, 404/500 error pages, MUI SSR usage, Styled component, MUI AlertBar, MUI confirmation dialog, Loading button, Client-side component & React Context update hook

+

With simple example of ReactJs 19.x, NextJs 15.x API, React-hook-form with zod, fetch remote api, 404/500 error pages, MUI SSR usage, Styled component, MUI AlertBar, MUI confirmation dialog, Loading button, Client-side component & React Context update hook

🚘🚘🚘 [**Click here to see an online demo**](https://mui-nextjs-ts.vercel.app) 🚘🚘🚘 @@ -22,8 +22,8 @@ If you prefer Tailwind css, check this: [Tailwind-CSS-Version](https://github.co This repository is 🔋 battery packed with: -- ⚡️ Next.js 14.x with App Router -- ⚛️ React 18.x +- ⚡️ Next.js 15.x with App Router +- ⚛️ React 19.x - ✨ TypeScript - 💨 Material UI — Ready to use Material Design components [check here for the usage](https://mui.com/material-ui/getting-started/usage/) - 🎨 React Hook Form — Performant, flexible and extensible forms with easy-to-use validation diff --git a/package.json b/package.json index 622b210..6cf62ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "nextjs-materia-mui-typescript-hook-form-scaffold-boilerplate-starter", - "version": "0.1.0", + "name": "react19-nextjs15-materia-mui6-typescript-hook-form-scaffold-boilerplate-starter", + "version": "2.0", "private": true, "scripts": { "dev": "next dev", @@ -24,9 +24,9 @@ "@mui/icons-material": "^5.14.9", "@mui/material": "^5.14.10", "dayjs": "^1.11.10", - "next": "^14.0.1", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "next": "^15.0.0-rc.0", + "react": "^19.0.0-rc-512b09b2-20240718", + "react-dom": "^19.0.0-rc-512b09b2-20240718", "react-hook-form": "^7.46.2", "react-icons": "^4.10.1", "zod": "^3.22.4" @@ -42,7 +42,7 @@ "@typescript-eslint/parser": "^5.62.0", "autoprefixer": "^10.4.14", "eslint": "^8.45.0", - "eslint-config-next": "^14.0.1", + "eslint-config-next": "^15.0.0-rc.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-unused-imports": "^2.0.0", diff --git a/src/components/Homepage.tsx b/src/components/Homepage.tsx index f52e658..80006d8 100644 --- a/src/components/Homepage.tsx +++ b/src/components/Homepage.tsx @@ -6,6 +6,7 @@ import { ClientProvider } from '@/hooks/useClientContext'; import DisplayRandomPicture from '@/components/shared/DisplayRandomPicture'; import PageFooter from '@/components/shared/PageFooter'; +import ReactActionForm from '@/components/shared/ReactActionForm'; import ReactHookForm from '@/components/shared/ReactHookForm'; import { SITE_CONFIG } from '@/constants'; @@ -67,6 +68,7 @@ export default function Homepage({ component) + diff --git a/src/components/shared/DisplayRandomPicture.tsx b/src/components/shared/DisplayRandomPicture.tsx index 6cb18d7..66d5a22 100644 --- a/src/components/shared/DisplayRandomPicture.tsx +++ b/src/components/shared/DisplayRandomPicture.tsx @@ -8,7 +8,7 @@ import Avatar from '@mui/material/Avatar'; import Button from '@mui/material/Button'; import { purple } from '@mui/material/colors'; import Stack from '@mui/material/Stack'; -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState, useTransition } from 'react'; import { useAlertBar } from '@/hooks/useAlertBar'; import { useClientContext } from '@/hooks/useClientContext'; @@ -19,56 +19,56 @@ import { getApiResponse } from '@/utils/shared/get-api-response'; const DisplayRandomPicture = () => { const [imageUrl, setImageUrl] = useState(''); - const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const { fetchCount, updateClientCtx } = useClientContext(); const { setAlertBarProps, renderAlertBar } = useAlertBar(); const renderCountRef = React.useRef(0); + const [isPending, startTransition] = useTransition(); const fetchRandomPicture = async () => { - if (loading) { - setAlertBarProps({ - message: 'Please wait for the current fetch to complete', - severity: 'warning', - }); - return; - } - setLoading(true); - setError(''); + startTransition(async () => { + if (isPending) { + setAlertBarProps({ + message: 'Please wait for the current fetch to complete', + severity: 'warning', + }); + return; + } + setError(''); - try { - const response = await getApiResponse({ - apiEndpoint: 'https://picsum.photos/300/160', - timeout: 5001, - }); + try { + const response = await getApiResponse({ + apiEndpoint: 'https://picsum.photos/300/160', + timeout: 5001, + }); - if (!response?.url) { - throw new Error('Error fetching the image, no response url'); - } + if (!response?.url) { + throw new Error('Error fetching the image, no response url'); + } - setImageUrl(response.url); - updateClientCtx({ fetchCount: fetchCount + 1 }); - setAlertBarProps({ - message: 'A random picture fetched successfully', - severity: 'info', - }); - } catch (error) { - const errorMsg = - error instanceof Error ? error.message : 'Error fetching the image'; + setImageUrl(response.url); + updateClientCtx({ fetchCount: fetchCount + 1 }); + setAlertBarProps({ + message: 'A random picture fetched successfully', + severity: 'info', + }); + } catch (error) { + const errorMsg = + error instanceof Error ? error.message : 'Error fetching the image'; - setError(errorMsg); - setAlertBarProps({ - message: errorMsg, - severity: 'error', - }); - setLoading(false); - } finally { - setLoading(false); - } + setError(errorMsg); + setAlertBarProps({ + message: errorMsg, + severity: 'error', + }); + } finally { + // setLoading(false); + } + }); }; useEffect(() => { - if (renderCountRef.current === 0 && !loading) { + if (renderCountRef.current === 0 && !isPending) { fetchRandomPicture(); } renderCountRef.current += 1; @@ -82,7 +82,6 @@ const DisplayRandomPicture = () => { spacing={2} sx={{ position: 'relative', width: '300px', margin: '0 auto' }} > - {error &&

{error}

} {imageUrl && ( { sx={{ width: 300, height: 150, borderRadius: '10px' }} /> )} + {error &&

{error}

}
- {loading && Loading...} Component Render Count:{' '} + {isPending && Loading...} Component Render Count:{' '} {renderCountRef.current + 1}
{imageUrl && ( - + @@ -130,7 +133,7 @@ const spin = keyframes` transform: rotate(360deg); } `; -const StyledRefreshButton = styled.div<{ loading?: boolean }>` +const StyledRefreshButton = styled.div<{ loading: number }>` position: absolute; right: 0; top: 0; diff --git a/src/components/shared/ReactActionForm.tsx b/src/components/shared/ReactActionForm.tsx new file mode 100644 index 0000000..437797a --- /dev/null +++ b/src/components/shared/ReactActionForm.tsx @@ -0,0 +1,206 @@ +'use client'; + +import styled from '@emotion/styled'; +import { Save } from '@mui/icons-material'; +import { + Avatar, + Box, + Button, + FormHelperText, + Stack, + TextField, +} from '@mui/material'; +import { purple } from '@mui/material/colors'; +import React, { useActionState, useOptimistic } from 'react'; +import { z, ZodError } from 'zod'; + +import { useAlertBar } from '@/hooks/useAlertBar'; +import { useClientContext } from '@/hooks/useClientContext'; + +import SubmitButton from '@/components/shared/SubmitButton'; + +import { consoleLog } from '@/utils/shared/console-log'; +import { getApiResponse } from '@/utils/shared/get-api-response'; + +const zodSchema = z.object({ + name: z + .string() + .min(3, { message: 'Name must contain at least 3 characters' }) + .nonempty({ message: 'Name is required' }), + email: z + .string() + .min(10, { message: 'Email must contain at least 10 characters' }) + .email({ message: 'Invalid email address' }), +}); + +const StyledForm = styled.form` + .MuiFormHelperText-root { + text-align: center; + color: darkred; + margin-bottom: 1rem; + } +`; + +type FormValues = z.infer; + +const ReactActionForm: React.FC = () => { + const apiEndpoint = '/api/test'; + const [apiResult, setApiResult] = React.useState(); + const [optimisticApiResult, setOptimisticApiResult] = useOptimistic< + FormValues | undefined + >(undefined); + + const { setAlertBarProps, renderAlertBar } = useAlertBar(); + + const { fetchCount, updateClientCtx } = useClientContext(); + const [formErrors, setFormErrors] = React.useState>( + {} + ); + + const resolveZodError = (error: ZodError): Record => { + const errors: Record = {}; + error.errors.forEach((err) => { + if (err.path && err.path.length > 0) { + const field = err.path[0]; + errors[field as string] = err.message; + } + }); + return errors; + }; + + const submitFormFn = async ( + previousState: FormValues | undefined, + formData: FormData + ) => { + const formFieldValues = Object.fromEntries(formData) as FormValues; + + try { + const zodResult = zodSchema.safeParse(formFieldValues); + if (!zodResult.success) { + if (zodResult.error instanceof ZodError) { + const newErrors = resolveZodError(zodResult.error); + setFormErrors(newErrors); + } + setAlertBarProps({ + message: 'Please fix the form errors', + severity: 'warning', + autoHideSeconds: 4, + }); + throw new Error('Invalid zodSchema form data'); + } + setOptimisticApiResult(formFieldValues); + setFormErrors({}); + const result = await getApiResponse<{ + reqData: FormValues; + }>({ + apiEndpoint, + method: 'POST', + requestData: JSON.stringify(Object.fromEntries(formData)), + }); + setApiResult(result?.reqData); + await new Promise((resolve) => setTimeout(resolve, 2000)); + + setAlertBarProps({ + message: 'Form submitted successfully', + severity: 'success', + }); + updateClientCtx({ fetchCount: fetchCount + 1 }); + } catch (error) { + consoleLog('submitFormFn ERROR', error, formData); + setAlertBarProps({ + message: 'Form submission failed', + severity: 'error', + }); + } + + return formFieldValues; + }; + + const [actionState, submitAction, isSubmitting] = useActionState( + submitFormFn, + { + name: 'John Doe', + email: 'john@react19.org', + } + ); + + return ( + + + + {!isSubmitting && formErrors.name && ( + + {formErrors.name} + + )} + + + + + {!isSubmitting && formErrors.email && ( + + {formErrors.email} + + )} + + {optimisticApiResult && ( + + React19 useOptimistic() API result: {optimisticApiResult.name} &{' '} + {optimisticApiResult.email} + + )} + {apiResult && !isSubmitting && ( + + React19 action-form API result from {apiEndpoint}: {apiResult.name} &{' '} + {apiResult.email} + + )} + + + + + + + +
Total fetch count from React Context:
+ + {fetchCount} + +
+
+ + {renderAlertBar()} +
+ ); +}; + +export default ReactActionForm; diff --git a/src/components/shared/ReactHookForm.tsx b/src/components/shared/ReactHookForm.tsx index 6ecd369..e349b8f 100644 --- a/src/components/shared/ReactHookForm.tsx +++ b/src/components/shared/ReactHookForm.tsx @@ -78,7 +78,6 @@ const ReactHookForm: React.FC = () => { requestData: JSON.stringify(data), }); setApiResult(result?.reqData); - consoleLog('getApiResponse result', result, errors); await new Promise((resolve) => setTimeout(resolve, 1000)); setIsSubmitting(false); diff --git a/yarn.lock b/yarn.lock index e44c175..8ffa374 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1226,6 +1226,13 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@emnapi/runtime@^1.1.1": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.2.0.tgz#71d018546c3a91f3b51106530edbc056b9f2f2e3" + integrity sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ== + dependencies: + tslib "^2.4.0" + "@emotion/babel-plugin@^11.12.0": version "11.12.0" resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.12.0.tgz#7b43debb250c313101b3f885eba634f1d723fcc2" @@ -1389,6 +1396,119 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@img/sharp-darwin-arm64@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.4.tgz#a1cf4a7febece334f16e0328b9689f05797d7aec" + integrity sha512-p0suNqXufJs9t3RqLBO6vvrgr5OhgbWp76s5gTRvdmxmuv9E1rcaqGUsl3l4mKVmXPkTkTErXediAui4x+8PSA== + optionalDependencies: + "@img/sharp-libvips-darwin-arm64" "1.0.2" + +"@img/sharp-darwin-x64@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.4.tgz#f77be2d7c3609d3e77cd337b199a772e07b87bd2" + integrity sha512-0l7yRObwtTi82Z6ebVI2PnHT8EB2NxBgpK2MiKJZJ7cz32R4lxd001ecMhzzsZig3Yv9oclvqqdV93jo9hy+Dw== + optionalDependencies: + "@img/sharp-libvips-darwin-x64" "1.0.2" + +"@img/sharp-libvips-darwin-arm64@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.2.tgz#b69f49fecbe9572378675769b189410721b0fa53" + integrity sha512-tcK/41Rq8IKlSaKRCCAuuY3lDJjQnYIW1UXU1kxcEKrfL8WR7N6+rzNoOxoQRJWTAECuKwgAHnPvqXGN8XfkHA== + +"@img/sharp-libvips-darwin-x64@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.2.tgz#5665da7360d8e5ed7bee314491c8fe736b6a3c39" + integrity sha512-Ofw+7oaWa0HiiMiKWqqaZbaYV3/UGL2wAPeLuJTx+9cXpCRdvQhCLG0IH8YGwM0yGWGLpsF4Su9vM1o6aer+Fw== + +"@img/sharp-libvips-linux-arm64@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.2.tgz#8a05e5e9e9b760ff46561e32f19bd5e035fa881c" + integrity sha512-x7kCt3N00ofFmmkkdshwj3vGPCnmiDh7Gwnd4nUwZln2YjqPxV1NlTyZOvoDWdKQVDL911487HOueBvrpflagw== + +"@img/sharp-libvips-linux-arm@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.2.tgz#0fd33b9bf3221948ce0ca7a5a725942626577a03" + integrity sha512-iLWCvrKgeFoglQxdEwzu1eQV04o8YeYGFXtfWU26Zr2wWT3q3MTzC+QTCO3ZQfWd3doKHT4Pm2kRmLbupT+sZw== + +"@img/sharp-libvips-linux-s390x@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.2.tgz#4b89150ec91b256ee2cbb5bb125321bf029a4770" + integrity sha512-cmhQ1J4qVhfmS6szYW7RT+gLJq9dH2i4maq+qyXayUSn9/3iY2ZeWpbAgSpSVbV2E1JUL2Gg7pwnYQ1h8rQIog== + +"@img/sharp-libvips-linux-x64@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.2.tgz#947ccc22ca5bc8c8cfe921b39a5fdaebc5e39f3f" + integrity sha512-E441q4Qdb+7yuyiADVi5J+44x8ctlrqn8XgkDTwr4qPJzWkaHwD489iZ4nGDgcuya4iMN3ULV6NwbhRZJ9Z7SQ== + +"@img/sharp-libvips-linuxmusl-arm64@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.2.tgz#821d58ce774f0f8bed065b69913a62f65d512f2f" + integrity sha512-3CAkndNpYUrlDqkCM5qhksfE+qSIREVpyoeHIU6jd48SJZViAmznoQQLAv4hVXF7xyUB9zf+G++e2v1ABjCbEQ== + +"@img/sharp-libvips-linuxmusl-x64@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.2.tgz#4309474bd8b728a61af0b3b4fad0c476b5f3ccbe" + integrity sha512-VI94Q6khIHqHWNOh6LLdm9s2Ry4zdjWJwH56WoiJU7NTeDwyApdZZ8c+SADC8OH98KWNQXnE01UdJ9CSfZvwZw== + +"@img/sharp-linux-arm64@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.4.tgz#bd390113e256487041411b988ded13a26cfc5f95" + integrity sha512-2800clwVg1ZQtxwSoTlHvtm9ObgAax7V6MTAB/hDT945Tfyy3hVkmiHpeLPCKYqYR1Gcmv1uDZ3a4OFwkdBL7Q== + optionalDependencies: + "@img/sharp-libvips-linux-arm64" "1.0.2" + +"@img/sharp-linux-arm@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.4.tgz#14ecc81f38f75fb4cd7571bc83311746d6745fca" + integrity sha512-RUgBD1c0+gCYZGCCe6mMdTiOFS0Zc/XrN0fYd6hISIKcDUbAW5NtSQW9g/powkrXYm6Vzwd6y+fqmExDuCdHNQ== + optionalDependencies: + "@img/sharp-libvips-linux-arm" "1.0.2" + +"@img/sharp-linux-s390x@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.4.tgz#119e8081e2c6741b5ac908fe02244e4c559e525f" + integrity sha512-h3RAL3siQoyzSoH36tUeS0PDmb5wINKGYzcLB5C6DIiAn2F3udeFAum+gj8IbA/82+8RGCTn7XW8WTFnqag4tQ== + optionalDependencies: + "@img/sharp-libvips-linux-s390x" "1.0.2" + +"@img/sharp-linux-x64@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.4.tgz#21d4c137b8da9a313b069ff5c920ded709f853d7" + integrity sha512-GoR++s0XW9DGVi8SUGQ/U4AeIzLdNjHka6jidVwapQ/JebGVQIpi52OdyxCNVRE++n1FCLzjDovJNozif7w/Aw== + optionalDependencies: + "@img/sharp-libvips-linux-x64" "1.0.2" + +"@img/sharp-linuxmusl-arm64@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.4.tgz#f3fde68fd67b85a32da6f1155818c3b58b8e7ae0" + integrity sha512-nhr1yC3BlVrKDTl6cO12gTpXMl4ITBUZieehFvMntlCXFzH2bvKG76tBL2Y/OqhupZt81pR7R+Q5YhJxW0rGgQ== + optionalDependencies: + "@img/sharp-libvips-linuxmusl-arm64" "1.0.2" + +"@img/sharp-linuxmusl-x64@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.4.tgz#44373724aecd7b69900e0578228144e181db7892" + integrity sha512-uCPTku0zwqDmZEOi4ILyGdmW76tH7dm8kKlOIV1XC5cLyJ71ENAAqarOHQh0RLfpIpbV5KOpXzdU6XkJtS0daw== + optionalDependencies: + "@img/sharp-libvips-linuxmusl-x64" "1.0.2" + +"@img/sharp-wasm32@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-wasm32/-/sharp-wasm32-0.33.4.tgz#88e3f18d7e7cd8cfe1af98e9963db4d7b6491435" + integrity sha512-Bmmauh4sXUsUqkleQahpdNXKvo+wa1V9KhT2pDA4VJGKwnKMJXiSTGphn0gnJrlooda0QxCtXc6RX1XAU6hMnQ== + dependencies: + "@emnapi/runtime" "^1.1.1" + +"@img/sharp-win32-ia32@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.4.tgz#b1c772dd2952e983980b1eb85808fa8129484d46" + integrity sha512-99SJ91XzUhYHbx7uhK3+9Lf7+LjwMGQZMDlO/E/YVJ7Nc3lyDFZPGhjwiYdctoH2BOzW9+TnfqcaMKt0jHLdqw== + +"@img/sharp-win32-x64@0.33.4": + version "0.33.4" + resolved "https://registry.yarnpkg.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.4.tgz#106f911134035b4157ec92a0c154a6b6f88fa4c1" + integrity sha512-3QLocdTRVIrFNye5YocZl+KKpYKP+fksi1QhmOArgx7GyhIbQp/WrJRu176jm8IxromS7RIkzMiMINVdBtC8Aw== + "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -1731,62 +1851,62 @@ prop-types "^15.8.1" react-is "^18.3.1" -"@next/env@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.5.tgz#1d9328ab828711d3517d0a1d505acb55e5ef7ad0" - integrity sha512-/zZGkrTOsraVfYjGP8uM0p6r0BDT6xWpkjdVbcz66PJVSpwXX3yNiRycxAuDfBKGWBrZBXRuK/YVlkNgxHGwmA== +"@next/env@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/env/-/env-15.0.0-rc.0.tgz#c772c9261dad10b1a1e72693c7dadfe2e35e6c5a" + integrity sha512-6W0ndQvHR9sXcqcKeR/inD2UTRCs9+VkSK3lfaGmEuZs7EjwwXMO2BPYjz9oBrtfPL3xuTjtXsHKSsalYQ5l1Q== -"@next/eslint-plugin-next@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.5.tgz#f7e3ff3efe40a2855e5f29bc2692175f85913ba8" - integrity sha512-LY3btOpPh+OTIpviNojDpUdIbHW9j0JBYBjsIp8IxtDFfYFyORvw3yNq6N231FVqQA7n7lwaf7xHbVJlA1ED7g== +"@next/eslint-plugin-next@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-15.0.0-rc.0.tgz#56850feb4961e82596947c5150106fe4cd92dc6d" + integrity sha512-/rQXrN47qxlFHtZg77LdcCYbL54ogQuLeqIGV/6HMGnZH8iL81XEFOITO8GZjOukR5i3BbwyfrsmIqFl/scg+w== dependencies: glob "10.3.10" -"@next/swc-darwin-arm64@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.5.tgz#d0a160cf78c18731c51cc0bff131c706b3e9bb05" - integrity sha512-/9zVxJ+K9lrzSGli1///ujyRfon/ZneeZ+v4ptpiPoOU+GKZnm8Wj8ELWU1Pm7GHltYRBklmXMTUqM/DqQ99FQ== - -"@next/swc-darwin-x64@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.5.tgz#eb832a992407f6e6352eed05a073379f1ce0589c" - integrity sha512-vXHOPCwfDe9qLDuq7U1OYM2wUY+KQ4Ex6ozwsKxp26BlJ6XXbHleOUldenM67JRyBfVjv371oneEvYd3H2gNSA== - -"@next/swc-linux-arm64-gnu@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.5.tgz#098fdab57a4664969bc905f5801ef5a89582c689" - integrity sha512-vlhB8wI+lj8q1ExFW8lbWutA4M2ZazQNvMWuEDqZcuJJc78iUnLdPPunBPX8rC4IgT6lIx/adB+Cwrl99MzNaA== - -"@next/swc-linux-arm64-musl@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.5.tgz#243a1cc1087fb75481726dd289c7b219fa01f2b5" - integrity sha512-NpDB9NUR2t0hXzJJwQSGu1IAOYybsfeB+LxpGsXrRIb7QOrYmidJz3shzY8cM6+rO4Aojuef0N/PEaX18pi9OA== - -"@next/swc-linux-x64-gnu@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.5.tgz#b8a2e436387ee4a52aa9719b718992e0330c4953" - integrity sha512-8XFikMSxWleYNryWIjiCX+gU201YS+erTUidKdyOVYi5qUQo/gRxv/3N1oZFCgqpesN6FPeqGM72Zve+nReVXQ== - -"@next/swc-linux-x64-musl@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.5.tgz#cb8a9adad5fb8df86112cfbd363aab5c6d32757b" - integrity sha512-6QLwi7RaYiQDcRDSU/os40r5o06b5ue7Jsk5JgdRBGGp8l37RZEh9JsLSM8QF0YDsgcosSeHjglgqi25+m04IQ== - -"@next/swc-win32-arm64-msvc@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.5.tgz#81f996c1c38ea0900d4e7719cc8814be8a835da0" - integrity sha512-1GpG2VhbspO+aYoMOQPQiqc/tG3LzmsdBH0LhnDS3JrtDx2QmzXe0B6mSZZiN3Bq7IOMXxv1nlsjzoS1+9mzZw== - -"@next/swc-win32-ia32-msvc@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.5.tgz#f61c74ce823e10b2bc150e648fc192a7056422e0" - integrity sha512-Igh9ZlxwvCDsu6438FXlQTHlRno4gFpJzqPjSIBZooD22tKeI4fE/YMRoHVJHmrQ2P5YL1DoZ0qaOKkbeFWeMg== - -"@next/swc-win32-x64-msvc@14.2.5": - version "14.2.5" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.5.tgz#ed199a920efb510cfe941cd75ed38a7be21e756f" - integrity sha512-tEQ7oinq1/CjSG9uSTerca3v4AZ+dFa+4Yu6ihaG8Ud8ddqLQgFGcnwYls13H5X5CPDPZJdYxyeMui6muOLd4g== +"@next/swc-darwin-arm64@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.0-rc.0.tgz#d083d397246b2becfa41c724f43c3a31d682b1fb" + integrity sha512-4OpTXvAWcSabXA5d688zdUwa3sfT9QrLnHMdpv4q2UDnnuqmOI0xLb6lrOxwpi+vHJNkneuNLqyc5HGBhkqL6A== + +"@next/swc-darwin-x64@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.0-rc.0.tgz#f7066acd555b5db0037768dd311e0b201b4ebf08" + integrity sha512-/TD8M9DT244uhtFA8P/0DUbM7ftg2zio6yOo6ajV16vNjkcug9Kt9//Wa4SrJjWcsGZpViLctOlwn3/6JFAuAA== + +"@next/swc-linux-arm64-gnu@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.0-rc.0.tgz#ecce3b9cfed770f372b6cf05170ff2c89e909642" + integrity sha512-3VTO32938AcqOlOI/U61/MIpeYrblP22VU1GrgmMQJozsAXEJgLCgf3wxZtn61/FG4Yc0tp7rPZE2t1fIGe0+w== + +"@next/swc-linux-arm64-musl@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.0-rc.0.tgz#39d2e2687181e8c7fc88774cb106a99374b25dce" + integrity sha512-0kDnxM3AfrrHFJ/wTkjkv7cVHIaGwv+CzDg9lL2BoLEM4kMQhH20DTsBOMqpTpo1K2KCg67LuTGd3QOITT5uFQ== + +"@next/swc-linux-x64-gnu@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.0-rc.0.tgz#853b80cd84487742fce2e81908a904e6f5125daf" + integrity sha512-fPMNahzqYFjm5h0ncJ5+F3NrShmWhpusM+zrQl01MMU0Ed5xsL4pJJDSuXV4wPkNUSjCP3XstTjxR5kBdO4juQ== + +"@next/swc-linux-x64-musl@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.0-rc.0.tgz#3c0715879189593e0e9a5d30c2472cec26ac781a" + integrity sha512-7/FLgOqrrQAxOVQrxfr3bGgZ83pSCmc2S3TXBILnHw0S8qLxmFjhSjH5ogaDmjrES/PSYMaX1FsP5Af88hp7Gw== + +"@next/swc-win32-arm64-msvc@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.0-rc.0.tgz#97be1f0fcf7319f3cad5046f2f153d585d25c312" + integrity sha512-5wcqoYHh7hbdghjH6Xs3i5/f0ov+i1Xw2E3O+BzZNESYVLgCM1q7KJu5gdGFoXA2gz5XaKF/VBcYHikLzyjgmA== + +"@next/swc-win32-ia32-msvc@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-15.0.0-rc.0.tgz#3518e7da723ff92face4d40c18e299fc4a27156a" + integrity sha512-/hqOmYRTvtBPToE4Dbl9n+sLYU7DPd52R+TtjIrrEzTMgFo2/d7un3sD7GKmb2OwOj/ExyGv6Bd/JzytBVxXlw== + +"@next/swc-win32-x64-msvc@15.0.0-rc.0": + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.0-rc.0.tgz#e6343051a5bf1e071a67553fa6f3726b64dcf54e" + integrity sha512-2Jly5nShvCUzzngP3RzdQ3JcuEcHcnIEvkvZDCXqFAK+bWks4+qOkEUO1QIAERQ99J5J9/1AN/8zFBme3Mm57A== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -1949,17 +2069,11 @@ "@svgr/plugin-jsx" "8.1.0" "@svgr/plugin-svgo" "8.1.0" -"@swc/counter@^0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.3.tgz#cc7463bd02949611c6329596fccd2b0ec782b0e9" - integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ== - -"@swc/helpers@0.5.5": - version "0.5.5" - resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.5.tgz#12689df71bfc9b21c4f4ca00ae55f2f16c8b77c0" - integrity sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A== +"@swc/helpers@0.5.11": + version "0.5.11" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.11.tgz#5bab8c660a6e23c13b2d23fcd1ee44a2db1b0cb7" + integrity sha512-YNlnKRWF2sVojTpIyzwou9XoTNbzbzONwRhOoniEioF1AtaitTvVZblaQRrAzChWQ1bLYyYSWzM18y4WwgzJ+A== dependencies: - "@swc/counter" "^0.1.3" tslib "^2.4.0" "@testing-library/dom@^8.5.0": @@ -2975,11 +3089,27 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== -color-name@~1.1.4: +color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-string@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" + integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/color/-/color-4.2.3.tgz#d781ecb5e57224ee43ea9627560107c0e0c6463a" + integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== + dependencies: + color-convert "^2.0.1" + color-string "^1.9.0" + colorette@^2.0.16: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" @@ -3320,6 +3450,11 @@ dequal@^2.0.3: resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== +detect-libc@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" + integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -3633,12 +3768,12 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-next@^14.0.1: - version "14.2.5" - resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-14.2.5.tgz#cdd43d89047eb7391ba25445d5855b4600b6adb9" - integrity sha512-zogs9zlOiZ7ka+wgUnmcM0KBEDjo4Jis7kxN1jvC0N4wynQ2MIx/KBkg4mVF63J5EK4W0QMCn7xO3vNisjaAoA== +eslint-config-next@^15.0.0-rc.0: + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-15.0.0-rc.0.tgz#45071f389072f9b061ad84f26843120ed0c62cba" + integrity sha512-c23lNAAt3oWQ9KtCzJvcApteCJgrntJHc/cgRNbBwrQ3ssx795CiV4hptdDQRmUm7y8VZV3yfrCRrnHMyQ4aOQ== dependencies: - "@next/eslint-plugin-next" "14.2.5" + "@next/eslint-plugin-next" "15.0.0-rc.0" "@rushstack/eslint-patch" "^1.3.3" "@typescript-eslint/parser" "^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0" eslint-import-resolver-node "^0.3.6" @@ -4426,6 +4561,11 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + is-async-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646" @@ -5408,7 +5548,7 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" -loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -5620,28 +5760,29 @@ next-sitemap@^2.5.28: "@corex/deepmerge" "^2.6.148" minimist "^1.2.6" -next@^14.0.1: - version "14.2.5" - resolved "https://registry.yarnpkg.com/next/-/next-14.2.5.tgz#afe4022bb0b752962e2205836587a289270efbea" - integrity sha512-0f8aRfBVL+mpzfBjYfQuLWh2WyAwtJXCRfkPF4UJ5qd2YwrHczsrSzXU4tRMV0OAxR8ZJZWPFn6uhSC56UTsLA== +next@^15.0.0-rc.0: + version "15.0.0-rc.0" + resolved "https://registry.yarnpkg.com/next/-/next-15.0.0-rc.0.tgz#ec9440e10c40f7f8c04487bd58aa970553d8148e" + integrity sha512-IWcCvxUSCAuOK5gig4+9yiyt/dLKpIa+WT01Qcx4CBE4TtwJljyTDnCVVn64jDZ4qmSzsaEYXpb4DTI8qbk03A== dependencies: - "@next/env" "14.2.5" - "@swc/helpers" "0.5.5" + "@next/env" "15.0.0-rc.0" + "@swc/helpers" "0.5.11" busboy "1.6.0" caniuse-lite "^1.0.30001579" graceful-fs "^4.2.11" postcss "8.4.31" - styled-jsx "5.1.1" + styled-jsx "5.1.3" optionalDependencies: - "@next/swc-darwin-arm64" "14.2.5" - "@next/swc-darwin-x64" "14.2.5" - "@next/swc-linux-arm64-gnu" "14.2.5" - "@next/swc-linux-arm64-musl" "14.2.5" - "@next/swc-linux-x64-gnu" "14.2.5" - "@next/swc-linux-x64-musl" "14.2.5" - "@next/swc-win32-arm64-msvc" "14.2.5" - "@next/swc-win32-ia32-msvc" "14.2.5" - "@next/swc-win32-x64-msvc" "14.2.5" + "@next/swc-darwin-arm64" "15.0.0-rc.0" + "@next/swc-darwin-x64" "15.0.0-rc.0" + "@next/swc-linux-arm64-gnu" "15.0.0-rc.0" + "@next/swc-linux-arm64-musl" "15.0.0-rc.0" + "@next/swc-linux-x64-gnu" "15.0.0-rc.0" + "@next/swc-linux-x64-musl" "15.0.0-rc.0" + "@next/swc-win32-arm64-msvc" "15.0.0-rc.0" + "@next/swc-win32-ia32-msvc" "15.0.0-rc.0" + "@next/swc-win32-x64-msvc" "15.0.0-rc.0" + sharp "^0.33.4" no-case@^3.0.4: version "3.0.4" @@ -6031,13 +6172,12 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -react-dom@^18.2.0: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4" - integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== +react-dom@^19.0.0-rc-512b09b2-20240718: + version "19.0.0-rc-512b09b2-20240718" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0-rc-512b09b2-20240718.tgz#21310f2892362ba73d20b56337ec773c65058581" + integrity sha512-qoTgXrHKBldyVk06n+QXV4wDwUbpeYC3xT6FC6dFYAWas8qCXIdc/6teUQ0ztqc+b3JSMVGri9jjblPQ4AQgEg== dependencies: - loose-envify "^1.1.0" - scheduler "^0.23.2" + scheduler "0.25.0-rc-512b09b2-20240718" react-hook-form@^7.46.2: version "7.52.1" @@ -6074,12 +6214,10 @@ react-transition-group@^4.4.5: loose-envify "^1.4.0" prop-types "^15.6.2" -react@^18.2.0: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" - integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== - dependencies: - loose-envify "^1.1.0" +react@^19.0.0-rc-512b09b2-20240718: + version "19.0.0-rc-512b09b2-20240718" + resolved "https://registry.yarnpkg.com/react/-/react-19.0.0-rc-512b09b2-20240718.tgz#a262d4c8138c2ee96d420ceee1a9c80a62f35ead" + integrity sha512-gKw9eqT3aOciPZ9b/+H2MskyY/SQqp8jQogNqkGb33OkOWF68w9IhNO1V76awemeeClQO9zbUzPzsyyVFPkKcg== read-pkg-up@^7.0.1: version "7.0.1" @@ -6320,12 +6458,10 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" -scheduler@^0.23.2: - version "0.23.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" - integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ== - dependencies: - loose-envify "^1.1.0" +scheduler@0.25.0-rc-512b09b2-20240718: + version "0.25.0-rc-512b09b2-20240718" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0-rc-512b09b2-20240718.tgz#a21187f91d2deb384bb0df898dc71c91bde97ebc" + integrity sha512-Ebxs3JKGZ9yl0xTMmNKOFev9ZYZHOM6I5Ub2VxeyX5T0JRUkYOyiWTunOVnGPKFGYx+GvScAk4dTuwLgxUw1yg== "semver@2 || 3 || 4 || 5": version "5.7.2" @@ -6344,7 +6480,7 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.2, semver@^7.3.4, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: +semver@^7.3.2, semver@^7.3.4, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -6371,6 +6507,35 @@ set-function-name@^2.0.1, set-function-name@^2.0.2: functions-have-names "^1.2.3" has-property-descriptors "^1.0.2" +sharp@^0.33.4: + version "0.33.4" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.33.4.tgz#b88e6e843e095c6ab5e1a0c59c4885e580cd8405" + integrity sha512-7i/dt5kGl7qR4gwPRD2biwD2/SvBn3O04J77XKFgL2OnZtQw+AG9wnuS/csmu80nPRHLYE9E41fyEiG8nhH6/Q== + dependencies: + color "^4.2.3" + detect-libc "^2.0.3" + semver "^7.6.0" + optionalDependencies: + "@img/sharp-darwin-arm64" "0.33.4" + "@img/sharp-darwin-x64" "0.33.4" + "@img/sharp-libvips-darwin-arm64" "1.0.2" + "@img/sharp-libvips-darwin-x64" "1.0.2" + "@img/sharp-libvips-linux-arm" "1.0.2" + "@img/sharp-libvips-linux-arm64" "1.0.2" + "@img/sharp-libvips-linux-s390x" "1.0.2" + "@img/sharp-libvips-linux-x64" "1.0.2" + "@img/sharp-libvips-linuxmusl-arm64" "1.0.2" + "@img/sharp-libvips-linuxmusl-x64" "1.0.2" + "@img/sharp-linux-arm" "0.33.4" + "@img/sharp-linux-arm64" "0.33.4" + "@img/sharp-linux-s390x" "0.33.4" + "@img/sharp-linux-x64" "0.33.4" + "@img/sharp-linuxmusl-arm64" "0.33.4" + "@img/sharp-linuxmusl-x64" "0.33.4" + "@img/sharp-wasm32" "0.33.4" + "@img/sharp-win32-ia32" "0.33.4" + "@img/sharp-win32-x64" "0.33.4" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -6403,6 +6568,13 @@ signal-exit@^4.0.1: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== + dependencies: + is-arrayish "^0.3.1" + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -6673,10 +6845,10 @@ strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -styled-jsx@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" - integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== +styled-jsx@5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.3.tgz#b148f3373af118768d1fcbd935e98c19e4bfeb1d" + integrity sha512-qLRShOWTE/Mf6Bvl72kFeKBl8N2Eq9WIFfoAuvbtP/6tqlnj1SCjv117n2MIjOPpa1jTorYqLJgsHKy5Y3ziww== dependencies: client-only "0.0.1" From 720ac614be76ae6e95403e962c7bce392986a998 Mon Sep 17 00:00:00 2001 From: AlexZengArchiPro Date: Fri, 9 Aug 2024 11:44:37 +1200 Subject: [PATCH 2/4] docs: add clone instructions for React 19.x and React 18.x with NextJs 15.x and NextJs 14.x --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 69f4dc8..ca5d98c 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,13 @@ If you prefer Tailwind css, check this: [Tailwind-CSS-Version](https://github.co 🚘🚘🚘 [**Click here to see an online demo**](https://mui-nextjs-ts.vercel.app) 🚘🚘🚘 +## Clone this repository for React 19.x with NextJs 15.x or React 18.x with NextJs 14.x + +- Clone React19-Next15-MUI6-TS-Starter: + - `git clone -b react19-nextjs15 https://github.com/AlexStack/nextjs-materia-mui-typescript-hook-form-scaffold-boilerplate-starter.git react19-nextjs15-mui6-ts-starter` +- Clone React18-Next14-MUI5-TS-Starter: + - `git clone -b nextjs14 https://github.com/AlexStack/nextjs-materia-mui-typescript-hook-form-scaffold-boilerplate-starter.git react18-nextjs14-mui5-ts-starter` + ## Features This repository is 🔋 battery packed with: From 3d1005feeaf9810a233b69f7c474bc2a67fc911e Mon Sep 17 00:00:00 2001 From: AlexZengArchiPro Date: Fri, 9 Aug 2024 12:17:14 +1200 Subject: [PATCH 3/4] feat: update version for React and Next.js to their respective RC versions --- src/app/page.tsx | 4 ++-- src/components/Homepage.tsx | 8 ++++---- src/constants/config.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 7aea28e..172865f 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -12,12 +12,12 @@ const loadDataFromApi = async (slug?: string) => { // Fetch & cache data from 2 remote APIs test const [reactNpmData, nextJsNpmData] = await Promise.all([ getApiResponse({ - apiEndpoint: 'https://registry.npmjs.org/react/latest', + apiEndpoint: 'https://registry.npmjs.org/react/rc', revalidate: 60 * 60 * 24, // 24 hours cache timeout: 5000, // 5 seconds }), getApiResponse({ - apiEndpoint: 'https://registry.npmjs.org/next/latest', + apiEndpoint: 'https://registry.npmjs.org/next/rc', revalidate: 0, // no cache timeout: 5000, // 5 seconds }), diff --git a/src/components/Homepage.tsx b/src/components/Homepage.tsx index 80006d8..68aa88d 100644 --- a/src/components/Homepage.tsx +++ b/src/components/Homepage.tsx @@ -1,4 +1,4 @@ -import PinDropIcon from '@mui/icons-material/PinDrop'; +import AutoAwesome from '@mui/icons-material/AutoAwesome'; import { Box, Typography } from '@mui/material'; import Link from 'next/link'; @@ -19,7 +19,7 @@ export default function Homepage({
- @@ -45,8 +45,8 @@ export default function Homepage({ sx={{ color: 'green', mt: 3 }} > Fetch & cache data from 2 remote APIs test:
- The latest React version is {reactVersion}, and the latest NextJs - version is {nextJsVersion} + The React RC version is {reactVersion}, and the NextJs RC version is{' '} + {nextJsVersion} On dev environment, you can see how long it takes on console, e.g. getApiResponse: 0.05s diff --git a/src/constants/config.ts b/src/constants/config.ts index 9d26cd1..3932e4f 100644 --- a/src/constants/config.ts +++ b/src/constants/config.ts @@ -1,7 +1,7 @@ export const SITE_CONFIG = { - title: 'NextJs 14.x + MUI 5.x + TypeScript Starter', + title: 'ReactJs 19.x + NextJs 16.x + MUI 6.x + TypeScript Starter', description: - 'The scaffold for NextJs 14.x (App Router), React Hook Form, Material UI(MUI 5.x),Typescript and ESLint, and TypeScript with Absolute Import, Seo, Link component, pre-configured with Husky', + 'The scaffold for ReactJs 19.x with NextJs 15.x (App Router), React Hook Form, Material UI(MUI 6.x),Typescript and ESLint, and TypeScript with Absolute Import, Seo, Link component, pre-configured with Husky', /** Without additional '/' on the end, e.g. https://hihb.com */ url: 'https://hihb.com', }; From 1772eefdd5a19afb165aef94a5e027586f4e592f Mon Sep 17 00:00:00 2001 From: Alex Zeng Date: Fri, 9 Aug 2024 12:40:01 +1200 Subject: [PATCH 4/4] feat: add type FetchApiContext to useClientContext --- src/components/shared/ReactActionForm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/shared/ReactActionForm.tsx b/src/components/shared/ReactActionForm.tsx index 437797a..5f129b3 100644 --- a/src/components/shared/ReactActionForm.tsx +++ b/src/components/shared/ReactActionForm.tsx @@ -19,6 +19,7 @@ import { useClientContext } from '@/hooks/useClientContext'; import SubmitButton from '@/components/shared/SubmitButton'; +import { FetchApiContext } from '@/constants'; import { consoleLog } from '@/utils/shared/console-log'; import { getApiResponse } from '@/utils/shared/get-api-response'; @@ -52,7 +53,7 @@ const ReactActionForm: React.FC = () => { const { setAlertBarProps, renderAlertBar } = useAlertBar(); - const { fetchCount, updateClientCtx } = useClientContext(); + const { fetchCount, updateClientCtx } = useClientContext(); const [formErrors, setFormErrors] = React.useState>( {} );