remix-intlayer 9.5.9-canary.0 → 9.5.10

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.
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_format_useCurrency = require('./useCurrency.cjs');
2
+ const require_format_usePercentage = require('./usePercentage.cjs');
3
3
  const require_format_useUnit = require('./useUnit.cjs');
4
- const require_format_useDate = require('./useDate.cjs');
5
4
  const require_format_useCompact = require('./useCompact.cjs');
5
+ const require_format_useNumber = require('./useNumber.cjs');
6
6
  const require_format_useIntl = require('./useIntl.cjs');
7
7
  const require_format_useList = require('./useList.cjs');
8
- const require_format_useNumber = require('./useNumber.cjs');
9
- const require_format_usePercentage = require('./usePercentage.cjs');
8
+ const require_format_useCurrency = require('./useCurrency.cjs');
9
+ const require_format_useDate = require('./useDate.cjs');
10
10
  const require_format_useRelativeTime = require('./useRelativeTime.cjs');
11
11
 
12
12
  exports.useCompact = require_format_useCompact.useCompact;
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_localeRouting = require('./localeRouting.cjs');
3
2
  const require_context = require('./context.cjs');
3
+ const require_localeRouting = require('./localeRouting.cjs');
4
4
  const require_requestStorage = require('./requestStorage.cjs');
5
- const require_useIntlayer = require('./useIntlayer.cjs');
6
5
  const require_middleware = require('./middleware.cjs');
7
- const require_useDictionary = require('./useDictionary.cjs');
6
+ const require_useIntlayer = require('./useIntlayer.cjs');
8
7
  const require_useLocale = require('./useLocale.cjs');
8
+ const require_useDictionary = require('./useDictionary.cjs');
9
9
 
10
10
  exports.INTLAYER_CONTEXT_PROPERTY = require_context.INTLAYER_CONTEXT_PROPERTY;
11
11
  exports.Intlayer = require_context.Intlayer;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
3
- let _intlayer_core_localization = require("@intlayer/core/localization");
4
2
  let _intlayer_core_utils = require("@intlayer/core/utils");
3
+ let _intlayer_core_localization = require("@intlayer/core/localization");
4
+ let _intlayer_config_defaultValues = require("@intlayer/config/defaultValues");
5
5
 
6
6
  //#region src/localeRouting.ts
7
7
  /** Matches a pathname ending with a file extension (`/logo.svg`). */
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_localeRouting = require('./localeRouting.cjs');
3
2
  const require_context = require('./context.cjs');
4
- const require_requestStorage = require('./requestStorage.cjs');
5
3
  const require_persistLocale = require('./persistLocale.cjs');
6
- let _intlayer_core_localization = require("@intlayer/core/localization");
4
+ const require_localeRouting = require('./localeRouting.cjs');
5
+ const require_requestStorage = require('./requestStorage.cjs');
7
6
  let _intlayer_config_built = require("@intlayer/config/built");
8
7
  let _intlayer_config_node = require("@intlayer/config/node");
8
+ let _intlayer_core_localization = require("@intlayer/core/localization");
9
9
  let _intlayer_engine_build = require("@intlayer/engine/build");
10
10
 
11
11
  //#region src/middleware.ts
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
3
2
  let _intlayer_config_built = require("@intlayer/config/built");
3
+ let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
4
4
  let vanilla_intlayer = require("vanilla-intlayer");
5
5
 
6
6
  //#region src/plugins.ts
@@ -17,7 +17,7 @@ const getPlugins = (locale, fallback = true) => {
17
17
  ...(0, _intlayer_core_interpreter.getBasePlugins)(locale, fallback),
18
18
  vanilla_intlayer.markdownPlugin,
19
19
  vanilla_intlayer.htmlPlugin
20
- ];
20
+ ].filter((plugin) => plugin !== _intlayer_core_interpreter.fallbackPlugin);
21
21
  pluginsCache.set(cacheKey, plugins);
22
22
  return plugins;
23
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.cjs","names":["internationalization","getBasePlugins","markdownPlugin","htmlPlugin"],"sources":["../../src/plugins.ts"],"sourcesContent":["import { internationalization } from '@intlayer/config/built';\nimport {\n type DeepTransformContent as DeepTransformContentCore,\n getBasePlugins,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type Plugins,\n} from '@intlayer/core/interpreter';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { htmlPlugin, markdownPlugin } from 'vanilla-intlayer';\n\n/**\n * Plugins applied by the hooks of this package.\n *\n * The base interpreter leaves `md()` and `html()` nodes untouched, so they are\n * handed to the string renderers of `vanilla-intlayer`: the node exposes the\n * rendered HTML as `.value` and `.use(components)` to override tags. Plain\n * strings stay primitives — a `remix/ui` child must be a string, not a wrapper.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n vanillaMarkdown: true;\n vanillaHtml: true;\n};\n\nexport type DeepTransformContent<\n T,\n L extends LocalesValues = DeclaredLocales,\n> = DeepTransformContentCore<T, IInterpreterPluginState, L>;\n\nconst pluginsCache = new Map<string, Plugins[]>();\n\n/**\n * Returns the plugin array for a locale, memoized so the interpreter's\n * transform cache can key on its identity.\n */\nexport const getPlugins = (\n locale?: LocalesValues,\n fallback = true\n): Plugins[] => {\n const cacheKey = `${locale ?? internationalization.defaultLocale}_${fallback}`;\n\n const cached = pluginsCache.get(cacheKey);\n if (cached) return cached;\n\n const plugins = [\n ...getBasePlugins(locale, fallback),\n markdownPlugin,\n htmlPlugin,\n ];\n\n pluginsCache.set(cacheKey, plugins);\n\n return plugins;\n};\n"],"mappings":";;;;;;AA+BA,MAAM,+BAAe,IAAI,IAAuB;;;;;AAMhD,MAAa,cACX,QACA,WAAW,SACG;CACd,MAAM,WAAW,GAAG,UAAUA,4CAAqB,cAAc,GAAG;CAEpE,MAAM,SAAS,aAAa,IAAI,QAAQ;CACxC,IAAI,QAAQ,OAAO;CAEnB,MAAM,UAAU;EACd,OAAGC,2CAAe,QAAQ,QAAQ;EAClCC;EACAC;CACF;CAEA,aAAa,IAAI,UAAU,OAAO;CAElC,OAAO;AACT"}
1
+ {"version":3,"file":"plugins.cjs","names":["internationalization","getBasePlugins","markdownPlugin","htmlPlugin","fallbackPlugin"],"sources":["../../src/plugins.ts"],"sourcesContent":["import { internationalization } from '@intlayer/config/built';\nimport {\n type DeepTransformContent as DeepTransformContentCore,\n fallbackPlugin,\n getBasePlugins,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type Plugins,\n} from '@intlayer/core/interpreter';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { htmlPlugin, markdownPlugin } from 'vanilla-intlayer';\n\n/**\n * Plugins applied by the hooks of this package.\n *\n * The base interpreter leaves `md()` and `html()` nodes untouched, so they are\n * handed to the string renderers of `vanilla-intlayer`: the node exposes the\n * rendered HTML as `.value` and `.use(components)` to override tags. Plain\n * strings stay primitives — a `remix/ui` child must be a string, not a wrapper.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n vanillaMarkdown: true;\n vanillaHtml: true;\n};\n\nexport type DeepTransformContent<\n T,\n L extends LocalesValues = DeclaredLocales,\n> = DeepTransformContentCore<T, IInterpreterPluginState, L>;\n\nconst pluginsCache = new Map<string, Plugins[]>();\n\n/**\n * Returns the plugin array for a locale, memoized so the interpreter's\n * transform cache can key on its identity.\n */\nexport const getPlugins = (\n locale?: LocalesValues,\n fallback = true\n): Plugins[] => {\n const cacheKey = `${locale ?? internationalization.defaultLocale}_${fallback}`;\n\n const cached = pluginsCache.get(cacheKey);\n if (cached) return cached;\n\n const plugins = [\n ...getBasePlugins(locale, fallback),\n markdownPlugin,\n htmlPlugin,\n ].filter(\n // Plugins disabled at build time never match: skip them on every node\n (plugin) => plugin !== fallbackPlugin\n );\n\n pluginsCache.set(cacheKey, plugins);\n\n return plugins;\n};\n"],"mappings":";;;;;;AAgCA,MAAM,+BAAe,IAAI,IAAuB;;;;;AAMhD,MAAa,cACX,QACA,WAAW,SACG;CACd,MAAM,WAAW,GAAG,UAAUA,4CAAqB,cAAc,GAAG;CAEpE,MAAM,SAAS,aAAa,IAAI,QAAQ;CACxC,IAAI,QAAQ,OAAO;CAEnB,MAAM,UAAU;EACd,OAAGC,2CAAe,QAAQ,QAAQ;EAClCC;EACAC;CACF,CAAC,CAAC,QAEC,WAAW,WAAWC,yCACzB;CAEA,aAAa,IAAI,UAAU,OAAO;CAElC,OAAO;AACT"}
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_plugins = require('./plugins.cjs');
3
2
  const require_requestStorage = require('./requestStorage.cjs');
3
+ const require_plugins = require('./plugins.cjs');
4
4
  let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
5
5
  let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
6
6
 
@@ -28,12 +28,12 @@ let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
28
28
  * ```
29
29
  */
30
30
  const useDictionary = (dictionary, localeOrSelector) => {
31
- const argument = (0, _intlayer_core_dictionaryManipulator.resolveDictionaryArgument)({
31
+ const argument = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? (0, _intlayer_core_dictionaryManipulator.resolveDictionaryArgument)({
32
32
  localeOrSelector,
33
33
  contextLocale: require_requestStorage.getRequestLocale(),
34
34
  dictionaryKey: dictionary.key
35
- });
36
- const { locale } = (0, _intlayer_core_dictionaryManipulator.parseDictionarySelector)(argument);
35
+ }) : localeOrSelector ?? require_requestStorage.getRequestLocale();
36
+ const locale = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? (0, _intlayer_core_dictionaryManipulator.parseDictionarySelector)(argument).locale : argument;
37
37
  return (0, _intlayer_core_interpreter.getDictionary)(dictionary, argument, require_plugins.getPlugins(locale));
38
38
  };
39
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionary.cjs","names":["resolveDictionaryArgument","getRequestLocale","parseDictionarySelector","getDictionary","getPlugins"],"sources":["../../src/useDictionary.ts"],"sourcesContent":["import {\n parseDictionarySelector,\n resolveDictionaryArgument,\n} from '@intlayer/core/dictionaryManipulator';\nimport { getDictionary } from '@intlayer/core/interpreter';\nimport type {\n Dictionary,\n DictionarySelectorForGroup,\n QualifiedDictionaryGroup,\n ResolveQualifiedDictionaryContent,\n} from '@intlayer/types/dictionary';\nimport type {\n DeclaredLocales,\n ExtractSelectorLocale,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { type DeepTransformContent, getPlugins } from './plugins';\nimport { getRequestLocale } from './requestStorage';\n\n/**\n * Transforms an imported dictionary (or qualified dictionary group) and returns\n * its content for the locale of the request being handled.\n *\n * The second argument is either a locale or a selector object\n * (`{ item }`, `{ variant }`, optionally with `locale`); it takes precedence\n * over the request locale.\n *\n * `md()` and `html()` nodes render to HTML strings: read `.value`, or call\n * `.use(components)` to override tags, and inject the result with `html.raw`\n * or `innerHTML`.\n *\n * @example\n * ```ts\n * import homeContent from './home.content';\n *\n * router.get('/', () => {\n * const { title } = useDictionary(homeContent);\n * return new Response(title);\n * });\n * ```\n */\nexport const useDictionary = <\n const T extends Dictionary | QualifiedDictionaryGroup,\n const A extends\n | LocalesValues\n | DictionarySelectorForGroup<T> = DeclaredLocales,\n>(\n dictionary: T,\n localeOrSelector?: A\n): DeepTransformContent<\n ResolveQualifiedDictionaryContent<T, A>,\n ExtractSelectorLocale<A>\n> => {\n const argument = resolveDictionaryArgument({\n localeOrSelector,\n contextLocale: getRequestLocale(),\n dictionaryKey: dictionary.key,\n });\n const { locale } = parseDictionarySelector(argument);\n\n return getDictionary<T, A>(\n dictionary,\n argument as A,\n getPlugins(locale)\n ) as DeepTransformContent<\n ResolveQualifiedDictionaryContent<T, A>,\n ExtractSelectorLocale<A>\n >;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,iBAMX,YACA,qBAIG;CACH,MAAM,eAAWA,gEAA0B;EACzC;EACA,eAAeC,wCAAiB;EAChC,eAAe,WAAW;CAC5B,CAAC;CACD,MAAM,EAAE,eAAWC,8DAAwB,QAAQ;CAEnD,WAAOC,0CACL,YACA,UACAC,2BAAW,MAAM,CACnB;AAIF"}
1
+ {"version":3,"file":"useDictionary.cjs","names":["resolveDictionaryArgument","getRequestLocale","parseDictionarySelector","getDictionary","getPlugins"],"sources":["../../src/useDictionary.ts"],"sourcesContent":["import {\n parseDictionarySelector,\n resolveDictionaryArgument,\n} from '@intlayer/core/dictionaryManipulator';\nimport { getDictionary } from '@intlayer/core/interpreter';\nimport type {\n Dictionary,\n DictionarySelectorForGroup,\n QualifiedDictionaryGroup,\n ResolveQualifiedDictionaryContent,\n} from '@intlayer/types/dictionary';\nimport type {\n DeclaredLocales,\n ExtractSelectorLocale,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { type DeepTransformContent, getPlugins } from './plugins';\nimport { getRequestLocale } from './requestStorage';\n\n/**\n * Transforms an imported dictionary (or qualified dictionary group) and returns\n * its content for the locale of the request being handled.\n *\n * The second argument is either a locale or a selector object\n * (`{ item }`, `{ variant }`, optionally with `locale`); it takes precedence\n * over the request locale.\n *\n * `md()` and `html()` nodes render to HTML strings: read `.value`, or call\n * `.use(components)` to override tags, and inject the result with `html.raw`\n * or `innerHTML`.\n *\n * @example\n * ```ts\n * import homeContent from './home.content';\n *\n * router.get('/', () => {\n * const { title } = useDictionary(homeContent);\n * return new Response(title);\n * });\n * ```\n */\nexport const useDictionary = <\n const T extends Dictionary | QualifiedDictionaryGroup,\n const A extends\n | LocalesValues\n | DictionarySelectorForGroup<T> = DeclaredLocales,\n>(\n dictionary: T,\n localeOrSelector?: A\n): DeepTransformContent<\n ResolveQualifiedDictionaryContent<T, A>,\n ExtractSelectorLocale<A>\n> => {\n // Selectors disabled project-wide (build-time flag) ⇒ the argument can only\n // be a locale, so the selector resolution is dropped by the bundler.\n const argument =\n process.env.INTLAYER_DICTIONARY_SELECTOR !== 'false'\n ? resolveDictionaryArgument({\n localeOrSelector,\n contextLocale: getRequestLocale(),\n dictionaryKey: dictionary.key,\n })\n : (localeOrSelector ?? getRequestLocale());\n const locale =\n process.env.INTLAYER_DICTIONARY_SELECTOR !== 'false'\n ? parseDictionarySelector(argument).locale\n : (argument as LocalesValues | undefined);\n\n return getDictionary<T, A>(\n dictionary,\n argument as A,\n getPlugins(locale)\n ) as DeepTransformContent<\n ResolveQualifiedDictionaryContent<T, A>,\n ExtractSelectorLocale<A>\n >;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,iBAMX,YACA,qBAIG;CAGH,MAAM,WACJ,QAAQ,IAAI,iCAAiC,cACzCA,gEAA0B;EACxB;EACA,eAAeC,wCAAiB;EAChC,eAAe,WAAW;CAC5B,CAAC,IACA,oBAAoBA,wCAAiB;CAC5C,MAAM,SACJ,QAAQ,IAAI,iCAAiC,cACzCC,8DAAwB,QAAQ,CAAC,CAAC,SACjC;CAEP,WAAOC,0CACL,YACA,UACAC,2BAAW,MAAM,CACnB;AAIF"}
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_plugins = require('./plugins.cjs');
3
2
  const require_requestStorage = require('./requestStorage.cjs');
3
+ const require_plugins = require('./plugins.cjs');
4
4
  let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
5
5
  let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
6
6
 
@@ -26,12 +26,12 @@ let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
26
26
  * ```
27
27
  */
28
28
  const useIntlayer = (key, localeOrSelector) => {
29
- const argument = (0, _intlayer_core_dictionaryManipulator.resolveDictionaryArgument)({
29
+ const argument = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? (0, _intlayer_core_dictionaryManipulator.resolveDictionaryArgument)({
30
30
  localeOrSelector,
31
31
  contextLocale: require_requestStorage.getRequestLocale(),
32
32
  dictionaryKey: key
33
- });
34
- const { locale } = (0, _intlayer_core_dictionaryManipulator.parseDictionarySelector)(argument);
33
+ }) : localeOrSelector ?? require_requestStorage.getRequestLocale();
34
+ const locale = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? (0, _intlayer_core_dictionaryManipulator.parseDictionarySelector)(argument).locale : argument;
35
35
  return (0, _intlayer_core_interpreter.getIntlayer)(key, argument, require_plugins.getPlugins(locale));
36
36
  };
37
37
 
@@ -1 +1 @@
1
- {"version":3,"file":"useIntlayer.cjs","names":["resolveDictionaryArgument","getRequestLocale","parseDictionarySelector","getIntlayer","getPlugins"],"sources":["../../src/useIntlayer.ts"],"sourcesContent":["import {\n parseDictionarySelector,\n resolveDictionaryArgument,\n} from '@intlayer/core/dictionaryManipulator';\nimport { getIntlayer } from '@intlayer/core/interpreter';\nimport type {\n DeclaredLocales,\n DictionaryKeys,\n DictionaryRegistryResult,\n DictionarySelectorForKey,\n ExtractSelectorLocale,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { type DeepTransformContent, getPlugins } from './plugins';\nimport { getRequestLocale } from './requestStorage';\n\n/**\n * Picks one dictionary by its key and returns its content for the locale of\n * the request being handled.\n *\n * The second argument is either a locale or a selector object\n * (`{ item }`, `{ variant }`, optionally with `locale`); it takes precedence\n * over the request locale.\n *\n * `md()` and `html()` nodes render to HTML strings: read `.value`, or call\n * `.use(components)` to override tags, and inject the result with `html.raw`\n * or `innerHTML`.\n *\n * @example\n * ```ts\n * router.get('/', () => {\n * const { title } = useIntlayer('home');\n * return new Response(title);\n * });\n * ```\n */\nexport const useIntlayer = <\n const T extends DictionaryKeys,\n const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales,\n>(\n key: T,\n localeOrSelector?: A\n): DeepTransformContent<\n DictionaryRegistryResult<T, A>,\n ExtractSelectorLocale<A>\n> => {\n const argument = resolveDictionaryArgument({\n localeOrSelector,\n contextLocale: getRequestLocale(),\n dictionaryKey: key as string,\n });\n const { locale } = parseDictionarySelector(argument);\n\n return getIntlayer<T, A>(\n key,\n argument as A,\n getPlugins(locale)\n ) as DeepTransformContent<\n DictionaryRegistryResult<T, A>,\n ExtractSelectorLocale<A>\n >;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,eAIX,KACA,qBAIG;CACH,MAAM,eAAWA,gEAA0B;EACzC;EACA,eAAeC,wCAAiB;EAChC,eAAe;CACjB,CAAC;CACD,MAAM,EAAE,eAAWC,8DAAwB,QAAQ;CAEnD,WAAOC,wCACL,KACA,UACAC,2BAAW,MAAM,CACnB;AAIF"}
1
+ {"version":3,"file":"useIntlayer.cjs","names":["resolveDictionaryArgument","getRequestLocale","parseDictionarySelector","getIntlayer","getPlugins"],"sources":["../../src/useIntlayer.ts"],"sourcesContent":["import {\n parseDictionarySelector,\n resolveDictionaryArgument,\n} from '@intlayer/core/dictionaryManipulator';\nimport { getIntlayer } from '@intlayer/core/interpreter';\nimport type {\n DeclaredLocales,\n DictionaryKeys,\n DictionaryRegistryResult,\n DictionarySelectorForKey,\n ExtractSelectorLocale,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { type DeepTransformContent, getPlugins } from './plugins';\nimport { getRequestLocale } from './requestStorage';\n\n/**\n * Picks one dictionary by its key and returns its content for the locale of\n * the request being handled.\n *\n * The second argument is either a locale or a selector object\n * (`{ item }`, `{ variant }`, optionally with `locale`); it takes precedence\n * over the request locale.\n *\n * `md()` and `html()` nodes render to HTML strings: read `.value`, or call\n * `.use(components)` to override tags, and inject the result with `html.raw`\n * or `innerHTML`.\n *\n * @example\n * ```ts\n * router.get('/', () => {\n * const { title } = useIntlayer('home');\n * return new Response(title);\n * });\n * ```\n */\nexport const useIntlayer = <\n const T extends DictionaryKeys,\n const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales,\n>(\n key: T,\n localeOrSelector?: A\n): DeepTransformContent<\n DictionaryRegistryResult<T, A>,\n ExtractSelectorLocale<A>\n> => {\n // Selectors disabled project-wide (build-time flag) ⇒ the argument can only\n // be a locale, so the selector resolution is dropped by the bundler.\n const argument =\n process.env.INTLAYER_DICTIONARY_SELECTOR !== 'false'\n ? resolveDictionaryArgument({\n localeOrSelector,\n contextLocale: getRequestLocale(),\n dictionaryKey: key as string,\n })\n : (localeOrSelector ?? getRequestLocale());\n const locale =\n process.env.INTLAYER_DICTIONARY_SELECTOR !== 'false'\n ? parseDictionarySelector(argument).locale\n : (argument as LocalesValues | undefined);\n\n return getIntlayer<T, A>(\n key,\n argument as A,\n getPlugins(locale)\n ) as DeepTransformContent<\n DictionaryRegistryResult<T, A>,\n ExtractSelectorLocale<A>\n >;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,eAIX,KACA,qBAIG;CAGH,MAAM,WACJ,QAAQ,IAAI,iCAAiC,cACzCA,gEAA0B;EACxB;EACA,eAAeC,wCAAiB;EAChC,eAAe;CACjB,CAAC,IACA,oBAAoBA,wCAAiB;CAC5C,MAAM,SACJ,QAAQ,IAAI,iCAAiC,cACzCC,8DAAwB,QAAQ,CAAC,CAAC,SACjC;CAEP,WAAOC,wCACL,KACA,UACAC,2BAAW,MAAM,CACnB;AAIF"}
@@ -1,11 +1,11 @@
1
- import { useCurrency } from "./useCurrency.mjs";
1
+ import { usePercentage } from "./usePercentage.mjs";
2
2
  import { useUnit } from "./useUnit.mjs";
3
- import { useDate } from "./useDate.mjs";
4
3
  import { useCompact } from "./useCompact.mjs";
4
+ import { useNumber } from "./useNumber.mjs";
5
5
  import { useIntl } from "./useIntl.mjs";
6
6
  import { useList } from "./useList.mjs";
7
- import { useNumber } from "./useNumber.mjs";
8
- import { usePercentage } from "./usePercentage.mjs";
7
+ import { useCurrency } from "./useCurrency.mjs";
8
+ import { useDate } from "./useDate.mjs";
9
9
  import { useRelativeTime } from "./useRelativeTime.mjs";
10
10
 
11
11
  export { useCompact, useCurrency, useDate, useIntl, useList, useNumber, usePercentage, useRelativeTime, useUnit };
@@ -1,9 +1,9 @@
1
- import { createLocaleRouting } from "./localeRouting.mjs";
2
1
  import { INTLAYER_CONTEXT_PROPERTY, Intlayer } from "./context.mjs";
2
+ import { createLocaleRouting } from "./localeRouting.mjs";
3
3
  import { getIntlayerState } from "./requestStorage.mjs";
4
- import { useIntlayer } from "./useIntlayer.mjs";
5
4
  import { intlayer } from "./middleware.mjs";
6
- import { useDictionary } from "./useDictionary.mjs";
5
+ import { useIntlayer } from "./useIntlayer.mjs";
7
6
  import { useLocale } from "./useLocale.mjs";
7
+ import { useDictionary } from "./useDictionary.mjs";
8
8
 
9
9
  export { INTLAYER_CONTEXT_PROPERTY, Intlayer, createLocaleRouting, getIntlayerState, intlayer, useDictionary, useIntlayer, useLocale };
@@ -1,6 +1,6 @@
1
- import { ROUTING_MODE } from "@intlayer/config/defaultValues";
2
- import { getCanonicalPath, getDomainHostname, getDomainOrigin, getLocaleFromDomain, getRewriteRules, isProxyStorageLocaleEnabled, localeDetector, resolveLocalizedPath, resolveProxyMode } from "@intlayer/core/localization";
3
1
  import { getCookie, getLocaleFromStorageServer } from "@intlayer/core/utils";
2
+ import { getCanonicalPath, getDomainHostname, getDomainOrigin, getLocaleFromDomain, getRewriteRules, isProxyStorageLocaleEnabled, localeDetector, resolveLocalizedPath, resolveProxyMode } from "@intlayer/core/localization";
3
+ import { ROUTING_MODE } from "@intlayer/config/defaultValues";
4
4
 
5
5
  //#region src/localeRouting.ts
6
6
  /** Matches a pathname ending with a file extension (`/logo.svg`). */
@@ -1,10 +1,10 @@
1
- import { createLocaleRouting } from "./localeRouting.mjs";
2
1
  import { INTLAYER_CONTEXT_PROPERTY, Intlayer } from "./context.mjs";
3
- import { requestStorage } from "./requestStorage.mjs";
4
2
  import { withLocaleHeaders, writeLocaleHeaders } from "./persistLocale.mjs";
5
- import { getLocaleFromRequest } from "@intlayer/core/localization";
3
+ import { createLocaleRouting } from "./localeRouting.mjs";
4
+ import { requestStorage } from "./requestStorage.mjs";
6
5
  import { internationalization, routing } from "@intlayer/config/built";
7
6
  import { getConfiguration } from "@intlayer/config/node";
7
+ import { getLocaleFromRequest } from "@intlayer/core/localization";
8
8
  import { prepareIntlayer } from "@intlayer/engine/build";
9
9
 
10
10
  //#region src/middleware.ts
@@ -1,5 +1,5 @@
1
- import { getBasePlugins } from "@intlayer/core/interpreter";
2
1
  import { internationalization } from "@intlayer/config/built";
2
+ import { fallbackPlugin, getBasePlugins } from "@intlayer/core/interpreter";
3
3
  import { htmlPlugin, markdownPlugin } from "vanilla-intlayer";
4
4
 
5
5
  //#region src/plugins.ts
@@ -16,7 +16,7 @@ const getPlugins = (locale, fallback = true) => {
16
16
  ...getBasePlugins(locale, fallback),
17
17
  markdownPlugin,
18
18
  htmlPlugin
19
- ];
19
+ ].filter((plugin) => plugin !== fallbackPlugin);
20
20
  pluginsCache.set(cacheKey, plugins);
21
21
  return plugins;
22
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.mjs","names":[],"sources":["../../src/plugins.ts"],"sourcesContent":["import { internationalization } from '@intlayer/config/built';\nimport {\n type DeepTransformContent as DeepTransformContentCore,\n getBasePlugins,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type Plugins,\n} from '@intlayer/core/interpreter';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { htmlPlugin, markdownPlugin } from 'vanilla-intlayer';\n\n/**\n * Plugins applied by the hooks of this package.\n *\n * The base interpreter leaves `md()` and `html()` nodes untouched, so they are\n * handed to the string renderers of `vanilla-intlayer`: the node exposes the\n * rendered HTML as `.value` and `.use(components)` to override tags. Plain\n * strings stay primitives — a `remix/ui` child must be a string, not a wrapper.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n vanillaMarkdown: true;\n vanillaHtml: true;\n};\n\nexport type DeepTransformContent<\n T,\n L extends LocalesValues = DeclaredLocales,\n> = DeepTransformContentCore<T, IInterpreterPluginState, L>;\n\nconst pluginsCache = new Map<string, Plugins[]>();\n\n/**\n * Returns the plugin array for a locale, memoized so the interpreter's\n * transform cache can key on its identity.\n */\nexport const getPlugins = (\n locale?: LocalesValues,\n fallback = true\n): Plugins[] => {\n const cacheKey = `${locale ?? internationalization.defaultLocale}_${fallback}`;\n\n const cached = pluginsCache.get(cacheKey);\n if (cached) return cached;\n\n const plugins = [\n ...getBasePlugins(locale, fallback),\n markdownPlugin,\n htmlPlugin,\n ];\n\n pluginsCache.set(cacheKey, plugins);\n\n return plugins;\n};\n"],"mappings":";;;;;AA+BA,MAAM,+BAAe,IAAI,IAAuB;;;;;AAMhD,MAAa,cACX,QACA,WAAW,SACG;CACd,MAAM,WAAW,GAAG,UAAU,qBAAqB,cAAc,GAAG;CAEpE,MAAM,SAAS,aAAa,IAAI,QAAQ;CACxC,IAAI,QAAQ,OAAO;CAEnB,MAAM,UAAU;EACd,GAAG,eAAe,QAAQ,QAAQ;EAClC;EACA;CACF;CAEA,aAAa,IAAI,UAAU,OAAO;CAElC,OAAO;AACT"}
1
+ {"version":3,"file":"plugins.mjs","names":[],"sources":["../../src/plugins.ts"],"sourcesContent":["import { internationalization } from '@intlayer/config/built';\nimport {\n type DeepTransformContent as DeepTransformContentCore,\n fallbackPlugin,\n getBasePlugins,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type Plugins,\n} from '@intlayer/core/interpreter';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { htmlPlugin, markdownPlugin } from 'vanilla-intlayer';\n\n/**\n * Plugins applied by the hooks of this package.\n *\n * The base interpreter leaves `md()` and `html()` nodes untouched, so they are\n * handed to the string renderers of `vanilla-intlayer`: the node exposes the\n * rendered HTML as `.value` and `.use(components)` to override tags. Plain\n * strings stay primitives — a `remix/ui` child must be a string, not a wrapper.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n vanillaMarkdown: true;\n vanillaHtml: true;\n};\n\nexport type DeepTransformContent<\n T,\n L extends LocalesValues = DeclaredLocales,\n> = DeepTransformContentCore<T, IInterpreterPluginState, L>;\n\nconst pluginsCache = new Map<string, Plugins[]>();\n\n/**\n * Returns the plugin array for a locale, memoized so the interpreter's\n * transform cache can key on its identity.\n */\nexport const getPlugins = (\n locale?: LocalesValues,\n fallback = true\n): Plugins[] => {\n const cacheKey = `${locale ?? internationalization.defaultLocale}_${fallback}`;\n\n const cached = pluginsCache.get(cacheKey);\n if (cached) return cached;\n\n const plugins = [\n ...getBasePlugins(locale, fallback),\n markdownPlugin,\n htmlPlugin,\n ].filter(\n // Plugins disabled at build time never match: skip them on every node\n (plugin) => plugin !== fallbackPlugin\n );\n\n pluginsCache.set(cacheKey, plugins);\n\n return plugins;\n};\n"],"mappings":";;;;;AAgCA,MAAM,+BAAe,IAAI,IAAuB;;;;;AAMhD,MAAa,cACX,QACA,WAAW,SACG;CACd,MAAM,WAAW,GAAG,UAAU,qBAAqB,cAAc,GAAG;CAEpE,MAAM,SAAS,aAAa,IAAI,QAAQ;CACxC,IAAI,QAAQ,OAAO;CAEnB,MAAM,UAAU;EACd,GAAG,eAAe,QAAQ,QAAQ;EAClC;EACA;CACF,CAAC,CAAC,QAEC,WAAW,WAAW,cACzB;CAEA,aAAa,IAAI,UAAU,OAAO;CAElC,OAAO;AACT"}
@@ -1,5 +1,5 @@
1
- import { getPlugins } from "./plugins.mjs";
2
1
  import { getRequestLocale } from "./requestStorage.mjs";
2
+ import { getPlugins } from "./plugins.mjs";
3
3
  import { parseDictionarySelector, resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
4
4
  import { getDictionary } from "@intlayer/core/interpreter";
5
5
 
@@ -27,12 +27,12 @@ import { getDictionary } from "@intlayer/core/interpreter";
27
27
  * ```
28
28
  */
29
29
  const useDictionary = (dictionary, localeOrSelector) => {
30
- const argument = resolveDictionaryArgument({
30
+ const argument = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? resolveDictionaryArgument({
31
31
  localeOrSelector,
32
32
  contextLocale: getRequestLocale(),
33
33
  dictionaryKey: dictionary.key
34
- });
35
- const { locale } = parseDictionarySelector(argument);
34
+ }) : localeOrSelector ?? getRequestLocale();
35
+ const locale = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? parseDictionarySelector(argument).locale : argument;
36
36
  return getDictionary(dictionary, argument, getPlugins(locale));
37
37
  };
38
38
 
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionary.mjs","names":[],"sources":["../../src/useDictionary.ts"],"sourcesContent":["import {\n parseDictionarySelector,\n resolveDictionaryArgument,\n} from '@intlayer/core/dictionaryManipulator';\nimport { getDictionary } from '@intlayer/core/interpreter';\nimport type {\n Dictionary,\n DictionarySelectorForGroup,\n QualifiedDictionaryGroup,\n ResolveQualifiedDictionaryContent,\n} from '@intlayer/types/dictionary';\nimport type {\n DeclaredLocales,\n ExtractSelectorLocale,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { type DeepTransformContent, getPlugins } from './plugins';\nimport { getRequestLocale } from './requestStorage';\n\n/**\n * Transforms an imported dictionary (or qualified dictionary group) and returns\n * its content for the locale of the request being handled.\n *\n * The second argument is either a locale or a selector object\n * (`{ item }`, `{ variant }`, optionally with `locale`); it takes precedence\n * over the request locale.\n *\n * `md()` and `html()` nodes render to HTML strings: read `.value`, or call\n * `.use(components)` to override tags, and inject the result with `html.raw`\n * or `innerHTML`.\n *\n * @example\n * ```ts\n * import homeContent from './home.content';\n *\n * router.get('/', () => {\n * const { title } = useDictionary(homeContent);\n * return new Response(title);\n * });\n * ```\n */\nexport const useDictionary = <\n const T extends Dictionary | QualifiedDictionaryGroup,\n const A extends\n | LocalesValues\n | DictionarySelectorForGroup<T> = DeclaredLocales,\n>(\n dictionary: T,\n localeOrSelector?: A\n): DeepTransformContent<\n ResolveQualifiedDictionaryContent<T, A>,\n ExtractSelectorLocale<A>\n> => {\n const argument = resolveDictionaryArgument({\n localeOrSelector,\n contextLocale: getRequestLocale(),\n dictionaryKey: dictionary.key,\n });\n const { locale } = parseDictionarySelector(argument);\n\n return getDictionary<T, A>(\n dictionary,\n argument as A,\n getPlugins(locale)\n ) as DeepTransformContent<\n ResolveQualifiedDictionaryContent<T, A>,\n ExtractSelectorLocale<A>\n >;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,iBAMX,YACA,qBAIG;CACH,MAAM,WAAW,0BAA0B;EACzC;EACA,eAAe,iBAAiB;EAChC,eAAe,WAAW;CAC5B,CAAC;CACD,MAAM,EAAE,WAAW,wBAAwB,QAAQ;CAEnD,OAAO,cACL,YACA,UACA,WAAW,MAAM,CACnB;AAIF"}
1
+ {"version":3,"file":"useDictionary.mjs","names":[],"sources":["../../src/useDictionary.ts"],"sourcesContent":["import {\n parseDictionarySelector,\n resolveDictionaryArgument,\n} from '@intlayer/core/dictionaryManipulator';\nimport { getDictionary } from '@intlayer/core/interpreter';\nimport type {\n Dictionary,\n DictionarySelectorForGroup,\n QualifiedDictionaryGroup,\n ResolveQualifiedDictionaryContent,\n} from '@intlayer/types/dictionary';\nimport type {\n DeclaredLocales,\n ExtractSelectorLocale,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { type DeepTransformContent, getPlugins } from './plugins';\nimport { getRequestLocale } from './requestStorage';\n\n/**\n * Transforms an imported dictionary (or qualified dictionary group) and returns\n * its content for the locale of the request being handled.\n *\n * The second argument is either a locale or a selector object\n * (`{ item }`, `{ variant }`, optionally with `locale`); it takes precedence\n * over the request locale.\n *\n * `md()` and `html()` nodes render to HTML strings: read `.value`, or call\n * `.use(components)` to override tags, and inject the result with `html.raw`\n * or `innerHTML`.\n *\n * @example\n * ```ts\n * import homeContent from './home.content';\n *\n * router.get('/', () => {\n * const { title } = useDictionary(homeContent);\n * return new Response(title);\n * });\n * ```\n */\nexport const useDictionary = <\n const T extends Dictionary | QualifiedDictionaryGroup,\n const A extends\n | LocalesValues\n | DictionarySelectorForGroup<T> = DeclaredLocales,\n>(\n dictionary: T,\n localeOrSelector?: A\n): DeepTransformContent<\n ResolveQualifiedDictionaryContent<T, A>,\n ExtractSelectorLocale<A>\n> => {\n // Selectors disabled project-wide (build-time flag) ⇒ the argument can only\n // be a locale, so the selector resolution is dropped by the bundler.\n const argument =\n process.env.INTLAYER_DICTIONARY_SELECTOR !== 'false'\n ? resolveDictionaryArgument({\n localeOrSelector,\n contextLocale: getRequestLocale(),\n dictionaryKey: dictionary.key,\n })\n : (localeOrSelector ?? getRequestLocale());\n const locale =\n process.env.INTLAYER_DICTIONARY_SELECTOR !== 'false'\n ? parseDictionarySelector(argument).locale\n : (argument as LocalesValues | undefined);\n\n return getDictionary<T, A>(\n dictionary,\n argument as A,\n getPlugins(locale)\n ) as DeepTransformContent<\n ResolveQualifiedDictionaryContent<T, A>,\n ExtractSelectorLocale<A>\n >;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,iBAMX,YACA,qBAIG;CAGH,MAAM,WACJ,QAAQ,IAAI,iCAAiC,UACzC,0BAA0B;EACxB;EACA,eAAe,iBAAiB;EAChC,eAAe,WAAW;CAC5B,CAAC,IACA,oBAAoB,iBAAiB;CAC5C,MAAM,SACJ,QAAQ,IAAI,iCAAiC,UACzC,wBAAwB,QAAQ,CAAC,CAAC,SACjC;CAEP,OAAO,cACL,YACA,UACA,WAAW,MAAM,CACnB;AAIF"}
@@ -1,5 +1,5 @@
1
- import { getPlugins } from "./plugins.mjs";
2
1
  import { getRequestLocale } from "./requestStorage.mjs";
2
+ import { getPlugins } from "./plugins.mjs";
3
3
  import { parseDictionarySelector, resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
4
4
  import { getIntlayer } from "@intlayer/core/interpreter";
5
5
 
@@ -25,12 +25,12 @@ import { getIntlayer } from "@intlayer/core/interpreter";
25
25
  * ```
26
26
  */
27
27
  const useIntlayer = (key, localeOrSelector) => {
28
- const argument = resolveDictionaryArgument({
28
+ const argument = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? resolveDictionaryArgument({
29
29
  localeOrSelector,
30
30
  contextLocale: getRequestLocale(),
31
31
  dictionaryKey: key
32
- });
33
- const { locale } = parseDictionarySelector(argument);
32
+ }) : localeOrSelector ?? getRequestLocale();
33
+ const locale = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? parseDictionarySelector(argument).locale : argument;
34
34
  return getIntlayer(key, argument, getPlugins(locale));
35
35
  };
36
36
 
@@ -1 +1 @@
1
- {"version":3,"file":"useIntlayer.mjs","names":[],"sources":["../../src/useIntlayer.ts"],"sourcesContent":["import {\n parseDictionarySelector,\n resolveDictionaryArgument,\n} from '@intlayer/core/dictionaryManipulator';\nimport { getIntlayer } from '@intlayer/core/interpreter';\nimport type {\n DeclaredLocales,\n DictionaryKeys,\n DictionaryRegistryResult,\n DictionarySelectorForKey,\n ExtractSelectorLocale,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { type DeepTransformContent, getPlugins } from './plugins';\nimport { getRequestLocale } from './requestStorage';\n\n/**\n * Picks one dictionary by its key and returns its content for the locale of\n * the request being handled.\n *\n * The second argument is either a locale or a selector object\n * (`{ item }`, `{ variant }`, optionally with `locale`); it takes precedence\n * over the request locale.\n *\n * `md()` and `html()` nodes render to HTML strings: read `.value`, or call\n * `.use(components)` to override tags, and inject the result with `html.raw`\n * or `innerHTML`.\n *\n * @example\n * ```ts\n * router.get('/', () => {\n * const { title } = useIntlayer('home');\n * return new Response(title);\n * });\n * ```\n */\nexport const useIntlayer = <\n const T extends DictionaryKeys,\n const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales,\n>(\n key: T,\n localeOrSelector?: A\n): DeepTransformContent<\n DictionaryRegistryResult<T, A>,\n ExtractSelectorLocale<A>\n> => {\n const argument = resolveDictionaryArgument({\n localeOrSelector,\n contextLocale: getRequestLocale(),\n dictionaryKey: key as string,\n });\n const { locale } = parseDictionarySelector(argument);\n\n return getIntlayer<T, A>(\n key,\n argument as A,\n getPlugins(locale)\n ) as DeepTransformContent<\n DictionaryRegistryResult<T, A>,\n ExtractSelectorLocale<A>\n >;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,eAIX,KACA,qBAIG;CACH,MAAM,WAAW,0BAA0B;EACzC;EACA,eAAe,iBAAiB;EAChC,eAAe;CACjB,CAAC;CACD,MAAM,EAAE,WAAW,wBAAwB,QAAQ;CAEnD,OAAO,YACL,KACA,UACA,WAAW,MAAM,CACnB;AAIF"}
1
+ {"version":3,"file":"useIntlayer.mjs","names":[],"sources":["../../src/useIntlayer.ts"],"sourcesContent":["import {\n parseDictionarySelector,\n resolveDictionaryArgument,\n} from '@intlayer/core/dictionaryManipulator';\nimport { getIntlayer } from '@intlayer/core/interpreter';\nimport type {\n DeclaredLocales,\n DictionaryKeys,\n DictionaryRegistryResult,\n DictionarySelectorForKey,\n ExtractSelectorLocale,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { type DeepTransformContent, getPlugins } from './plugins';\nimport { getRequestLocale } from './requestStorage';\n\n/**\n * Picks one dictionary by its key and returns its content for the locale of\n * the request being handled.\n *\n * The second argument is either a locale or a selector object\n * (`{ item }`, `{ variant }`, optionally with `locale`); it takes precedence\n * over the request locale.\n *\n * `md()` and `html()` nodes render to HTML strings: read `.value`, or call\n * `.use(components)` to override tags, and inject the result with `html.raw`\n * or `innerHTML`.\n *\n * @example\n * ```ts\n * router.get('/', () => {\n * const { title } = useIntlayer('home');\n * return new Response(title);\n * });\n * ```\n */\nexport const useIntlayer = <\n const T extends DictionaryKeys,\n const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales,\n>(\n key: T,\n localeOrSelector?: A\n): DeepTransformContent<\n DictionaryRegistryResult<T, A>,\n ExtractSelectorLocale<A>\n> => {\n // Selectors disabled project-wide (build-time flag) ⇒ the argument can only\n // be a locale, so the selector resolution is dropped by the bundler.\n const argument =\n process.env.INTLAYER_DICTIONARY_SELECTOR !== 'false'\n ? resolveDictionaryArgument({\n localeOrSelector,\n contextLocale: getRequestLocale(),\n dictionaryKey: key as string,\n })\n : (localeOrSelector ?? getRequestLocale());\n const locale =\n process.env.INTLAYER_DICTIONARY_SELECTOR !== 'false'\n ? parseDictionarySelector(argument).locale\n : (argument as LocalesValues | undefined);\n\n return getIntlayer<T, A>(\n key,\n argument as A,\n getPlugins(locale)\n ) as DeepTransformContent<\n DictionaryRegistryResult<T, A>,\n ExtractSelectorLocale<A>\n >;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,eAIX,KACA,qBAIG;CAGH,MAAM,WACJ,QAAQ,IAAI,iCAAiC,UACzC,0BAA0B;EACxB;EACA,eAAe,iBAAiB;EAChC,eAAe;CACjB,CAAC,IACA,oBAAoB,iBAAiB;CAC5C,MAAM,SACJ,QAAQ,IAAI,iCAAiC,UACzC,wBAAwB,QAAQ,CAAC,CAAC,SACjC;CAEP,OAAO,YACL,KACA,UACA,WAAW,MAAM,CACnB;AAIF"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.ts"],"mappings":";;;;;;;;;;;YAqBY,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":[],"sources":["../../src/plugins.ts"],"mappings":";;;;;;;;;;;YAsBY,0BAA0B;EACpC;EACA;;YAGU,qBACV,GACA,UAAU,gBAAgB,mBACxB,uBAAyB,GAAG,yBAAyB;;;;;qBAQ5C,aAAU,SACZ,eAAa,uBAErB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remix-intlayer",
3
- "version": "9.5.9-canary.0",
3
+ "version": "9.5.10",
4
4
  "private": false,
5
5
  "description": "Manage internationalization i18n in a simple way for Remix 3 applications.",
6
6
  "keywords": [
@@ -99,14 +99,14 @@
99
99
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
100
100
  },
101
101
  "dependencies": {
102
- "@intlayer/config": "9.5.8",
103
- "@intlayer/core": "9.5.8",
104
- "@intlayer/engine": "9.5.8",
105
- "@intlayer/types": "9.5.8",
106
- "vanilla-intlayer": "9.5.8"
102
+ "@intlayer/config": "9.5.10",
103
+ "@intlayer/core": "9.5.10",
104
+ "@intlayer/engine": "9.5.10",
105
+ "@intlayer/types": "9.5.10",
106
+ "vanilla-intlayer": "9.5.10"
107
107
  },
108
108
  "devDependencies": {
109
- "@intlayer/dictionaries-entry": "9.5.8",
109
+ "@intlayer/dictionaries-entry": "9.5.10",
110
110
  "@types/node": "^22",
111
111
  "@utils/ts-config": "1.0.4",
112
112
  "@utils/ts-config-types": "1.0.4",
@@ -115,7 +115,7 @@
115
115
  "rimraf": "6.1.3",
116
116
  "tsdown": "0.23.0",
117
117
  "typescript": "7.0.2",
118
- "vitest": "5.0.1"
118
+ "vitest": "5.0.2"
119
119
  },
120
120
  "peerDependencies": {
121
121
  "remix": ">=3.0.0-rc.0"