next-intlayer 9.4.1 → 9.4.3
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/README.md +1 -1
- package/dist/cjs/client/IntlayerClientProvider.cjs +4 -5
- package/dist/cjs/client/IntlayerClientProvider.cjs.map +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/rsc/index.cjs +5 -5
- package/dist/cjs/server/IntlayerServerProvider.cjs +3 -8
- package/dist/cjs/server/IntlayerServerProvider.cjs.map +1 -1
- package/dist/cjs/server/index.cjs +6 -6
- package/dist/cjs/server/prepareSwcOptimization.cjs +1 -1
- package/dist/cjs/server/withIntlayer.cjs +1 -1
- package/dist/esm/client/IntlayerClientProvider.mjs +4 -5
- package/dist/esm/client/IntlayerClientProvider.mjs.map +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/server/IntlayerServerProvider.mjs +3 -8
- package/dist/esm/server/IntlayerServerProvider.mjs.map +1 -1
- package/dist/esm/server/prepareSwcOptimization.mjs +1 -1
- package/dist/esm/server/withIntlayer.mjs +1 -1
- package/dist/types/@intlayer/babel/dist/types/babel-plugin-intlayer-field-rename.d.ts +2 -3
- package/dist/types/@intlayer/babel/dist/types/babel-plugin-intlayer-field-rename.d.ts.map +1 -1
- package/dist/types/client/IntlayerClientProvider.d.ts +7 -9
- package/dist/types/client/IntlayerClientProvider.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +3 -4
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocalePageRouter.d.ts +1 -2
- package/dist/types/client/useLocalePageRouter.d.ts.map +1 -1
- package/dist/types/client/usePathname.d.ts +1 -2
- package/dist/types/client/usePathname.d.ts.map +1 -1
- package/dist/types/generateStaticParams.d.ts +1 -2
- package/dist/types/generateStaticParams.d.ts.map +1 -1
- package/dist/types/index.d.ts +10 -18
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/proxy/intlayerProxy.d.ts +1 -2
- package/dist/types/proxy/intlayerProxy.d.ts.map +1 -1
- package/dist/types/proxy/localeDetector.d.ts +1 -2
- package/dist/types/proxy/localeDetector.d.ts.map +1 -1
- package/dist/types/proxy/middleware.d.ts +2 -3
- package/dist/types/proxy/middleware.d.ts.map +1 -1
- package/dist/types/proxy/multipleProxies.d.ts +1 -2
- package/dist/types/proxy/multipleProxies.d.ts.map +1 -1
- package/dist/types/server/IntlayerProvider.d.ts +2 -3
- package/dist/types/server/IntlayerProvider.d.ts.map +1 -1
- package/dist/types/server/IntlayerServerProvider.d.ts +5 -11
- package/dist/types/server/IntlayerServerProvider.d.ts.map +1 -1
- package/dist/types/server/ambientLocale.d.ts +3 -4
- package/dist/types/server/ambientLocale.d.ts.map +1 -1
- package/dist/types/server/format/useCompact.d.ts +1 -2
- package/dist/types/server/format/useCompact.d.ts.map +1 -1
- package/dist/types/server/format/useCurrency.d.ts +1 -2
- package/dist/types/server/format/useCurrency.d.ts.map +1 -1
- package/dist/types/server/format/useDate.d.ts +1 -2
- package/dist/types/server/format/useDate.d.ts.map +1 -1
- package/dist/types/server/format/useList.d.ts +1 -2
- package/dist/types/server/format/useList.d.ts.map +1 -1
- package/dist/types/server/format/useNumber.d.ts +1 -2
- package/dist/types/server/format/useNumber.d.ts.map +1 -1
- package/dist/types/server/format/usePercentage.d.ts +1 -2
- package/dist/types/server/format/usePercentage.d.ts.map +1 -1
- package/dist/types/server/format/useRelativeTime.d.ts +1 -2
- package/dist/types/server/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/server/format/useUnit.d.ts +1 -2
- package/dist/types/server/format/useUnit.d.ts.map +1 -1
- package/dist/types/server/getLocale.d.ts +1 -2
- package/dist/types/server/getLocale.d.ts.map +1 -1
- package/dist/types/server/prepareSwcOptimization.d.ts +5 -6
- package/dist/types/server/prepareSwcOptimization.d.ts.map +1 -1
- package/dist/types/server/suspendingReader.d.ts +1 -2
- package/dist/types/server/suspendingReader.d.ts.map +1 -1
- package/dist/types/server/swcPluginCompatibility.d.ts +2 -3
- package/dist/types/server/swcPluginCompatibility.d.ts.map +1 -1
- package/dist/types/server/t.d.ts +1 -2
- package/dist/types/server/t.d.ts.map +1 -1
- package/dist/types/server/useDictionary.d.ts +1 -2
- package/dist/types/server/useDictionary.d.ts.map +1 -1
- package/dist/types/server/useDictionaryAsync.d.ts +1 -2
- package/dist/types/server/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/server/useDictionaryDynamic.d.ts +1 -2
- package/dist/types/server/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/server/useI18n.d.ts +1 -2
- package/dist/types/server/useI18n.d.ts.map +1 -1
- package/dist/types/server/useIntl.d.ts +1 -2
- package/dist/types/server/useIntl.d.ts.map +1 -1
- package/dist/types/server/useIntlayer.d.ts +1 -2
- package/dist/types/server/useIntlayer.d.ts.map +1 -1
- package/dist/types/server/useLocale.d.ts +2 -3
- package/dist/types/server/useLocale.d.ts.map +1 -1
- package/dist/types/server/withIntlayer.d.ts +3 -3
- package/dist/types/server/withIntlayer.d.ts.map +1 -1
- package/dist/types/types/NextPage.d.ts +8 -9
- package/dist/types/types/NextPage.d.ts.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerServerProvider.d.ts","names":[],"sources":["../../../src/server/IntlayerServerProvider.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"IntlayerServerProvider.d.ts","names":[],"sources":["../../../src/server/IntlayerServerProvider.ts"],"mappings":";;;;;YAQY,8BAA8B;;;;;;;;;;;;;;;;qBAiB7B,wCAAsB,GAAA"}
|
|
@@ -12,12 +12,12 @@ import { Locale } from "@intlayer/types/allLocales";
|
|
|
12
12
|
* Suspends until the request storage resolves. Returns `undefined` when the
|
|
13
13
|
* call site or the server context already carries the locale.
|
|
14
14
|
*/
|
|
15
|
-
declare const resolveFallbackLocale: (localeOrSelector?: unknown) => Locale | undefined;
|
|
15
|
+
export declare const resolveFallbackLocale: (localeOrSelector?: unknown) => Locale | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* Asynchronous twin of {@link resolveFallbackLocale}, for the hooks that are
|
|
18
18
|
* already async and can await the request storage instead of suspending on it.
|
|
19
19
|
*/
|
|
20
|
-
declare const getFallbackLocale: (localeOrSelector?: unknown) => Promise<Locale | undefined>;
|
|
20
|
+
export declare const getFallbackLocale: (localeOrSelector?: unknown) => Promise<Locale | undefined>;
|
|
21
21
|
/**
|
|
22
22
|
* Full ambient locale for the server APIs that take a plain locale argument
|
|
23
23
|
* (or none at all): call site → server context → locale carried by the
|
|
@@ -28,7 +28,6 @@ declare const getFallbackLocale: (localeOrSelector?: unknown) => Promise<Locale
|
|
|
28
28
|
* reimplemented here have no such fallback slot, so they need the resolved
|
|
29
29
|
* value.
|
|
30
30
|
*/
|
|
31
|
-
declare const resolveAmbientLocale: (locale?: LocalesValues) => LocalesValues | undefined;
|
|
31
|
+
export declare const resolveAmbientLocale: (locale?: LocalesValues) => LocalesValues | undefined;
|
|
32
32
|
//#endregion
|
|
33
|
-
export { getFallbackLocale, resolveAmbientLocale, resolveFallbackLocale };
|
|
34
33
|
//# sourceMappingURL=ambientLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ambientLocale.d.ts","names":[],"sources":["../../../src/server/ambientLocale.ts"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ambientLocale.d.ts","names":[],"sources":["../../../src/server/ambientLocale.ts"],"mappings":";;;;;;;;;;;;;;qBAiDa,wBAAqB,+BAE/B;;;;;qBAOU,oBAAiB,+BAE3B,QAAQ;;;;;;;;;;;qBAaE,uBAAoB,SACtB,kBACR"}
|
|
@@ -10,7 +10,6 @@ import { compact } from "@intlayer/core/formatters";
|
|
|
10
10
|
* locale — it would read the server context alone and format with the default
|
|
11
11
|
* locale on any render the provider did not reach.
|
|
12
12
|
*/
|
|
13
|
-
declare const useCompact: () => (...args: Parameters<typeof compact>) => string;
|
|
13
|
+
export declare const useCompact: () => (...args: Parameters<typeof compact>) => string;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { useCompact };
|
|
16
15
|
//# sourceMappingURL=useCompact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/server/format/useCompact.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/server/format/useCompact.ts"],"mappings":";;;;;;;;;;;;qBAaa,sBAAU,MAGJ,kBAAkB"}
|
|
@@ -10,7 +10,6 @@ import { currency } from "@intlayer/core/formatters";
|
|
|
10
10
|
* locale — it would read the server context alone and format with the default
|
|
11
11
|
* locale on any render the provider did not reach.
|
|
12
12
|
*/
|
|
13
|
-
declare const useCurrency: () => (...args: Parameters<typeof currency>) => string;
|
|
13
|
+
export declare const useCurrency: () => (...args: Parameters<typeof currency>) => string;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { useCurrency };
|
|
16
15
|
//# sourceMappingURL=useCurrency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/server/format/useCurrency.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/server/format/useCurrency.ts"],"mappings":";;;;;;;;;;;;qBAaa,uBAAW,MAGL,kBAAkB"}
|
|
@@ -14,7 +14,6 @@ import { date } from "@intlayer/core/formatters";
|
|
|
14
14
|
* preset is resolved before the locale is merged in — spreading the string
|
|
15
15
|
* itself would scatter its characters and drop the preset.
|
|
16
16
|
*/
|
|
17
|
-
declare const useDate: () => (...args: Parameters<typeof date>) => string;
|
|
17
|
+
export declare const useDate: () => (...args: Parameters<typeof date>) => string;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { useDate };
|
|
20
19
|
//# sourceMappingURL=useDate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../../src/server/format/useDate.ts"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../../src/server/format/useDate.ts"],"mappings":";;;;;;;;;;;;;;;;qBAiBa,mBAAO,MAGD,kBAAkB"}
|
|
@@ -10,7 +10,6 @@ import { list } from "@intlayer/core/formatters";
|
|
|
10
10
|
* locale — it would read the server context alone and format with the default
|
|
11
11
|
* locale on any render the provider did not reach.
|
|
12
12
|
*/
|
|
13
|
-
declare const useList: () => (...args: Parameters<typeof list>) => string;
|
|
13
|
+
export declare const useList: () => (...args: Parameters<typeof list>) => string;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { useList };
|
|
16
15
|
//# sourceMappingURL=useList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/server/format/useList.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/server/format/useList.ts"],"mappings":";;;;;;;;;;;;qBAaa,mBAAO,MAGD,kBAAkB"}
|
|
@@ -10,7 +10,6 @@ import { number } from "@intlayer/core/formatters";
|
|
|
10
10
|
* locale — it would read the server context alone and format with the default
|
|
11
11
|
* locale on any render the provider did not reach.
|
|
12
12
|
*/
|
|
13
|
-
declare const useNumber: () => (...args: Parameters<typeof number>) => string;
|
|
13
|
+
export declare const useNumber: () => (...args: Parameters<typeof number>) => string;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { useNumber };
|
|
16
15
|
//# sourceMappingURL=useNumber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/server/format/useNumber.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/server/format/useNumber.ts"],"mappings":";;;;;;;;;;;;qBAaa,qBAAS,MAGH,kBAAkB"}
|
|
@@ -10,7 +10,6 @@ import { percentage } from "@intlayer/core/formatters";
|
|
|
10
10
|
* locale — it would read the server context alone and format with the default
|
|
11
11
|
* locale on any render the provider did not reach.
|
|
12
12
|
*/
|
|
13
|
-
declare const usePercentage: () => (...args: Parameters<typeof percentage>) => string;
|
|
13
|
+
export declare const usePercentage: () => (...args: Parameters<typeof percentage>) => string;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { usePercentage };
|
|
16
15
|
//# sourceMappingURL=usePercentage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/server/format/usePercentage.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/server/format/usePercentage.ts"],"mappings":";;;;;;;;;;;;qBAaa,yBAAa,MAGP,kBAAkB"}
|
|
@@ -10,7 +10,6 @@ import { relativeTime } from "@intlayer/core/formatters";
|
|
|
10
10
|
* locale — it would read the server context alone and format with the default
|
|
11
11
|
* locale on any render the provider did not reach.
|
|
12
12
|
*/
|
|
13
|
-
declare const useRelativeTime: () => (...args: Parameters<typeof relativeTime>) => string;
|
|
13
|
+
export declare const useRelativeTime: () => (...args: Parameters<typeof relativeTime>) => string;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { useRelativeTime };
|
|
16
15
|
//# sourceMappingURL=useRelativeTime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/server/format/useRelativeTime.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/server/format/useRelativeTime.ts"],"mappings":";;;;;;;;;;;;qBAaa,2BAAe,MAGT,kBAAkB"}
|
|
@@ -10,7 +10,6 @@ import { units } from "@intlayer/core/formatters";
|
|
|
10
10
|
* locale — it would read the server context alone and format with the default
|
|
11
11
|
* locale on any render the provider did not reach.
|
|
12
12
|
*/
|
|
13
|
-
declare const useUnit: () => (...args: Parameters<typeof units>) => string;
|
|
13
|
+
export declare const useUnit: () => (...args: Parameters<typeof units>) => string;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { useUnit };
|
|
16
15
|
//# sourceMappingURL=useUnit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/server/format/useUnit.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/server/format/useUnit.ts"],"mappings":";;;;;;;;;;;;qBAaa,mBAAO,MAGD,kBAAkB"}
|
|
@@ -18,7 +18,6 @@ import { Locale } from "@intlayer/types/allLocales";
|
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
declare const getLocale: () => Promise<Locale>;
|
|
21
|
+
export declare const getLocale: () => Promise<Locale>;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { getLocale };
|
|
24
23
|
//# sourceMappingURL=getLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLocale.d.ts","names":[],"sources":["../../../src/server/getLocale.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getLocale.d.ts","names":[],"sources":["../../../src/server/getLocale.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;qBA0Ba,iBAAsB,QAAQ"}
|
|
@@ -9,9 +9,9 @@ import { IntlayerConfig } from "@intlayer/types/config";
|
|
|
9
9
|
* Field-rename tables keyed by dictionary key, forwarded to the
|
|
10
10
|
* `@intlayer/swc` plugin's `fieldRenameMap` option.
|
|
11
11
|
*/
|
|
12
|
-
type FieldRenameMapByDictionaryKey = Record<string, SerializedFieldRenameMap>;
|
|
12
|
+
export type FieldRenameMapByDictionaryKey = Record<string, SerializedFieldRenameMap>;
|
|
13
13
|
/** Verbosity forwarded to the `@intlayer/swc` plugin's `logLevel` option. */
|
|
14
|
-
type SwcLogLevel = 'off' | 'info' | 'debug';
|
|
14
|
+
export type SwcLogLevel = 'off' | 'info' | 'debug';
|
|
15
15
|
/**
|
|
16
16
|
* Resolves the verbosity the `@intlayer/swc` plugin should report at.
|
|
17
17
|
*
|
|
@@ -19,7 +19,7 @@ type SwcLogLevel = 'off' | 'info' | 'debug';
|
|
|
19
19
|
* the purge and minify reporting, which the pipeline emits in Node so the
|
|
20
20
|
* Next.js build reads the same as the Vite one.
|
|
21
21
|
*/
|
|
22
|
-
declare const resolveSwcLogLevel: (intlayerConfig: IntlayerConfig) => SwcLogLevel;
|
|
22
|
+
export declare const resolveSwcLogLevel: (intlayerConfig: IntlayerConfig) => SwcLogLevel;
|
|
23
23
|
/**
|
|
24
24
|
* Whether the purge / minify pipeline can run at all, i.e. whether a usable
|
|
25
25
|
* `@intlayer/babel` is resolvable from the project.
|
|
@@ -28,7 +28,7 @@ declare const resolveSwcLogLevel: (intlayerConfig: IntlayerConfig) => SwcLogLeve
|
|
|
28
28
|
* `Dictionary minification enabled` while the pipeline cannot load would describe a
|
|
29
29
|
* pass that never happens.
|
|
30
30
|
*/
|
|
31
|
-
declare const getIsPurgePipelineAvailable: (intlayerConfig: IntlayerConfig) => boolean;
|
|
31
|
+
export declare const getIsPurgePipelineAvailable: (intlayerConfig: IntlayerConfig) => boolean;
|
|
32
32
|
type PrepareSwcOptimizationParams = {
|
|
33
33
|
/** Options forwarded to the intlayer configuration loader. */
|
|
34
34
|
configOptions?: GetConfigurationOptions;
|
|
@@ -62,7 +62,6 @@ type PrepareSwcOptimizationParams = {
|
|
|
62
62
|
* @returns The field-rename tables, keyed by dictionary key. Empty when the
|
|
63
63
|
* pipeline is disabled, unavailable, or renamed nothing.
|
|
64
64
|
*/
|
|
65
|
-
declare const prepareSwcOptimization: (intlayerConfig: IntlayerConfig, params: PrepareSwcOptimizationParams) => Promise<FieldRenameMapByDictionaryKey>;
|
|
65
|
+
export declare const prepareSwcOptimization: (intlayerConfig: IntlayerConfig, params: PrepareSwcOptimizationParams) => Promise<FieldRenameMapByDictionaryKey>;
|
|
66
66
|
//#endregion
|
|
67
|
-
export { FieldRenameMapByDictionaryKey, SwcLogLevel, getIsPurgePipelineAvailable, prepareSwcOptimization, resolveSwcLogLevel };
|
|
68
67
|
//# sourceMappingURL=prepareSwcOptimization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareSwcOptimization.d.ts","names":[],"sources":["../../../src/server/prepareSwcOptimization.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"prepareSwcOptimization.d.ts","names":[],"sources":["../../../src/server/prepareSwcOptimization.ts"],"mappings":";;;;;;;;;;;YAsBY,gCAAgC,eAE1C;;YAIU;;;;;;;;qBAoDC,qBAAkB,gBACb,mBACf;;;;;;;;;qBAqGU,8BAA2B,gBACtB;KAkGb;;EAEH,gBAAgB;;EAEhB,eAAe;;EAEf,kBAAkB;;;;;EAKlB;;;;;;;;;;;;;;;;;;;;;;qBAuBW,yBAAsB,gBACjB,gBAAc,QACtB,iCACP,QAAQ"}
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
* the reader reports `undefined` so callers fall back to the default locale,
|
|
17
17
|
* matching the previous behavior.
|
|
18
18
|
*/
|
|
19
|
-
declare const createSuspendingReader: <T>(load: () => Promise<T | undefined>) => (() => T | undefined);
|
|
19
|
+
export declare const createSuspendingReader: <T>(load: () => Promise<T | undefined>) => (() => T | undefined);
|
|
20
20
|
//#endregion
|
|
21
|
-
export { createSuspendingReader };
|
|
22
21
|
//# sourceMappingURL=suspendingReader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suspendingReader.d.ts","names":[],"sources":["../../../src/server/suspendingReader.ts"],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"suspendingReader.d.ts","names":[],"sources":["../../../src/server/suspendingReader.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBA0Ba,yBAA0B,GAAC,YAC1B,QAAQ,0BACZ"}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* `swc_ecma_ast` version this Next.js release ships, never a newer one, or the
|
|
29
29
|
* floor moves up with it.
|
|
30
30
|
*/
|
|
31
|
-
declare const MINIMUM_SWC_PLUGIN_NEXT_VERSION = "16.1.0";
|
|
31
|
+
export declare const MINIMUM_SWC_PLUGIN_NEXT_VERSION = "16.1.0";
|
|
32
32
|
/**
|
|
33
33
|
* Whether `nextVersion` bundles an SWC able to load the `@intlayer/swc` Wasm
|
|
34
34
|
* plugin.
|
|
@@ -46,7 +46,6 @@ declare const MINIMUM_SWC_PLUGIN_NEXT_VERSION = "16.1.0";
|
|
|
46
46
|
* getIsSwcPluginSupported('15.5.18'); // false
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
|
-
declare const getIsSwcPluginSupported: (nextVersion: string) => boolean;
|
|
49
|
+
export declare const getIsSwcPluginSupported: (nextVersion: string) => boolean;
|
|
50
50
|
//#endregion
|
|
51
|
-
export { MINIMUM_SWC_PLUGIN_NEXT_VERSION, getIsSwcPluginSupported };
|
|
52
51
|
//# sourceMappingURL=swcPluginCompatibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swcPluginCompatibility.d.ts","names":[],"sources":["../../../src/server/swcPluginCompatibility.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"swcPluginCompatibility.d.ts","names":[],"sources":["../../../src/server/swcPluginCompatibility.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA+Ba;;;;;;;;;;;;;;;;;;qBAmBA,0BAAuB"}
|
package/dist/types/server/t.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { t as t$1 } from "react-intlayer/server";
|
|
|
7
7
|
* If the locale is not provided, it will use the locale from the server
|
|
8
8
|
* context, falling back to the locale carried by the request.
|
|
9
9
|
*/
|
|
10
|
-
declare const t: <Content = string, L extends LocalesValues = DeclaredLocales>(multilangContent: StrictModeLocaleMap<Content>, locale?: L) => ReturnType<typeof t$1<Content, L>>;
|
|
10
|
+
export declare const t: <Content = string, L extends LocalesValues = DeclaredLocales>(multilangContent: StrictModeLocaleMap<Content>, locale?: L) => ReturnType<typeof t$1<Content, L>>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { t };
|
|
13
12
|
//# sourceMappingURL=t.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"t.d.ts","names":[],"sources":["../../../src/server/t.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"t.d.ts","names":[],"sources":["../../../src/server/t.ts"],"mappings":";;;;;;;;;qBAca,IAAK,kBAAkB,UAAU,gBAAgB,iBAAe,kBACzD,oBAAoB,UAAQ,SACrC,MACR,kBAAkB,IAAM,SAAS"}
|
|
@@ -9,7 +9,6 @@ import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup } from
|
|
|
9
9
|
* If the locale is not provided, it will use the locale from the server
|
|
10
10
|
* context, falling back to the locale carried by the request.
|
|
11
11
|
*/
|
|
12
|
-
declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => ReturnType<typeof useDictionary$1<T, A>>;
|
|
12
|
+
export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => ReturnType<typeof useDictionary$1<T, A>>;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { useDictionary };
|
|
15
14
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/server/useDictionary.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/server/useDictionary.ts"],"mappings":";;;;;;;;;;;qBAmBa,sBACL,UAAU,aAAa,gCACvB,UACF,gBACA,2BAA2B,KAAK,iBAAe,YAEvC,GAAC,mBACM,MAClB,kBAAkB,gBAAkB,GAAG"}
|
|
@@ -8,7 +8,6 @@ import { Dictionary } from "@intlayer/types/dictionary";
|
|
|
8
8
|
* If the locale is not provided, it will use the locale from the server
|
|
9
9
|
* context, falling back to the locale carried by the request.
|
|
10
10
|
*/
|
|
11
|
-
declare const useDictionaryAsync: <const T extends Dictionary, const L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: L) => ReturnType<typeof useDictionaryAsync$1<T, L>>;
|
|
11
|
+
export declare const useDictionaryAsync: <const T extends Dictionary, const L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: L) => ReturnType<typeof useDictionaryAsync$1<T, L>>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { useDictionaryAsync };
|
|
14
13
|
//# sourceMappingURL=useDictionaryAsync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/server/useDictionaryAsync.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/server/useDictionaryAsync.ts"],"mappings":";;;;;;;;;;qBAea,2BACL,UAAU,kBACV,UAAU,gBAAgB,iBAAe,mBAE5B,0BAA0B,QAAQ,KAAG,SAC/C,MACR,kBAAkB,qBAAuB,GAAG"}
|
|
@@ -10,7 +10,6 @@ import { QualifiedDynamicLoaderMap } from "@intlayer/core/dictionaryManipulator"
|
|
|
10
10
|
* If the locale is not provided, it will use the locale from the server
|
|
11
11
|
* context, falling back to the locale carried by the request.
|
|
12
12
|
*/
|
|
13
|
-
declare const useDictionaryDynamic: <const T extends Dictionary, const A extends LocalesValues | DictionarySelector = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: string, localeOrSelector?: A) => ReturnType<typeof useDictionaryDynamic$1<T, A>>;
|
|
13
|
+
export declare const useDictionaryDynamic: <const T extends Dictionary, const A extends LocalesValues | DictionarySelector = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: string, localeOrSelector?: A) => ReturnType<typeof useDictionaryDynamic$1<T, A>>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { useDictionaryDynamic };
|
|
16
15
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/server/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/server/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;qBAoBa,6BACL,UAAU,kBACV,UAAU,gBAAgB,qBAAqB,iBAAe,mBAGhE,0BAA0B,QAAQ,MAClC,2BAAyB,aAClB,mBACQ,MAClB,kBAAkB,uBAAyB,GAAG"}
|
|
@@ -8,7 +8,6 @@ import { useI18n as useI18n$1 } from "react-intlayer/server";
|
|
|
8
8
|
* If the locale is not provided, it will use the locale from the server
|
|
9
9
|
* context, falling back to the locale carried by the request.
|
|
10
10
|
*/
|
|
11
|
-
declare const useI18n: <T extends DictionaryKeys>(namespace: T, locale?: LocalesValues) => ReturnType<typeof useI18n$1<T>>;
|
|
11
|
+
export declare const useI18n: <T extends DictionaryKeys>(namespace: T, locale?: LocalesValues) => ReturnType<typeof useI18n$1<T>>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { useI18n };
|
|
14
13
|
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","names":[],"sources":["../../../src/server/useI18n.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","names":[],"sources":["../../../src/server/useI18n.ts"],"mappings":";;;;;;;;;;qBAca,UAAW,UAAU,gBAAc,WACnC,GAAC,SACH,kBACR,kBAAkB,UAAY"}
|
|
@@ -7,7 +7,6 @@ import { WrappedIntl } from "@intlayer/core/formatters";
|
|
|
7
7
|
* If the locale is not provided, it will use the locale from the server
|
|
8
8
|
* context, falling back to the locale carried by the request.
|
|
9
9
|
*/
|
|
10
|
-
declare const useIntl: (locale?: LocalesValues) => WrappedIntl;
|
|
10
|
+
export declare const useIntl: (locale?: LocalesValues) => WrappedIntl;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { useIntl };
|
|
13
12
|
//# sourceMappingURL=useIntl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../src/server/useIntl.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../src/server/useIntl.ts"],"mappings":";;;;;;;;;qBAWa,UAAO,SAAa,kBAAgB"}
|
|
@@ -9,7 +9,6 @@ import { useIntlayer as useIntlayer$1 } from "react-intlayer/server";
|
|
|
9
9
|
* If the locale is not provided, it will use the locale from the server
|
|
10
10
|
* context, falling back to the locale carried by the request.
|
|
11
11
|
*/
|
|
12
|
-
declare const useIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => ReturnType<typeof useIntlayer$1<T, A>>;
|
|
12
|
+
export declare const useIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => ReturnType<typeof useIntlayer$1<T, A>>;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { useIntlayer };
|
|
15
14
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/server/useIntlayer.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/server/useIntlayer.ts"],"mappings":";;;;;;;;;;;qBAiBa,oBACL,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,iBAAe,KAExE,GAAC,mBACa,MAClB,kBAAkB,cAAgB,GAAG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeclaredLocales } from "@intlayer/types/module_augmentation";
|
|
2
2
|
//#region src/server/useLocale.d.ts
|
|
3
|
-
type UseLocaleResult = {
|
|
3
|
+
export type UseLocaleResult = {
|
|
4
4
|
locale: DeclaredLocales;
|
|
5
5
|
defaultLocale: DeclaredLocales;
|
|
6
6
|
availableLocales: DeclaredLocales[];
|
|
@@ -14,7 +14,6 @@ type UseLocaleResult = {
|
|
|
14
14
|
* it would read the server context alone and report the default locale on any
|
|
15
15
|
* render the provider did not reach.
|
|
16
16
|
*/
|
|
17
|
-
declare const useLocale: () => UseLocaleResult;
|
|
17
|
+
export declare const useLocale: () => UseLocaleResult;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { UseLocaleResult, useLocale };
|
|
20
19
|
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/server/useLocale.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/server/useLocale.ts"],"mappings":";;YAIY;EACV,QAAQ;EACR,eAAe;EACf,kBAAkB;;;;;;;;;;;qBAYP,iBAAgB"}
|
|
@@ -28,7 +28,7 @@ type WithIntlayerOptions = GetConfigurationOptions & {
|
|
|
28
28
|
* export default withIntlayerSync(nextConfig)
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
declare const withIntlayerSync: <T extends Partial<NextConfig>>(nextConfig?: T, configOptions?: WithIntlayerOptions) => NextConfig & T;
|
|
31
|
+
export declare const withIntlayerSync: <T extends Partial<NextConfig>>(nextConfig?: T, configOptions?: WithIntlayerOptions) => NextConfig & T;
|
|
32
32
|
/**
|
|
33
33
|
* A Next.js plugin that adds the intlayer configuration to the webpack configuration
|
|
34
34
|
* and sets the environment variables
|
|
@@ -44,7 +44,7 @@ declare const withIntlayerSync: <T extends Partial<NextConfig>>(nextConfig?: T,
|
|
|
44
44
|
* > Using the promise allows to prepare the intlayer dictionaries before the build starts.
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
47
|
-
declare const withIntlayer: <T extends NextConfig | Partial<NextConfig>>(nextConfig?: T | Promise<T>, configOptions?: WithIntlayerOptions) => Promise<NextConfig & T>;
|
|
47
|
+
export declare const withIntlayer: <T extends NextConfig | Partial<NextConfig>>(nextConfig?: T | Promise<T>, configOptions?: WithIntlayerOptions) => Promise<NextConfig & T>;
|
|
48
48
|
//#endregion
|
|
49
|
-
export { MINIMUM_SWC_PLUGIN_NEXT_VERSION, getIsSwcPluginSupported
|
|
49
|
+
export { MINIMUM_SWC_PLUGIN_NEXT_VERSION, getIsSwcPluginSupported };
|
|
50
50
|
//# sourceMappingURL=withIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withIntlayer.d.ts","names":[],"sources":["../../../src/server/withIntlayer.ts"],"mappings":";;;;;;KA4XK,sBAAsB;EACzB;EACA,kBAAkB;;;;;;;;;EAUlB,iBAAiB;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"withIntlayer.d.ts","names":[],"sources":["../../../src/server/withIntlayer.ts"],"mappings":";;;;;;KA4XK,sBAAsB;EACzB;EACA,kBAAkB;;;;;;;;;EAUlB,iBAAiB;;;;;;;;;;;;;qBAuDN,mBAAoB,UAAU,QAAQ,aAAW,aAChD,GAAC,gBACG,wBACf,aAAa;;;;;;;;;;;;;;;;qBA4QH,eAAsB,UAAU,aAAa,QAAQ,aAAW,aAC/D,IAAI,QAAQ,IAAE,gBACV,wBACf,QAAQ,aAAa"}
|
|
@@ -2,22 +2,21 @@ import { PropsWithChildren, ReactNode } from "react";
|
|
|
2
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
3
|
import { NextPage } from "next";
|
|
4
4
|
//#region src/types/NextPage.d.ts
|
|
5
|
-
type LocalParams<T = {}> = {
|
|
5
|
+
export type LocalParams<T = {}> = {
|
|
6
6
|
params: {
|
|
7
7
|
locale?: LocalesValues;
|
|
8
8
|
} & T;
|
|
9
9
|
};
|
|
10
|
-
type LocalPromiseParams<T = {}> = {
|
|
10
|
+
export type LocalPromiseParams<T = {}> = {
|
|
11
11
|
params: Promise<{
|
|
12
12
|
locale?: LocalesValues;
|
|
13
13
|
} & T>;
|
|
14
14
|
};
|
|
15
|
-
type Next14PageIntlayer<T = {}> = NextPage<LocalParams<T>>;
|
|
16
|
-
type Next15PageIntlayer<T = {}> = (props: LocalPromiseParams<T>) => ReactNode | Promise<ReactNode>;
|
|
17
|
-
type NextPageIntlayer<T = {}> = Next15PageIntlayer<T>;
|
|
18
|
-
type Next14LayoutIntlayer<T = {}> = NextPage<PropsWithChildren<LocalParams<T>>>;
|
|
19
|
-
type Next15LayoutIntlayer<T = {}> = (props: PropsWithChildren<LocalPromiseParams<T>>) => ReactNode | Promise<ReactNode>;
|
|
20
|
-
type NextLayoutIntlayer<T = {}> = (props: PropsWithChildren<LocalPromiseParams<T>>) => ReactNode | Promise<ReactNode>;
|
|
15
|
+
export type Next14PageIntlayer<T = {}> = NextPage<LocalParams<T>>;
|
|
16
|
+
export type Next15PageIntlayer<T = {}> = (props: LocalPromiseParams<T>) => ReactNode | Promise<ReactNode>;
|
|
17
|
+
export type NextPageIntlayer<T = {}> = Next15PageIntlayer<T>;
|
|
18
|
+
export type Next14LayoutIntlayer<T = {}> = NextPage<PropsWithChildren<LocalParams<T>>>;
|
|
19
|
+
export type Next15LayoutIntlayer<T = {}> = (props: PropsWithChildren<LocalPromiseParams<T>>) => ReactNode | Promise<ReactNode>;
|
|
20
|
+
export type NextLayoutIntlayer<T = {}> = (props: PropsWithChildren<LocalPromiseParams<T>>) => ReactNode | Promise<ReactNode>;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { LocalParams, LocalPromiseParams, Next14LayoutIntlayer, Next14PageIntlayer, Next15LayoutIntlayer, Next15PageIntlayer, NextLayoutIntlayer, NextPageIntlayer };
|
|
23
22
|
//# sourceMappingURL=NextPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NextPage.d.ts","names":[],"sources":["../../../src/types/NextPage.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"NextPage.d.ts","names":[],"sources":["../../../src/types/NextPage.ts"],"mappings":";;;;YAIY,YAAY;EACtB;IAAU,SAAS;MAAkB;;YAG3B,mBAAmB;EAC7B,QAAQ;IAEJ,SAAS;MACP;;YAII,mBAAmB,UAAU,SAAS,YAAY;YAClD,mBAAmB,WAC7B,OAAO,mBAAmB,OACvB,YAAY,QAAQ;YACb,iBAAiB,UAAU,mBAAmB;YAE9C,qBAAqB,UAAU,SACzC,kBAAkB,YAAY;YAEpB,qBAAqB,WAC/B,OAAO,kBAAkB,mBAAmB,QACzC,YAAY,QAAQ;YAEb,mBAAmB,WAC7B,OAAO,kBAAkB,mBAAmB,QACzC,YAAY,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-intlayer",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Simplify internationalization i18n in Next.js with context providers, hooks, locale detection, and multilingual content integration.",
|
|
6
6
|
"keywords": [
|
|
@@ -138,27 +138,27 @@
|
|
|
138
138
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
139
139
|
},
|
|
140
140
|
"dependencies": {
|
|
141
|
-
"@intlayer/config": "9.4.
|
|
142
|
-
"@intlayer/core": "9.4.
|
|
143
|
-
"@intlayer/dictionaries-entry": "9.4.
|
|
144
|
-
"@intlayer/engine": "9.4.
|
|
145
|
-
"@intlayer/types": "9.4.
|
|
146
|
-
"@intlayer/webpack": "9.4.
|
|
141
|
+
"@intlayer/config": "9.4.3",
|
|
142
|
+
"@intlayer/core": "9.4.3",
|
|
143
|
+
"@intlayer/dictionaries-entry": "9.4.3",
|
|
144
|
+
"@intlayer/engine": "9.4.3",
|
|
145
|
+
"@intlayer/types": "9.4.3",
|
|
146
|
+
"@intlayer/webpack": "9.4.3",
|
|
147
147
|
"defu": "6.1.7",
|
|
148
148
|
"node-loader": "2.1.0",
|
|
149
|
-
"react-intlayer": "9.4.
|
|
149
|
+
"react-intlayer": "9.4.3"
|
|
150
150
|
},
|
|
151
151
|
"devDependencies": {
|
|
152
|
-
"@types/node": "26.
|
|
152
|
+
"@types/node": "26.4.1",
|
|
153
153
|
"@types/react": ">=16.0.0",
|
|
154
154
|
"@types/react-dom": ">=16.0.0",
|
|
155
155
|
"@utils/ts-config": "1.0.4",
|
|
156
156
|
"@utils/ts-config-types": "1.0.4",
|
|
157
157
|
"@utils/tsdown-config": "1.0.4",
|
|
158
158
|
"rimraf": "6.1.3",
|
|
159
|
-
"tsdown": "0.
|
|
159
|
+
"tsdown": "0.23.0",
|
|
160
160
|
"typescript": "7.0.2",
|
|
161
|
-
"vitest": "
|
|
161
|
+
"vitest": "5.0.0"
|
|
162
162
|
},
|
|
163
163
|
"peerDependencies": {
|
|
164
164
|
"next": ">=14.0.0",
|