Comparing version 4.0.0-beta-db95243 to 4.0.0-beta-ddd5ae5
@@ -1,3 +0,3 @@ | ||
import { r as resolveNamespace, e as createBaseTranslator, d as createCache, b as createIntlFormatters, f as defaultGetMessageFallback, g as defaultOnError } from './initializeConfig-fLcuxncj.js'; | ||
export { I as IntlError, a as IntlErrorCode, c as createFormatter, i as initializeConfig } from './initializeConfig-fLcuxncj.js'; | ||
import { r as resolveNamespace, e as createBaseTranslator, d as createCache, b as createIntlFormatters, f as defaultGetMessageFallback, g as defaultOnError } from './initializeConfig-DNjOIggo.js'; | ||
export { I as IntlError, a as IntlErrorCode, c as createFormatter, i as initializeConfig } from './initializeConfig-DNjOIggo.js'; | ||
@@ -4,0 +4,0 @@ |
@@ -1,2 +0,2 @@ | ||
export { I as IntlError, a as IntlErrorCode, d as _createCache, b as _createIntlFormatters, c as createFormatter, i as initializeConfig } from './initializeConfig-fLcuxncj.js'; | ||
export { I as IntlError, a as IntlErrorCode, d as _createCache, b as _createIntlFormatters, c as createFormatter, i as initializeConfig } from './initializeConfig-DNjOIggo.js'; | ||
export { createTranslator, hasLocale } from './core.js'; | ||
@@ -3,0 +3,0 @@ export { IntlProvider, useFormatter, useLocale, useMessages, useNow, useTimeZone, useTranslations } from './react.js'; |
import { createContext, useContext, useMemo, useState, useEffect } from 'react'; | ||
import { d as createCache, b as createIntlFormatters, i as initializeConfig, r as resolveNamespace, I as IntlError, a as IntlErrorCode, e as createBaseTranslator, c as createFormatter } from './initializeConfig-fLcuxncj.js'; | ||
import { d as createCache, b as createIntlFormatters, i as initializeConfig, r as resolveNamespace, I as IntlError, a as IntlErrorCode, e as createBaseTranslator, c as createFormatter } from './initializeConfig-DNjOIggo.js'; | ||
import { jsx } from 'react/jsx-runtime'; | ||
@@ -60,3 +60,3 @@ | ||
if (!context) { | ||
throw new Error('No intl context found. Have you configured the provider? See https://next-intl-docs.vercel.app/docs/usage/configuration#server-client-components' ); | ||
throw new Error('No intl context found. Have you configured the provider? See https://next-intl.dev/docs/usage/configuration#server-client-components' ); | ||
} | ||
@@ -86,3 +86,3 @@ return context; | ||
hasWarnedForMissingTimezone = true; | ||
onError(new IntlError(IntlErrorCode.ENVIRONMENT_FALLBACK, `There is no \`timeZone\` configured, this can lead to markup mismatches caused by environment differences. Consider adding a global default: https://next-intl-docs.vercel.app/docs/configuration#time-zone` )); | ||
onError(new IntlError(IntlErrorCode.ENVIRONMENT_FALLBACK, `There is no \`timeZone\` configured, this can lead to markup mismatches caused by environment differences. Consider adding a global default: https://next-intl.dev/docs/configuration#time-zone` )); | ||
} | ||
@@ -135,3 +135,3 @@ const translate = useMemo(() => createBaseTranslator({ | ||
/** | ||
* @see https://next-intl-docs.vercel.app/docs/usage/dates-times#relative-times-usenow | ||
* @see https://next-intl.dev/docs/usage/dates-times#relative-times-usenow | ||
*/ | ||
@@ -163,3 +163,3 @@ function useNow(options) { | ||
if (!context.messages) { | ||
throw new Error('No messages found. Have you configured them correctly? See https://next-intl-docs.vercel.app/docs/configuration#messages' ); | ||
throw new Error('No messages found. Have you configured them correctly? See https://next-intl.dev/docs/configuration#messages' ); | ||
} | ||
@@ -166,0 +166,0 @@ return context.messages; |
@@ -5,3 +5,3 @@ /** | ||
* Optionally, messages can be strictly-typed in order to get type safety for message | ||
* namespaces and keys. See https://next-intl-docs.vercel.app/docs/usage/typescript | ||
* namespaces and keys. See https://next-intl.dev/docs/usage/typescript | ||
*/ | ||
@@ -8,0 +8,0 @@ type AbstractIntlMessages = { |
@@ -7,2 +7,2 @@ import type { Locale } from './AppConfig.tsx'; | ||
*/ | ||
export default function hasLocale<LocaleType extends Locale>(locales: ReadonlyArray<LocaleType>, candidate?: string | null): candidate is LocaleType; | ||
export default function hasLocale<LocaleType extends Locale>(locales: ReadonlyArray<LocaleType>, candidate: unknown): candidate is LocaleType; |
@@ -5,5 +5,5 @@ type Options = { | ||
/** | ||
* @see https://next-intl-docs.vercel.app/docs/usage/dates-times#relative-times-usenow | ||
* @see https://next-intl.dev/docs/usage/dates-times#relative-times-usenow | ||
*/ | ||
export default function useNow(options?: Options): Date; | ||
export {}; |
{ | ||
"name": "use-intl", | ||
"version": "4.0.0-beta-db95243", | ||
"version": "4.0.0-beta-ddd5ae5", | ||
"sideEffects": false, | ||
@@ -8,3 +8,3 @@ "author": "Jan Amann <jan@amann.work>", | ||
"license": "MIT", | ||
"homepage": "https://next-intl-docs.vercel.app/", | ||
"homepage": "https://next-intl.dev", | ||
"repository": { | ||
@@ -66,5 +66,5 @@ "type": "git", | ||
"peerDependencies": { | ||
"react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0" | ||
"react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0" | ||
}, | ||
"gitHead": "187381203f4fa54f735057e7984e0d7b897112d0" | ||
"gitHead": "1f0e953c2dd85407f7f386eee8ee17181f5d03df" | ||
} |
@@ -83,2 +83,2 @@ # 🌐 use-intl | ||
### [→ Read the docs](https://next-intl-docs.vercel.app/docs/environments/core-library) | ||
### [→ Read the docs](https://next-intl.dev/docs/environments/core-library) |
82697