remix-intlayer 9.6.0 → 9.7.1
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/cjs/context.cjs +1 -2
- package/dist/cjs/format/index.cjs +9 -9
- package/dist/cjs/format/useCompact.cjs +3 -6
- package/dist/cjs/format/useCompact.cjs.map +1 -1
- package/dist/cjs/format/useCurrency.cjs +3 -6
- package/dist/cjs/format/useCurrency.cjs.map +1 -1
- package/dist/cjs/format/useDate.cjs +3 -6
- package/dist/cjs/format/useDate.cjs.map +1 -1
- package/dist/cjs/format/useIntl.cjs +5 -7
- package/dist/cjs/format/useIntl.cjs.map +1 -1
- package/dist/cjs/format/useList.cjs +3 -6
- package/dist/cjs/format/useList.cjs.map +1 -1
- package/dist/cjs/format/useNumber.cjs +3 -6
- package/dist/cjs/format/useNumber.cjs.map +1 -1
- package/dist/cjs/format/usePercentage.cjs +3 -6
- package/dist/cjs/format/usePercentage.cjs.map +1 -1
- package/dist/cjs/format/useRelativeTime.cjs +3 -6
- package/dist/cjs/format/useRelativeTime.cjs.map +1 -1
- package/dist/cjs/format/useUnit.cjs +3 -6
- package/dist/cjs/format/useUnit.cjs.map +1 -1
- package/dist/cjs/html/index.cjs +5 -5
- package/dist/cjs/index.cjs +7 -7
- package/dist/cjs/localeRouting.cjs +2 -3
- package/dist/cjs/markdown/index.cjs +7 -7
- package/dist/cjs/middleware.cjs +5 -6
- package/dist/cjs/persistLocale.cjs +1 -2
- package/dist/cjs/plugins.cjs +1 -2
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/cjs/requestStorage.cjs +2 -3
- package/dist/cjs/useDictionary.cjs +3 -4
- package/dist/cjs/useIntlayer.cjs +3 -4
- package/dist/cjs/useLocale.cjs +2 -3
- package/dist/esm/context.mjs +1 -2
- package/dist/esm/format/index.mjs +5 -5
- package/dist/esm/format/useCompact.mjs +2 -5
- package/dist/esm/format/useCompact.mjs.map +1 -1
- package/dist/esm/format/useCurrency.mjs +2 -5
- package/dist/esm/format/useCurrency.mjs.map +1 -1
- package/dist/esm/format/useDate.mjs +2 -5
- package/dist/esm/format/useDate.mjs.map +1 -1
- package/dist/esm/format/useIntl.mjs +4 -6
- package/dist/esm/format/useIntl.mjs.map +1 -1
- package/dist/esm/format/useList.mjs +2 -5
- package/dist/esm/format/useList.mjs.map +1 -1
- package/dist/esm/format/useNumber.mjs +2 -5
- package/dist/esm/format/useNumber.mjs.map +1 -1
- package/dist/esm/format/usePercentage.mjs +2 -5
- package/dist/esm/format/usePercentage.mjs.map +1 -1
- package/dist/esm/format/useRelativeTime.mjs +2 -5
- package/dist/esm/format/useRelativeTime.mjs.map +1 -1
- package/dist/esm/format/useUnit.mjs +2 -5
- package/dist/esm/format/useUnit.mjs.map +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/localeRouting.mjs +2 -3
- package/dist/esm/middleware.mjs +2 -3
- package/dist/esm/persistLocale.mjs +1 -2
- package/dist/esm/plugins.mjs +1 -2
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/esm/requestStorage.mjs +1 -2
- package/dist/esm/useDictionary.mjs +2 -3
- package/dist/esm/useIntlayer.mjs +2 -3
- package/dist/esm/useLocale.mjs +1 -2
- package/dist/types/context.d.ts +0 -2
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/format/useCompact.d.ts +0 -2
- package/dist/types/format/useCompact.d.ts.map +1 -1
- package/dist/types/format/useCurrency.d.ts +0 -2
- package/dist/types/format/useCurrency.d.ts.map +1 -1
- package/dist/types/format/useDate.d.ts +0 -2
- package/dist/types/format/useDate.d.ts.map +1 -1
- package/dist/types/format/useIntl.d.ts +2 -3
- package/dist/types/format/useIntl.d.ts.map +1 -1
- package/dist/types/format/useList.d.ts +0 -2
- package/dist/types/format/useList.d.ts.map +1 -1
- package/dist/types/format/useNumber.d.ts +0 -2
- package/dist/types/format/useNumber.d.ts.map +1 -1
- package/dist/types/format/usePercentage.d.ts +0 -2
- package/dist/types/format/usePercentage.d.ts.map +1 -1
- package/dist/types/format/useRelativeTime.d.ts +0 -2
- package/dist/types/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/format/useUnit.d.ts +0 -2
- package/dist/types/format/useUnit.d.ts.map +1 -1
- package/dist/types/localeRouting.d.ts +0 -2
- package/dist/types/localeRouting.d.ts.map +1 -1
- package/dist/types/middleware.d.ts +0 -2
- package/dist/types/middleware.d.ts.map +1 -1
- package/dist/types/persistLocale.d.ts +0 -2
- package/dist/types/persistLocale.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +1 -3
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/requestStorage.d.ts +0 -2
- package/dist/types/requestStorage.d.ts.map +1 -1
- package/dist/types/useDictionary.d.ts +0 -2
- package/dist/types/useDictionary.d.ts.map +1 -1
- package/dist/types/useIntlayer.d.ts +0 -2
- package/dist/types/useIntlayer.d.ts.map +1 -1
- package/dist/types/useLocale.d.ts +0 -2
- package/dist/types/useLocale.d.ts.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";qBAGa,2BAAe,MAGT,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";qBAGa,mBAAO,MAGD,kBAAkB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Locale } from "@intlayer/types/allLocales";
|
|
2
2
|
import { IntlayerConfig } from "@intlayer/types/config";
|
|
3
|
-
//#region src/localeRouting.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* The part of an incoming request the locale routing is decided from.
|
|
6
5
|
*/
|
|
@@ -71,5 +70,4 @@ export type LocaleRoutingConfiguration = Pick<IntlayerConfig, 'internationalizat
|
|
|
71
70
|
* ```
|
|
72
71
|
*/
|
|
73
72
|
export declare const createLocaleRouting: (configuration: LocaleRoutingConfiguration, options?: LocaleRoutingOptions) => ((request: LocaleRoutingRequest) => LocaleRoutingAction);
|
|
74
|
-
//#endregion
|
|
75
73
|
//# sourceMappingURL=localeRouting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localeRouting.d.ts","names":[],"sources":["../../src/localeRouting.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"localeRouting.d.ts","names":[],"sources":["../../src/localeRouting.ts"],"mappings":";;;;;YAmBY;EACV,KAAK;EACL,SAAS;;;;;;;;;;;;;YAcC;EACN;;EACA;EAAiB;EAAc,SAAS;;EAExC;EACA;EACA;EACA,gBAAgB;;YAGV;;;;;;;;;EASV;;;;EAIA,UAAU,SAAS;;YAGT,6BAA6B,KACvC;;;;;;;;;;;;;;;;;;;;;;;;qBA0DW,sBAAmB,eACf,4BAA0B,UAChC,2BACN,SAAS,yBAAyB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { INTLAYER_CONTEXT_PROPERTY, Intlayer, IntlayerState } from "./context.js";
|
|
2
2
|
import { LocaleRoutingOptions } from "./localeRouting.js";
|
|
3
3
|
import { Middleware } from "remix/router";
|
|
4
|
-
//#region src/middleware.d.ts
|
|
5
4
|
export type IntlayerMiddlewareOptions = LocaleRoutingOptions;
|
|
6
5
|
/**
|
|
7
6
|
* Remix 3 router middleware handling the internationalization layer:
|
|
@@ -45,5 +44,4 @@ export declare const intlayer: (options?: IntlayerMiddlewareOptions) => Middlewa
|
|
|
45
44
|
value: IntlayerState;
|
|
46
45
|
property: typeof INTLAYER_CONTEXT_PROPERTY;
|
|
47
46
|
}>;
|
|
48
|
-
//#endregion
|
|
49
47
|
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","names":[],"sources":["../../src/middleware.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","names":[],"sources":["../../src/middleware.ts"],"mappings":";;;YAoBY,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAyD3B,WAAQ,UACV,8BACR;EACD,YAAY;EACZ,OAAO;EACP,iBAAiB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Locale } from "@intlayer/types/allLocales";
|
|
2
|
-
//#region src/persistLocale.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Writes the locale into the storage headers configured in `routing.storage`
|
|
5
4
|
* (custom header, and the cookie when `includeCookie` is set).
|
|
@@ -12,5 +11,4 @@ export declare const writeLocaleHeaders: (headers: Headers, locale: Locale, { in
|
|
|
12
11
|
* are immutable (`Response.redirect`, `Response.error`) is re-created.
|
|
13
12
|
*/
|
|
14
13
|
export declare const withLocaleHeaders: (response: Response, locale: Locale) => Response;
|
|
15
|
-
//#endregion
|
|
16
14
|
//# sourceMappingURL=persistLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistLocale.d.ts","names":[],"sources":["../../src/persistLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"persistLocale.d.ts","names":[],"sources":["../../src/persistLocale.ts"],"mappings":";;;;;qBAoCa,qBAAkB,SACpB,SAAO,QACR,UAAM;EACe;;;;;;qBAclB,oBAAiB,UAClB,UAAQ,QACV,WACP"}
|
package/dist/types/plugins.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { DeepTransformContent as DeepTransformContent$1, IInterpreterPluginState as IInterpreterPluginState$1, Plugins } from "@intlayer/core/interpreter";
|
|
3
|
-
//#region src/plugins.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Plugins applied by the hooks of this package.
|
|
6
5
|
*
|
|
7
6
|
* The base interpreter leaves `md()` and `html()` nodes untouched, so they are
|
|
8
7
|
* handed to the string renderers of `vanilla-intlayer`: the node exposes the
|
|
9
8
|
* rendered HTML as `.value` and `.use(components)` to override tags. Plain
|
|
10
|
-
* strings stay primitives — a `remix/
|
|
9
|
+
* strings stay primitives — a `remix/component` child must be a string, not a wrapper.
|
|
11
10
|
*/
|
|
12
11
|
export type IInterpreterPluginState = IInterpreterPluginState$1 & {
|
|
13
12
|
vanillaMarkdown: true;
|
|
@@ -19,5 +18,4 @@ export type DeepTransformContent<T, L extends LocalesValues = DeclaredLocales> =
|
|
|
19
18
|
* transform cache can key on its identity.
|
|
20
19
|
*/
|
|
21
20
|
export declare const getPlugins: (locale?: LocalesValues, fallback?: boolean) => Plugins[];
|
|
22
|
-
//#endregion
|
|
23
21
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","names":["IInterpreterPluginStateCore","DeepTransformContentCore"],"sources":["../../src/plugins.ts"],"mappings":";;;;;;;;;;YAsBY,0BAA0BA;EACpC;EACA;;YAGU,qBACV,GACA,UAAU,gBAAgB,mBACxBC,uBAAyB,GAAG,yBAAyB;;;;;qBAQ5C,aAAU,SACZ,eAAa,uBAErB"}
|
|
@@ -2,7 +2,6 @@ import { IntlayerState } from "./context.js";
|
|
|
2
2
|
import { DeclaredLocales } from "@intlayer/types/module_augmentation";
|
|
3
3
|
import { RequestContext } from "remix/router";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
|
-
//#region src/requestStorage.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Request context of the request being handled, made available to every
|
|
8
7
|
* function running inside the `intlayer()` middleware scope — route handlers,
|
|
@@ -17,5 +16,4 @@ export declare const getIntlayerState: () => IntlayerState | undefined;
|
|
|
17
16
|
* Returns the locale of the request being handled, if any.
|
|
18
17
|
*/
|
|
19
18
|
export declare const getRequestLocale: () => DeclaredLocales | undefined;
|
|
20
|
-
//#endregion
|
|
21
19
|
//# sourceMappingURL=requestStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestStorage.d.ts","names":[],"sources":["../../src/requestStorage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"requestStorage.d.ts","names":[],"sources":["../../src/requestStorage.ts"],"mappings":";;;;;;;;;qBAWa,gBAAc,kBAAA;;;;qBAKd,wBAAuB;;;;qBAMvB,wBAAuB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DeepTransformContent } from "./plugins.js";
|
|
2
2
|
import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
3
|
import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from "@intlayer/types/dictionary";
|
|
4
|
-
//#region src/useDictionary.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Transforms an imported dictionary (or qualified dictionary group) and returns
|
|
7
6
|
* its content for the locale of the request being handled.
|
|
@@ -25,5 +24,4 @@ import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, Resol
|
|
|
25
24
|
* ```
|
|
26
25
|
*/
|
|
27
26
|
export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
|
|
28
|
-
//#endregion
|
|
29
27
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../src/useDictionary.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../src/useDictionary.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;qBAyCa,sBACL,UAAU,aAAa,gCACvB,UACF,gBACA,2BAA2B,KAAK,iBAAe,YAEvC,GAAC,mBACM,MAClB,qBACD,kCAAkC,GAAG,IACrC,sBAAsB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepTransformContent } from "./plugins.js";
|
|
2
2
|
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
|
-
//#region src/useIntlayer.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Picks one dictionary by its key and returns its content for the locale of
|
|
6
5
|
* the request being handled.
|
|
@@ -22,5 +21,4 @@ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySe
|
|
|
22
21
|
* ```
|
|
23
22
|
*/
|
|
24
23
|
export declare const useIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
|
|
25
|
-
//#endregion
|
|
26
24
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../src/useIntlayer.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../src/useIntlayer.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;qBAoCa,oBACL,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,iBAAe,KAExE,GAAC,mBACa,MAClB,qBACD,yBAAyB,GAAG,IAC5B,sBAAsB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DeclaredLocales } from "@intlayer/types/module_augmentation";
|
|
2
|
-
//#region src/useLocale.d.ts
|
|
3
2
|
export type UseLocaleResult = {
|
|
4
3
|
locale: DeclaredLocales;
|
|
5
4
|
defaultLocale: DeclaredLocales;
|
|
@@ -21,5 +20,4 @@ export type UseLocaleResult = {
|
|
|
21
20
|
* ```
|
|
22
21
|
*/
|
|
23
22
|
export declare const useLocale: () => UseLocaleResult;
|
|
24
|
-
//#endregion
|
|
25
23
|
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../src/useLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../src/useLocale.ts"],"mappings":";YAIY;EACV,QAAQ;EACR,eAAe;EACf,kBAAkB;;;;;;;;;;;;;;;;;qBAoBP,iBAAgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remix-intlayer",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Manage internationalization i18n in a simple way for Remix 3 applications.",
|
|
6
6
|
"keywords": [
|
|
@@ -99,23 +99,23 @@
|
|
|
99
99
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
|
-
"@intlayer/config": "9.
|
|
103
|
-
"@intlayer/core": "9.
|
|
104
|
-
"@intlayer/engine": "9.
|
|
105
|
-
"@intlayer/types": "9.
|
|
106
|
-
"vanilla-intlayer": "9.
|
|
102
|
+
"@intlayer/config": "9.7.1",
|
|
103
|
+
"@intlayer/core": "9.7.1",
|
|
104
|
+
"@intlayer/engine": "9.7.1",
|
|
105
|
+
"@intlayer/types": "9.7.1",
|
|
106
|
+
"vanilla-intlayer": "9.7.1"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@intlayer/dictionaries-entry": "9.
|
|
110
|
-
"@types/node": "^
|
|
109
|
+
"@intlayer/dictionaries-entry": "9.7.1",
|
|
110
|
+
"@types/node": "^26",
|
|
111
111
|
"@utils/ts-config": "1.0.4",
|
|
112
112
|
"@utils/ts-config-types": "1.0.4",
|
|
113
113
|
"@utils/tsdown-config": "1.0.4",
|
|
114
|
-
"remix": "3.
|
|
114
|
+
"remix": "3.1.0",
|
|
115
115
|
"rimraf": "6.1.3",
|
|
116
|
-
"tsdown": "0.23.
|
|
116
|
+
"tsdown": "0.23.4",
|
|
117
117
|
"typescript": "7.0.2",
|
|
118
|
-
"vitest": "5.0
|
|
118
|
+
"vitest": "5.1.0"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
121
|
"remix": ">=3.0.0"
|