diff --git a/package/package.json b/package/package.json index 500defc..4b0bad4 100644 --- a/package/package.json +++ b/package/package.json @@ -6,15 +6,9 @@ "./ClientTranslation": { "default": "./dist/ClientTranslation.js" }, - "./createTranslation": { - "default": "./dist/createTranslation.js" - }, "./getTranslation": { "default": "./dist/getTranslation.js" }, - "./I18nProvider": { - "default": "./dist/I18nProvider.js" - }, "./I18nTransmitter": { "default": "./dist/I18nTransmitter.js" }, @@ -26,9 +20,6 @@ }, "./useTranslation": { "default": "./dist/useTranslation.js" - }, - "./withI18n": { - "default": "./dist/withI18n.js" } }, "files": [ @@ -70,8 +61,8 @@ "react": ">= 18.2.0" }, "dependencies": { - "html-entities": "2.4.0", "@nimpl/getters": "1.3.4", + "html-entities": "2.4.0", "object-path": "0.11.8" } } diff --git a/package/src/I18nProvider.tsx b/package/src/I18nProvider.tsx deleted file mode 100644 index 4d3ff09..0000000 --- a/package/src/I18nProvider.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react"; -import { I18nContext } from "./lib/I18nContext"; -import I18nTransmitter, { type I18nTransmitterProps } from "./I18nTransmitter"; - -type I18nProviderProps = { - lang: string; - children: React.ReactNode; - clientTerms?: I18nTransmitterProps["terms"]; -}; - -const I18nProvider: React.FC = ({ children, lang, clientTerms = [] }) => { - return ( - - - {children} - - - ); -}; - -export default I18nProvider; diff --git a/package/src/I18nTransmitter.tsx b/package/src/I18nTransmitter.tsx index c36ca73..abd19ec 100644 --- a/package/src/I18nTransmitter.tsx +++ b/package/src/I18nTransmitter.tsx @@ -1,16 +1,15 @@ import React from "react"; import op from "object-path"; -import getServerContext from "@nimpl/getters/get-server-context"; -import { I18nContext } from "./lib/I18nContext"; import { type I18nOptions, type Translates } from "./types"; import ClientI18nProvider from "./lib/ClientI18nProvider"; import formatServerTranslate from "./lib/formatServerTranslate"; -import getDictionary from "./lib/getDictionary"; +import loadI18nData from "./lib/loadI18nData"; export type I18nTransmitterProps = { terms: (string | [string, I18nOptions])[]; children: React.ReactNode; cleanThread?: boolean; + language?: string; }; type ClientTranslates = { [key: string]: string }; @@ -33,16 +32,21 @@ const formatServerTranslates = ( } }; -const I18nTransmitter: React.FC = async ({ terms, children, cleanThread }) => { - const context = getServerContext(I18nContext); +const I18nTransmitter: React.FC = async ({ + language: argLanguage, + terms, + children, + cleanThread, +}) => { + const { dictionary, language: configLanguage } = await loadI18nData(); + const language = argLanguage || configLanguage; - if (!context) { - throw new Error("Please, Init I18nProvider - https://github.com/vordgi/nimpl-i18n#server-components"); + if (!language) { + throw new Error( + "Unable to get the language in the createTranslation function. Please check the getLanguage method in the configuration file or pass the language as an argument.", + ); } - const { lang } = context; - const dictionary = await getDictionary(lang); - const result: { [key: string]: string } = {}; terms.forEach((term) => { if (Array.isArray(term)) { @@ -56,7 +60,7 @@ const I18nTransmitter: React.FC = async ({ terms, children }); return ( - + {children} ); diff --git a/package/src/ServerTranslation.tsx b/package/src/ServerTranslation.tsx index 981a014..a3e90b1 100644 --- a/package/src/ServerTranslation.tsx +++ b/package/src/ServerTranslation.tsx @@ -8,6 +8,7 @@ type ServerTranslationProps = { components?: { [key: string]: JSX.Element }; query?: I18nOptions["query"]; removeUnusedQueries?: I18nOptions["removeUnusedQueries"]; + language?: string; }; const ServerTranslation: React.FC = async ({ @@ -15,8 +16,9 @@ const ServerTranslation: React.FC = async ({ components, query, removeUnusedQueries, + language, }) => { - const { t } = await getTranslation(); + const { t } = await getTranslation({ language }); const text = t(term, { query, removeUnusedQueries }); return ; diff --git a/package/src/configuration/getConfig.ts b/package/src/configuration/getConfig.ts index 7d03a37..a8e85a1 100644 --- a/package/src/configuration/getConfig.ts +++ b/package/src/configuration/getConfig.ts @@ -11,7 +11,7 @@ const getConfig = async (): Promise => { try { if (fs.existsSync(CONFIG_PATH)) { const config: { default: Config } = await dynamicImport(pathToFileURL(CONFIG_PATH).href); - const { load, languages } = config.default; + const { load, getLanguage, languages } = config.default; if (!load) { throw new Error( @@ -25,10 +25,16 @@ const getConfig = async (): Promise => { ); } + if (!getLanguage) { + throw new Error( + `Can't find getLanguage method in configuration file - https://github.com/vordgi/nimpl-i18n#configuration`, + ); + } + return config.default; } - } catch { - // + } catch (err) { + console.error(err); } throw new Error("Can't load config - https://github.com/vordgi/nimpl-i18n#configuration"); }; diff --git a/package/src/configuration/types.ts b/package/src/configuration/types.ts index b7cd6ec..c9932d9 100644 --- a/package/src/configuration/types.ts +++ b/package/src/configuration/types.ts @@ -2,5 +2,6 @@ export type Meta = { lastUpdated: number; isRevalidated?: boolean } & Record; + getLanguage(options: { pathname: string | null; params: { [key: string]: string | string[] } }): Promise; languages: string[]; }; diff --git a/package/src/createTranslation.ts b/package/src/createTranslation.ts deleted file mode 100644 index 1326d27..0000000 --- a/package/src/createTranslation.ts +++ /dev/null @@ -1,33 +0,0 @@ -import op from "object-path"; -import formatServerTranslate from "./lib/formatServerTranslate"; -import { type I18nOptions } from "./types"; -import getDictionary from "./lib/getDictionary"; - -type CreateTranslationReturnType = { t: (term: string, opts?: I18nOptions) => string; lang: string }; - -const createTranslation = async (lang: string, namespace?: string): Promise => { - const dictionary = await getDictionary(lang); - const namespaceDictionary = namespace ? op.get(dictionary, namespace) : dictionary; - - const t: CreateTranslationReturnType["t"] = (term, opts) => { - let termDictionary = namespaceDictionary; - let termNamespace = namespace; - let termKey: string = term; - - if (term.includes(":")) { - [termNamespace, termKey] = term.split(":"); - termDictionary = op.get(dictionary, termNamespace); - } - - const translation = op.get(termDictionary, termKey); - const fullTerm = `${termNamespace ? `${termNamespace}.` : ""}${termKey}`; - - if (typeof translation !== "string" || !translation) return fullTerm; - - return formatServerTranslate({ term: fullTerm, text: translation, parseEntities: true, ...opts }); - }; - - return { t, lang }; -}; - -export default createTranslation; diff --git a/package/src/getTranslation.ts b/package/src/getTranslation.ts index 41678ed..510d7e1 100644 --- a/package/src/getTranslation.ts +++ b/package/src/getTranslation.ts @@ -1,22 +1,24 @@ import op from "object-path"; -import getServerContext from "@nimpl/getters/get-server-context"; -import { I18nContext } from "./lib/I18nContext"; import formatServerTranslate from "./lib/formatServerTranslate"; import { type I18nOptions } from "./types"; -import getDictionary from "./lib/getDictionary"; - -type GetTranslationReturnType = { t: (term: string, opts?: I18nOptions) => string; lang: string }; - -const getTranslation = async (namespace?: string): Promise => { - const context = getServerContext(I18nContext); - - if (!context) { - throw new Error("Please, Init I18nProvider - https://nimpl.tech/i18n/usage#i18nprovider"); +import loadI18nData from "./lib/loadI18nData"; + +type GetTranslationReturnType = { t: (term: string, opts?: I18nOptions) => string; language: string }; + +const getTranslation = async (options?: { + language?: string; + namespace?: string; +}): Promise => { + const { language: argLanguage, namespace } = options || {}; + const { dictionary, language: configLanguage } = await loadI18nData(); + const language = argLanguage || configLanguage; + + if (!language) { + throw new Error( + "Unable to get the language in the createTranslation function. Please check the getLanguage method in the configuration file or pass the language as an argument.", + ); } - const dictionary = await getDictionary(context.lang); - const { lang } = context; - const namespaceDictionary = namespace ? op.get(dictionary, namespace) : dictionary; const t: GetTranslationReturnType["t"] = (term, opts) => { @@ -37,7 +39,7 @@ const getTranslation = async (namespace?: string): Promise(null); diff --git a/package/src/lib/ClientI18nProvider.tsx b/package/src/lib/ClientI18nProvider.tsx index 57eceb6..0dc033d 100644 --- a/package/src/lib/ClientI18nProvider.tsx +++ b/package/src/lib/ClientI18nProvider.tsx @@ -5,19 +5,19 @@ import { ClientI18nContext } from "./ClientI18nContext"; type ClientI18nProviderProps = { translates: { [key: string]: string }; - lang: string; + language: string; children: React.ReactNode; cleanThread?: boolean; }; -const ClientI18nProvider: React.FC = ({ translates, children, lang, cleanThread }) => { +const ClientI18nProvider: React.FC = ({ translates, children, language, cleanThread }) => { const prevTranslates = useContext(ClientI18nContext); if (cleanThread) { Object.assign(translates, prevTranslates?.translates); } - return {children}; + return {children}; }; export default ClientI18nProvider; diff --git a/package/src/lib/I18nContext.tsx b/package/src/lib/I18nContext.tsx deleted file mode 100644 index c4393f6..0000000 --- a/package/src/lib/I18nContext.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import createServerContext from "@nimpl/getters/create-server-context"; - -type I18nContextType = { - lang: string; -} | null; - -export const I18nContext = createServerContext(null); diff --git a/package/src/lib/getDictionary.ts b/package/src/lib/getDictionary.ts deleted file mode 100644 index a7ac924..0000000 --- a/package/src/lib/getDictionary.ts +++ /dev/null @@ -1,15 +0,0 @@ -import getConfig from "../configuration/getConfig"; -import { type Translates } from "../types"; - -const getDictionary = async (lang: string): Promise => { - const config = await getConfig(); - - if (!lang || !config.languages.includes(lang)) { - throw new Error(`Can\' load data for language "${lang}", valid languages are: ${config.languages.join(", ")}`); - } - - const { data } = await config.load(lang); - return data as Translates; -}; - -export default getDictionary; diff --git a/package/src/lib/loadI18nData.ts b/package/src/lib/loadI18nData.ts new file mode 100644 index 0000000..19161f9 --- /dev/null +++ b/package/src/lib/loadI18nData.ts @@ -0,0 +1,20 @@ +import getConfig from "../configuration/getConfig"; +import { type Translates } from "../types"; +import { getPathname } from "@nimpl/getters/get-pathname"; +import { getParams } from "@nimpl/getters/get-params"; + +const loadI18nData = async (): Promise<{ dictionary: Translates; language: string }> => { + const config = await getConfig(); + const language = await config.getLanguage({ pathname: getPathname(), params: getParams() }); + + if (!language || !config.languages.includes(language)) { + throw new Error( + `Can\' load data for language "${language}", valid languages are: ${config.languages.join(", ")}`, + ); + } + + const { data } = await config.load(language); + return { dictionary: data as Translates, language }; +}; + +export default loadI18nData; diff --git a/package/src/useTranslation.ts b/package/src/useTranslation.ts index 2a56f18..365d90b 100644 --- a/package/src/useTranslation.ts +++ b/package/src/useTranslation.ts @@ -3,9 +3,9 @@ import { type I18nOptions } from "./types"; import { ClientI18nContext } from "./lib/ClientI18nContext"; import injectQuery from "./lib/injectQuery"; -type GetTranslationReturnType = { t: (term: string, opts?: I18nOptions) => string; lang: string }; +type GetTranslationReturnType = { t: (term: string, opts?: I18nOptions) => string; language: string }; -const useTranslation = (namespace?: string): GetTranslationReturnType => { +const useTranslation = ({ namespace }: { namespace?: string } = {}): GetTranslationReturnType => { const context = useContext(ClientI18nContext); if (!context) { @@ -14,7 +14,7 @@ const useTranslation = (namespace?: string): GetTranslationReturnType => { ); } - const { lang, translates } = context; + const { language, translates } = context; const t: GetTranslationReturnType["t"] = (term, opts) => { let termKey: string; @@ -39,7 +39,7 @@ const useTranslation = (namespace?: string): GetTranslationReturnType => { return translation; }; - return { t, lang }; + return { t, language }; }; export default useTranslation; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3806fe5..9b2ddc1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,7 +31,7 @@ importers: dependencies: '@nimpl/getters': specifier: 1.3.4 - version: 1.3.4(next@14.1.4)(react-dom@18.2.0)(react@18.2.0) + version: 1.3.4(next@14.2.3)(react-dom@18.3.1)(react@18.2.0) html-entities: specifier: 2.4.0 version: 2.4.0 @@ -119,12 +119,12 @@ packages: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} dev: true - /@next/env@14.1.4: - resolution: {integrity: sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ==} + /@next/env@14.2.3: + resolution: {integrity: sha512-W7fd7IbkfmeeY2gXrzJYDx8D2lWKbVoTIj1o1ScPHNzvp30s1AuoEFSdr39bC5sjxJaxTtq3OTCZboNp0lNWHA==} dev: false - /@next/swc-darwin-arm64@14.1.4: - resolution: {integrity: sha512-ubmUkbmW65nIAOmoxT1IROZdmmJMmdYvXIe8211send9ZYJu+SqxSnJM4TrPj9wmL6g9Atvj0S/2cFmMSS99jg==} + /@next/swc-darwin-arm64@14.2.3: + resolution: {integrity: sha512-3pEYo/RaGqPP0YzwnlmPN2puaF2WMLM3apt5jLW2fFdXD9+pqcoTzRk+iZsf8ta7+quAe4Q6Ms0nR0SFGFdS1A==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -132,8 +132,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64@14.1.4: - resolution: {integrity: sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ==} + /@next/swc-darwin-x64@14.2.3: + resolution: {integrity: sha512-6adp7waE6P1TYFSXpY366xwsOnEXM+y1kgRpjSRVI2CBDOcbRjsJ67Z6EgKIqWIue52d2q/Mx8g9MszARj8IEA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -141,8 +141,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu@14.1.4: - resolution: {integrity: sha512-457G0hcLrdYA/u1O2XkRMsDKId5VKe3uKPvrKVOyuARa6nXrdhJOOYU9hkKKyQTMru1B8qEP78IAhf/1XnVqKA==} + /@next/swc-linux-arm64-gnu@14.2.3: + resolution: {integrity: sha512-cuzCE/1G0ZSnTAHJPUT1rPgQx1w5tzSX7POXSLaS7w2nIUJUD+e25QoXD/hMfxbsT9rslEXugWypJMILBj/QsA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -150,8 +150,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl@14.1.4: - resolution: {integrity: sha512-l/kMG+z6MB+fKA9KdtyprkTQ1ihlJcBh66cf0HvqGP+rXBbOXX0dpJatjZbHeunvEHoBBS69GYQG5ry78JMy3g==} + /@next/swc-linux-arm64-musl@14.2.3: + resolution: {integrity: sha512-0D4/oMM2Y9Ta3nGuCcQN8jjJjmDPYpHX9OJzqk42NZGJocU2MqhBq5tWkJrUQOQY9N+In9xOdymzapM09GeiZw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -159,8 +159,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu@14.1.4: - resolution: {integrity: sha512-BapIFZ3ZRnvQ1uWbmqEGJuPT9cgLwvKtxhK/L2t4QYO7l+/DxXuIGjvp1x8rvfa/x1FFSsipERZK70pewbtJtw==} + /@next/swc-linux-x64-gnu@14.2.3: + resolution: {integrity: sha512-ENPiNnBNDInBLyUU5ii8PMQh+4XLr4pG51tOp6aJ9xqFQ2iRI6IH0Ds2yJkAzNV1CfyagcyzPfROMViS2wOZ9w==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -168,8 +168,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl@14.1.4: - resolution: {integrity: sha512-mqVxTwk4XuBl49qn2A5UmzFImoL1iLm0KQQwtdRJRKl21ylQwwGCxJtIYo2rbfkZHoSKlh/YgztY0qH3wG1xIg==} + /@next/swc-linux-x64-musl@14.2.3: + resolution: {integrity: sha512-BTAbq0LnCbF5MtoM7I/9UeUu/8ZBY0i8SFjUMCbPDOLv+un67e2JgyN4pmgfXBwy/I+RHu8q+k+MCkDN6P9ViQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -177,8 +177,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc@14.1.4: - resolution: {integrity: sha512-xzxF4ErcumXjO2Pvg/wVGrtr9QQJLk3IyQX1ddAC/fi6/5jZCZ9xpuL9Tzc4KPWMFq8GGWFVDMshZOdHGdkvag==} + /@next/swc-win32-arm64-msvc@14.2.3: + resolution: {integrity: sha512-AEHIw/dhAMLNFJFJIJIyOFDzrzI5bAjI9J26gbO5xhAKHYTZ9Or04BesFPXiAYXDNdrwTP2dQceYA4dL1geu8A==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -186,8 +186,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc@14.1.4: - resolution: {integrity: sha512-WZiz8OdbkpRw6/IU/lredZWKKZopUMhcI2F+XiMAcPja0uZYdMTZQRoQ0WZcvinn9xZAidimE7tN9W5v9Yyfyw==} + /@next/swc-win32-ia32-msvc@14.2.3: + resolution: {integrity: sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -195,8 +195,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc@14.1.4: - resolution: {integrity: sha512-4Rto21sPfw555sZ/XNLqfxDUNeLhNYGO2dlPqsnuCg8N8a2a9u1ltqBOPQ4vj1Gf7eJC0W2hHG2eYUHuiXgY2w==} + /@next/swc-win32-x64-msvc@14.2.3: + resolution: {integrity: sha512-Q1/zm43RWynxrO7lW4ehciQVj+5ePBhOK+/K2P7pLFX3JaJ/IZVC69SHidrmZSOkqz7ECIOhhy7XhAFG4JYyHA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -204,16 +204,16 @@ packages: dev: false optional: true - /@nimpl/getters@1.3.4(next@14.1.4)(react-dom@18.2.0)(react@18.2.0): + /@nimpl/getters@1.3.4(next@14.2.3)(react-dom@18.3.1)(react@18.2.0): resolution: {integrity: sha512-L7B6mTBvCtuSOxYBv68zzAYXzoDUm3P/1M7KkPEo5+0r9zFPRoV6bgcqyYns2QfEuNK9RrRAQ1Xh/eFcQFTnBw==} peerDependencies: next: '>= 14.0.0' react: '>= 18.2.0' react-dom: '>= 18.2.0' dependencies: - next: 14.1.4(react-dom@18.2.0)(react@18.2.0) + next: 14.2.3(react-dom@18.3.1)(react@18.2.0) react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + react-dom: 18.3.1(react@18.2.0) dev: false /@nodelib/fs.scandir@2.1.5: @@ -242,9 +242,14 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@swc/helpers@0.5.2: - resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} + /@swc/counter@0.1.3: + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + dev: false + + /@swc/helpers@0.5.5: + resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} dependencies: + '@swc/counter': 0.1.3 tslib: 2.6.2 dev: false @@ -496,8 +501,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001608: - resolution: {integrity: sha512-cjUJTQkk9fQlJR2s4HMuPMvTiRggl0rAVMtthQuyOlDWuqHXqN8azLq+pi8B2TjwKJ32diHjUqRIKeFX4z1FoA==} + /caniuse-lite@1.0.30001616: + resolution: {integrity: sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw==} dev: false /chalk@4.1.2: @@ -992,40 +997,43 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /next@14.1.4(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-1WTaXeSrUwlz/XcnhGTY7+8eiaFvdet5z9u3V2jb+Ek1vFo0VhHKSAIJvDWfQpttWjnyw14kBeq28TPq7bTeEQ==} + /next@14.2.3(react-dom@18.3.1)(react@18.2.0): + resolution: {integrity: sha512-dowFkFTR8v79NPJO4QsBUtxv0g9BrS/phluVpMAt2ku7H+cbcBJlopXjkWlwxrk/xGqMemr7JkGPGemPrLLX7A==} engines: {node: '>=18.17.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.41.2 react: ^18.2.0 react-dom: ^18.2.0 sass: ^1.3.0 peerDependenciesMeta: '@opentelemetry/api': optional: true + '@playwright/test': + optional: true sass: optional: true dependencies: - '@next/env': 14.1.4 - '@swc/helpers': 0.5.2 + '@next/env': 14.2.3 + '@swc/helpers': 0.5.5 busboy: 1.6.0 - caniuse-lite: 1.0.30001608 + caniuse-lite: 1.0.30001616 graceful-fs: 4.2.11 postcss: 8.4.31 react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + react-dom: 18.3.1(react@18.2.0) styled-jsx: 5.1.1(react@18.2.0) optionalDependencies: - '@next/swc-darwin-arm64': 14.1.4 - '@next/swc-darwin-x64': 14.1.4 - '@next/swc-linux-arm64-gnu': 14.1.4 - '@next/swc-linux-arm64-musl': 14.1.4 - '@next/swc-linux-x64-gnu': 14.1.4 - '@next/swc-linux-x64-musl': 14.1.4 - '@next/swc-win32-arm64-msvc': 14.1.4 - '@next/swc-win32-ia32-msvc': 14.1.4 - '@next/swc-win32-x64-msvc': 14.1.4 + '@next/swc-darwin-arm64': 14.2.3 + '@next/swc-darwin-x64': 14.2.3 + '@next/swc-linux-arm64-gnu': 14.2.3 + '@next/swc-linux-arm64-musl': 14.2.3 + '@next/swc-linux-x64-gnu': 14.2.3 + '@next/swc-linux-x64-musl': 14.2.3 + '@next/swc-win32-arm64-msvc': 14.2.3 + '@next/swc-win32-ia32-msvc': 14.2.3 + '@next/swc-win32-x64-msvc': 14.2.3 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -1140,14 +1148,14 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true - /react-dom@18.2.0(react@18.2.0): - resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} + /react-dom@18.3.1(react@18.2.0): + resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} peerDependencies: - react: ^18.2.0 + react: ^18.3.1 dependencies: loose-envify: 1.4.0 react: 18.2.0 - scheduler: 0.23.0 + scheduler: 0.23.2 dev: false /react@18.2.0: @@ -1179,8 +1187,8 @@ packages: queue-microtask: 1.2.3 dev: true - /scheduler@0.23.0: - resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} + /scheduler@0.23.2: + resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} dependencies: loose-envify: 1.4.0 dev: false