use-intl 4.0.0-beta-77949ef → 4.0.0-beta-9e73cbe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/development/core.js +2 -2
- package/dist/esm/development/index.js +1 -1
- package/dist/esm/development/{initializeConfig-N-uKzgAH.js → initializeConfig-CRD6euuK.js} +1 -3
- package/dist/esm/development/react.js +1 -1
- package/dist/types/core/createFormatter.d.ts +4 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as resolveNamespace, e as createBaseTranslator, d as createCache, b as createIntlFormatters, f as defaultGetMessageFallback, g as defaultOnError } from './initializeConfig-
|
|
2
|
-
export { I as IntlError, a as IntlErrorCode, c as createFormatter, i as initializeConfig } from './initializeConfig-
|
|
1
|
+
import { r as resolveNamespace, e as createBaseTranslator, d as createCache, b as createIntlFormatters, f as defaultGetMessageFallback, g as defaultOnError } from './initializeConfig-CRD6euuK.js';
|
|
2
|
+
export { I as IntlError, a as IntlErrorCode, c as createFormatter, i as initializeConfig } from './initializeConfig-CRD6euuK.js';
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as IntlError, a as IntlErrorCode, d as _createCache, b as _createIntlFormatters, c as createFormatter, i as initializeConfig } from './initializeConfig-
|
|
1
|
+
export { I as IntlError, a as IntlErrorCode, d as _createCache, b as _createIntlFormatters, c as createFormatter, i as initializeConfig } from './initializeConfig-CRD6euuK.js';
|
|
2
2
|
export { createTranslator, hasLocale } from './core.js';
|
|
3
3
|
export { IntlProvider, useFormatter, useLocale, useMessages, useNow, useTimeZone, useTranslations } from './react.js';
|
|
4
4
|
|
|
@@ -525,9 +525,7 @@ function createFormatter(props) {
|
|
|
525
525
|
return new Date();
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
function relativeTime(
|
|
529
|
-
date, /** The reference point in time to which `date` will be formatted in relation to. If this value is absent, a globally configured `now` value or alternatively the current time will be used. */
|
|
530
|
-
nowOrOptions) {
|
|
528
|
+
function relativeTime(date, nowOrOptions) {
|
|
531
529
|
try {
|
|
532
530
|
let nowDate, unit;
|
|
533
531
|
const opts = {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext, useMemo, useState, useEffect } from 'react';
|
|
2
|
-
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-
|
|
2
|
+
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-CRD6euuK.js';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
|
|
@@ -27,7 +27,10 @@ export default function createFormatter(props: Props): {
|
|
|
27
27
|
(value: number | bigint, options?: NumberFormatOptions): string;
|
|
28
28
|
(value: number | bigint, format?: FormatNames["number"], options?: NumberFormatOptions): string;
|
|
29
29
|
};
|
|
30
|
-
relativeTime:
|
|
30
|
+
relativeTime: {
|
|
31
|
+
(date: number | Date, now?: RelativeTimeFormatOptions["now"]): string;
|
|
32
|
+
(date: number | Date, options?: RelativeTimeFormatOptions): string;
|
|
33
|
+
};
|
|
31
34
|
list: {
|
|
32
35
|
<Value extends string | ReactElement<any, string | import("react").JSXElementConstructor<any>>>(value: Iterable<Value>, options?: Intl.ListFormatOptions): Value extends string ? string : Iterable<ReactElement>;
|
|
33
36
|
<Value extends string | ReactElement<any, string | import("react").JSXElementConstructor<any>>>(value: Iterable<Value>, format?: FormatNames["list"], options?: Intl.ListFormatOptions): Value extends string ? string : Iterable<ReactElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "use-intl",
|
|
3
|
-
"version": "4.0.0-beta-
|
|
3
|
+
"version": "4.0.0-beta-9e73cbe",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Jan Amann <jan@amann.work>",
|
|
6
6
|
"description": "Internationalization (i18n) for React",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "31d0b2dfc66357f02a07f0b434f85dc8f0a7dad3"
|
|
68
68
|
}
|