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.
Files changed (99) hide show
  1. package/dist/cjs/context.cjs +1 -2
  2. package/dist/cjs/format/index.cjs +9 -9
  3. package/dist/cjs/format/useCompact.cjs +3 -6
  4. package/dist/cjs/format/useCompact.cjs.map +1 -1
  5. package/dist/cjs/format/useCurrency.cjs +3 -6
  6. package/dist/cjs/format/useCurrency.cjs.map +1 -1
  7. package/dist/cjs/format/useDate.cjs +3 -6
  8. package/dist/cjs/format/useDate.cjs.map +1 -1
  9. package/dist/cjs/format/useIntl.cjs +5 -7
  10. package/dist/cjs/format/useIntl.cjs.map +1 -1
  11. package/dist/cjs/format/useList.cjs +3 -6
  12. package/dist/cjs/format/useList.cjs.map +1 -1
  13. package/dist/cjs/format/useNumber.cjs +3 -6
  14. package/dist/cjs/format/useNumber.cjs.map +1 -1
  15. package/dist/cjs/format/usePercentage.cjs +3 -6
  16. package/dist/cjs/format/usePercentage.cjs.map +1 -1
  17. package/dist/cjs/format/useRelativeTime.cjs +3 -6
  18. package/dist/cjs/format/useRelativeTime.cjs.map +1 -1
  19. package/dist/cjs/format/useUnit.cjs +3 -6
  20. package/dist/cjs/format/useUnit.cjs.map +1 -1
  21. package/dist/cjs/html/index.cjs +5 -5
  22. package/dist/cjs/index.cjs +7 -7
  23. package/dist/cjs/localeRouting.cjs +2 -3
  24. package/dist/cjs/markdown/index.cjs +7 -7
  25. package/dist/cjs/middleware.cjs +5 -6
  26. package/dist/cjs/persistLocale.cjs +1 -2
  27. package/dist/cjs/plugins.cjs +1 -2
  28. package/dist/cjs/plugins.cjs.map +1 -1
  29. package/dist/cjs/requestStorage.cjs +2 -3
  30. package/dist/cjs/useDictionary.cjs +3 -4
  31. package/dist/cjs/useIntlayer.cjs +3 -4
  32. package/dist/cjs/useLocale.cjs +2 -3
  33. package/dist/esm/context.mjs +1 -2
  34. package/dist/esm/format/index.mjs +5 -5
  35. package/dist/esm/format/useCompact.mjs +2 -5
  36. package/dist/esm/format/useCompact.mjs.map +1 -1
  37. package/dist/esm/format/useCurrency.mjs +2 -5
  38. package/dist/esm/format/useCurrency.mjs.map +1 -1
  39. package/dist/esm/format/useDate.mjs +2 -5
  40. package/dist/esm/format/useDate.mjs.map +1 -1
  41. package/dist/esm/format/useIntl.mjs +4 -6
  42. package/dist/esm/format/useIntl.mjs.map +1 -1
  43. package/dist/esm/format/useList.mjs +2 -5
  44. package/dist/esm/format/useList.mjs.map +1 -1
  45. package/dist/esm/format/useNumber.mjs +2 -5
  46. package/dist/esm/format/useNumber.mjs.map +1 -1
  47. package/dist/esm/format/usePercentage.mjs +2 -5
  48. package/dist/esm/format/usePercentage.mjs.map +1 -1
  49. package/dist/esm/format/useRelativeTime.mjs +2 -5
  50. package/dist/esm/format/useRelativeTime.mjs.map +1 -1
  51. package/dist/esm/format/useUnit.mjs +2 -5
  52. package/dist/esm/format/useUnit.mjs.map +1 -1
  53. package/dist/esm/index.mjs +2 -2
  54. package/dist/esm/localeRouting.mjs +2 -3
  55. package/dist/esm/middleware.mjs +2 -3
  56. package/dist/esm/persistLocale.mjs +1 -2
  57. package/dist/esm/plugins.mjs +1 -2
  58. package/dist/esm/plugins.mjs.map +1 -1
  59. package/dist/esm/requestStorage.mjs +1 -2
  60. package/dist/esm/useDictionary.mjs +2 -3
  61. package/dist/esm/useIntlayer.mjs +2 -3
  62. package/dist/esm/useLocale.mjs +1 -2
  63. package/dist/types/context.d.ts +0 -2
  64. package/dist/types/context.d.ts.map +1 -1
  65. package/dist/types/format/useCompact.d.ts +0 -2
  66. package/dist/types/format/useCompact.d.ts.map +1 -1
  67. package/dist/types/format/useCurrency.d.ts +0 -2
  68. package/dist/types/format/useCurrency.d.ts.map +1 -1
  69. package/dist/types/format/useDate.d.ts +0 -2
  70. package/dist/types/format/useDate.d.ts.map +1 -1
  71. package/dist/types/format/useIntl.d.ts +2 -3
  72. package/dist/types/format/useIntl.d.ts.map +1 -1
  73. package/dist/types/format/useList.d.ts +0 -2
  74. package/dist/types/format/useList.d.ts.map +1 -1
  75. package/dist/types/format/useNumber.d.ts +0 -2
  76. package/dist/types/format/useNumber.d.ts.map +1 -1
  77. package/dist/types/format/usePercentage.d.ts +0 -2
  78. package/dist/types/format/usePercentage.d.ts.map +1 -1
  79. package/dist/types/format/useRelativeTime.d.ts +0 -2
  80. package/dist/types/format/useRelativeTime.d.ts.map +1 -1
  81. package/dist/types/format/useUnit.d.ts +0 -2
  82. package/dist/types/format/useUnit.d.ts.map +1 -1
  83. package/dist/types/localeRouting.d.ts +0 -2
  84. package/dist/types/localeRouting.d.ts.map +1 -1
  85. package/dist/types/middleware.d.ts +0 -2
  86. package/dist/types/middleware.d.ts.map +1 -1
  87. package/dist/types/persistLocale.d.ts +0 -2
  88. package/dist/types/persistLocale.d.ts.map +1 -1
  89. package/dist/types/plugins.d.ts +1 -3
  90. package/dist/types/plugins.d.ts.map +1 -1
  91. package/dist/types/requestStorage.d.ts +0 -2
  92. package/dist/types/requestStorage.d.ts.map +1 -1
  93. package/dist/types/useDictionary.d.ts +0 -2
  94. package/dist/types/useDictionary.d.ts.map +1 -1
  95. package/dist/types/useIntlayer.d.ts +0 -2
  96. package/dist/types/useIntlayer.d.ts.map +1 -1
  97. package/dist/types/useLocale.d.ts +0 -2
  98. package/dist/types/useLocale.d.ts.map +1 -1
  99. package/package.json +11 -11
@@ -1,5 +1,3 @@
1
1
  import { relativeTime } from "@intlayer/core/formatters";
2
- //#region src/format/useRelativeTime.d.ts
3
2
  export declare const useRelativeTime: () => (...args: Parameters<typeof relativeTime>) => string;
4
- //#endregion
5
3
  //# sourceMappingURL=useRelativeTime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;qBAOa,2BAAe,MAGT,kBAAkB"}
1
+ {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";qBAGa,2BAAe,MAGT,kBAAkB"}
@@ -1,5 +1,3 @@
1
1
  import { units } from "@intlayer/core/formatters";
2
- //#region src/format/useUnit.d.ts
3
2
  export declare const useUnit: () => (...args: Parameters<typeof units>) => string;
4
- //#endregion
5
3
  //# sourceMappingURL=useUnit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;qBAOa,mBAAO,MAGD,kBAAkB"}
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":";;;;;;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
+ {"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":";;;;YAoBY,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAyD3B,WAAQ,UACV,8BACR;EACD,YAAY;EACZ,OAAO;EACP,iBAAiB"}
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":";;;;;;qBAoCa,qBAAkB,SACpB,SAAO,QACR,UAAM;EACe;;;;;;qBAclB,oBAAiB,UAClB,UAAQ,QACV,WACP"}
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"}
@@ -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/ui` child must be a string, not a wrapper.
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":";;;;;;;;;;;YAsBY,0BAA0B;EACpC;EACA;;YAGU,qBACV,GACA,UAAU,gBAAgB,mBACxB,uBAAyB,GAAG,yBAAyB;;;;;qBAQ5C,aAAU,SACZ,eAAa,uBAErB"}
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":";;;;;;;;;;qBAWa,gBAAc,kBAAA;;;;qBAKd,wBAAuB;;;;qBAMvB,wBAAuB"}
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":";;;;;;;;;;;;;;;;;;;;;;;;;;qBAyCa,sBACL,UAAU,aAAa,gCACvB,UACF,gBACA,2BAA2B,KAAK,iBAAe,YAEvC,GAAC,mBACM,MAClB,qBACD,kCAAkC,GAAG,IACrC,sBAAsB"}
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":";;;;;;;;;;;;;;;;;;;;;;;qBAoCa,oBACL,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,iBAAe,KAExE,GAAC,mBACa,MAClB,qBACD,yBAAyB,GAAG,IAC5B,sBAAsB"}
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":";;YAIY;EACV,QAAQ;EACR,eAAe;EACf,kBAAkB;;;;;;;;;;;;;;;;;qBAoBP,iBAAgB"}
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.6.0",
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.6.0",
103
- "@intlayer/core": "9.6.0",
104
- "@intlayer/engine": "9.6.0",
105
- "@intlayer/types": "9.6.0",
106
- "vanilla-intlayer": "9.6.0"
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.6.0",
110
- "@types/node": "^22",
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.0.0-rc.2",
114
+ "remix": "3.1.0",
115
115
  "rimraf": "6.1.3",
116
- "tsdown": "0.23.0",
116
+ "tsdown": "0.23.4",
117
117
  "typescript": "7.0.2",
118
- "vitest": "5.0.3"
118
+ "vitest": "5.1.0"
119
119
  },
120
120
  "peerDependencies": {
121
121
  "remix": ">=3.0.0"