solid-intlayer 9.1.1 → 9.1.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.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useLocaleStorage.cjs");let t=require("solid-js/web"),n=require("@intlayer/config/built"),r=require("solid-js"),i=require("@intlayer/core/localization"),a=require("@intlayer/config/client");var o=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,r.lazy)(()=>Promise.resolve().then(()=>require("../editor/EditorProvider.cjs")).then(e=>({default:e.EditorProvider}))),s=process.env.INTLAYER_ANALYTICS_ENABLED===`false`?null:(0,r.lazy)(()=>Promise.resolve().then(()=>require("../analytics/AnalyticsProvider.cjs")).then(e=>({default:e.AnalyticsProvider}))),c=(0,r.createContext)({locale:()=>e.localeInStorage??n.internationalization?.defaultLocale,setLocale:()=>null}),l=()=>(0,r.useContext)(c)??{},u=o=>{let{defaultLocale:s,locales:l}=n.internationalization??{},[u,d]=(0,r.createSignal)(o.locale??e.localeInStorage??o.defaultLocale??s),f=o.setLocale??(t=>{if(u().toString()!==t.toString()){if(!l?.map(String).includes(t)){console.error(`Locale ${t} is not available`);return}d(t),e.setLocaleInStorage(t,o.isCookieEnabled)}}),p=(0,r.createMemo)(()=>(0,i.localeResolver)(u()));return(0,r.createEffect)((0,r.on)(()=>o.locale,e=>{e&&e!==(0,r.untrack)(u)&&d(e)},{defer:!0})),(0,r.onMount)(()=>{(0,a.setIntlayerIdentifier)()}),(0,t.createComponent)(c.Provider,{value:{locale:p,setLocale:f},get children(){return o.children}})},d=e=>(0,t.createComponent)(u,(0,t.mergeProps)(e,{get children(){return[(0,t.memo)(()=>(0,t.memo)(()=>!!(process.env.INTLAYER_EDITOR_ENABLED!==`false`&&o))()&&(0,t.createComponent)(r.Suspense,{get children(){return(0,t.createComponent)(o,{})}})),(0,t.memo)(()=>(0,t.memo)(()=>!!(process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&s))()&&(0,t.createComponent)(r.Suspense,{get children(){return(0,t.createComponent)(s,{})}})),(0,t.memo)(()=>e.children)]}}));exports.IntlayerClientContext=c,exports.IntlayerProvider=d,exports.IntlayerProviderContent=u,exports.useIntlayerContext=l;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useLocaleStorage.cjs");let t=require("solid-js/web"),n=require("@intlayer/config/built"),r=require("solid-js"),i=require("@intlayer/core/localization"),a=require("@intlayer/config/client");var o=process.env.INTLAYER_EDITOR_ENABLED===`false`?null:(0,r.lazy)(()=>Promise.resolve().then(()=>require("../editor/EditorProvider.cjs")).then(e=>({default:e.EditorProvider}))),s=process.env.INTLAYER_ANALYTICS_ENABLED===`false`?null:(0,r.lazy)(()=>Promise.resolve().then(()=>require("../analytics/AnalyticsProvider.cjs")).then(e=>({default:e.AnalyticsProvider}))),c=(0,r.createContext)({locale:()=>e.localeInStorage??n.internationalization?.defaultLocale,setLocale:()=>null}),l=()=>(0,r.useContext)(c)??{},u=o=>{let{defaultLocale:s,locales:l}=n.internationalization??{},[u,d]=(0,r.createSignal)(o.locale??e.localeInStorage??o.defaultLocale??s),f=o.setLocale??(t=>{if(u().toString()!==t.toString()){if(!l?.map(String).includes(t)){console.error(`Locale ${t} is not available`);return}d(t),e.setLocaleInStorage(t,o.isCookieEnabled)}}),p=(0,r.createMemo)(()=>(0,i.localeResolver)(u()));return(0,r.createEffect)((0,r.on)(()=>o.locale,e=>{e&&e!==(0,r.untrack)(u)&&d(e)},{defer:!0})),(0,r.onMount)(()=>{(0,a.setIntlayerIdentifier)()}),(0,t.createComponent)(c.Provider,{value:{locale:p,setLocale:f,variant:()=>o.variant},get children(){return o.children}})},d=e=>(0,t.createComponent)(u,(0,t.mergeProps)(e,{get children(){return[(0,t.memo)(()=>(0,t.memo)(()=>!!(process.env.INTLAYER_EDITOR_ENABLED!==`false`&&o))()&&(0,t.createComponent)(r.Suspense,{get children(){return(0,t.createComponent)(o,{})}})),(0,t.memo)(()=>(0,t.memo)(()=>!!(process.env.INTLAYER_ANALYTICS_ENABLED!==`false`&&s))()&&(0,t.createComponent)(r.Suspense,{get children(){return(0,t.createComponent)(s,{})}})),(0,t.memo)(()=>e.children)]}}));exports.IntlayerClientContext=c,exports.IntlayerProvider=d,exports.IntlayerProviderContent=u,exports.useIntlayerContext=l;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("./IntlayerProvider.cjs");let n=require("solid-js");var r=(r,i)=>{let a=(0,n.useContext)(t.IntlayerClientContext)??{},o=(0,n.createMemo)(()=>{let t=a?.locale?.();return process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof i==`object`&&i?e.getDictionary(r,{...i,locale:i.locale??t}):e.getDictionary(r,i??t)});return new Proxy(o,{get(e,t){return e()?.[t]},apply(e,t,n){return Reflect.apply(e,t,n)}})};exports.useDictionary=r;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("./IntlayerProvider.cjs");let n=require("solid-js"),r=require("@intlayer/core/dictionaryManipulator");var i=(i,a)=>{let o=(0,n.useContext)(t.IntlayerClientContext)??{},s=(0,n.createMemo)(()=>{let t=o?.locale?.();return process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?e.getDictionary(i,a??t):e.getDictionary(i,(0,r.resolveDictionaryArgument)({localeOrSelector:a,contextLocale:t,contextVariant:o?.variant?.(),dictionaryKey:i.key}))});return new Proxy(s,{get(e,t){return e()?.[t]},apply(e,t,n){return Reflect.apply(e,t,n)}})};exports.useDictionary=i;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("./IntlayerProvider.cjs"),n=require("./useDictionary.cjs"),r=require("./useLoadDynamic.cjs");let i=require("@intlayer/config/built"),a=require("solid-js"),o=require("@intlayer/core/dictionaryManipulator");var s=(s,c,l)=>{let{locale:u}=(0,a.useContext)(t.IntlayerClientContext)??{},d=i.internationalization.defaultLocale,f=String(c);if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,o.isQualifiedDynamicLoaderMap)(s)){let{locale:t,selector:i}=(0,o.parseDictionarySelector)(l),c=(0,o.getDictionarySelectorCacheKey)(i),p=s[o.QUALIFIER_DYNAMIC_TYPES_KEY].includes(`item`)&&i?.item===void 0,m=()=>t??u?.()??d;if(!p)return n.useDictionary(r.useLoadDynamic(()=>{let e=m();return{cacheKey:`${f}.${e}.${c}`,locale:e}},({locale:e})=>(0,o.resolveQualifiedDynamicContentAsync)({loaderMap:s,key:f,locale:e,selector:i,transform:e=>e}).then(e=>Array.isArray(e)?e[0]:e)),t);let[h]=(0,a.createResource)(m,e=>(0,o.resolveQualifiedDynamicContentAsync)({loaderMap:s,key:f,locale:e,selector:i,transform:e=>e})),g=(0,a.createMemo)(()=>{let t=h(),n=m();return Array.isArray(t)?t.map(t=>e.getDictionary(t,n)):[]});return(0,a.createRenderEffect)(()=>{h()}),new Proxy(g,{get(e,t){return e()?.[t]},apply(e){return e()}})}let p=s,m=l,h=()=>m??u?.()??d;return n.useDictionary(r.useLoadDynamic(()=>{let e=h();return{cacheKey:`${f}.${e}`,locale:e}},({locale:e})=>{let t=p[e];return t?t():Promise.reject(Error(`No dynamic dictionary loader found for key "${f}" and locale "${e}".`))}),m)};exports.useDictionaryDynamic=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("./IntlayerProvider.cjs"),n=require("./useDictionary.cjs"),r=require("./useLoadDynamic.cjs");let i=require("@intlayer/config/built"),a=require("solid-js"),o=require("@intlayer/core/dictionaryManipulator");var s=(s,c,l)=>{let u=(0,a.useContext)(t.IntlayerClientContext)??{},{locale:d}=u,f=i.internationalization.defaultLocale,p=String(c);if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,o.isQualifiedDynamicLoaderMap)(s)){let{locale:t,selector:i}=(0,o.parseDictionarySelector)(l),c=()=>(0,o.parseDictionarySelector)((0,o.resolveDictionaryArgument)({localeOrSelector:l,contextLocale:d?.(),contextVariant:u.variant?.(),dictionaryKey:p})).selector,m=s[o.QUALIFIER_DYNAMIC_TYPES_KEY].includes(`item`)&&i?.item===void 0,h=()=>t??d?.()??f;if(!m)return n.useDictionary(r.useLoadDynamic(()=>{let e=h();return{cacheKey:`${p}.${e}.${(0,o.getDictionarySelectorCacheKey)(c())}`,locale:e}},({locale:e})=>(0,o.resolveQualifiedDynamicContentAsync)({loaderMap:s,key:p,locale:e,selector:c(),transform:e=>e}).then(e=>Array.isArray(e)?e[0]:e)),t);let[g]=(0,a.createResource)(()=>({locale:h(),selector:c()}),({locale:e,selector:t})=>(0,o.resolveQualifiedDynamicContentAsync)({loaderMap:s,key:p,locale:e,selector:t,transform:e=>e})),_=(0,a.createMemo)(()=>{let t=g(),n=h();return Array.isArray(t)?t.map(t=>e.getDictionary(t,n)):[]});return(0,a.createRenderEffect)(()=>{g()}),new Proxy(_,{get(e,t){return e()?.[t]},apply(e){return e()}})}let m=s,h=l,g=()=>h??d?.()??f;return n.useDictionary(r.useLoadDynamic(()=>{let e=g();return{cacheKey:`${p}.${e}`,locale:e}},({locale:e})=>{let t=m[e];return t?t():Promise.reject(Error(`No dynamic dictionary loader found for key "${p}" and locale "${e}".`))}),h)};exports.useDictionaryDynamic=s;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getIntlayer.cjs"),t=require("./IntlayerProvider.cjs");let n=require("solid-js");var r=(r,i)=>{let a=(0,n.useContext)(t.IntlayerClientContext)??{},o=(0,n.createMemo)(()=>{let t=a?.locale?.();return process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&typeof i==`object`&&i?e.getIntlayer(r,{...i,locale:i.locale??t}):e.getIntlayer(r,i??t)});return new Proxy(o,{get(e,t){return e()?.[t]},apply(e,t,n){return Reflect.apply(e,t,n)}})};exports.useIntlayer=r;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getIntlayer.cjs"),t=require("./IntlayerProvider.cjs");let n=require("solid-js"),r=require("@intlayer/core/dictionaryManipulator");var i=(i,a)=>{let o=(0,n.useContext)(t.IntlayerClientContext)??{},s=(0,n.createMemo)(()=>{let t=o?.locale?.();return process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?e.getIntlayer(i,a??t):e.getIntlayer(i,(0,r.resolveDictionaryArgument)({localeOrSelector:a,contextLocale:t,contextVariant:o?.variant?.(),dictionaryKey:i}))});return new Proxy(s,{get(e,t){return e()?.[t]},apply(e,t,n){return Reflect.apply(e,t,n)}})};exports.useIntlayer=i;
@@ -25,7 +25,8 @@ var v = process.env.INTLAYER_EDITOR_ENABLED === "false" ? null : d(() => import(
25
25
  }), n(b.Provider, {
26
26
  value: {
27
27
  locale: v,
28
- setLocale: h
28
+ setLocale: h,
29
+ variant: () => r.variant
29
30
  },
30
31
  get children() {
31
32
  return r.children;
@@ -1,16 +1,19 @@
1
1
  import { getDictionary as e } from "../getDictionary.mjs";
2
2
  import { IntlayerClientContext as t } from "./IntlayerProvider.mjs";
3
3
  import { createMemo as n, useContext as r } from "solid-js";
4
+ import { resolveDictionaryArgument as i } from "@intlayer/core/dictionaryManipulator";
4
5
  //#region src/client/useDictionary.ts
5
- var i = (i, a) => {
6
- let o = r(t) ?? {}, s = n(() => {
7
- let t = o?.locale?.();
8
- return process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && typeof a == "object" && a ? e(i, {
9
- ...a,
10
- locale: a.locale ?? t
11
- }) : e(i, a ?? t);
6
+ var a = (a, o) => {
7
+ let s = r(t) ?? {}, c = n(() => {
8
+ let t = s?.locale?.();
9
+ return process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? e(a, o ?? t) : e(a, i({
10
+ localeOrSelector: o,
11
+ contextLocale: t,
12
+ contextVariant: s?.variant?.(),
13
+ dictionaryKey: a.key
14
+ }));
12
15
  });
13
- return new Proxy(s, {
16
+ return new Proxy(c, {
14
17
  get(e, t) {
15
18
  return e()?.[t];
16
19
  },
@@ -20,4 +23,4 @@ var i = (i, a) => {
20
23
  });
21
24
  };
22
25
  //#endregion
23
- export { i as useDictionary };
26
+ export { a as useDictionary };
@@ -4,38 +4,46 @@ import { useDictionary as n } from "./useDictionary.mjs";
4
4
  import { useLoadDynamic as r } from "./useLoadDynamic.mjs";
5
5
  import { internationalization as i } from "@intlayer/config/built";
6
6
  import { createMemo as a, createRenderEffect as o, createResource as s, useContext as c } from "solid-js";
7
- import { QUALIFIER_DYNAMIC_TYPES_KEY as l, getDictionarySelectorCacheKey as u, isQualifiedDynamicLoaderMap as d, parseDictionarySelector as f, resolveQualifiedDynamicContentAsync as p } from "@intlayer/core/dictionaryManipulator";
7
+ import { QUALIFIER_DYNAMIC_TYPES_KEY as l, getDictionarySelectorCacheKey as u, isQualifiedDynamicLoaderMap as d, parseDictionarySelector as f, resolveDictionaryArgument as p, resolveQualifiedDynamicContentAsync as m } from "@intlayer/core/dictionaryManipulator";
8
8
  //#region src/client/useDictionaryDynamic.ts
9
- var m = (m, h, g) => {
10
- let { locale: _ } = c(t) ?? {}, v = i.defaultLocale, y = String(h);
11
- if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && d(m)) {
12
- let { locale: t, selector: i } = f(g), c = u(i), d = m[l].includes("item") && i?.item === void 0, h = () => t ?? _?.() ?? v;
9
+ var h = (h, g, _) => {
10
+ let v = c(t) ?? {}, { locale: y } = v, b = i.defaultLocale, x = String(g);
11
+ if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && d(h)) {
12
+ let { locale: t, selector: i } = f(_), c = () => f(p({
13
+ localeOrSelector: _,
14
+ contextLocale: y?.(),
15
+ contextVariant: v.variant?.(),
16
+ dictionaryKey: x
17
+ })).selector, d = h[l].includes("item") && i?.item === void 0, g = () => t ?? y?.() ?? b;
13
18
  if (!d) return n(r(() => {
14
- let e = h();
19
+ let e = g();
15
20
  return {
16
- cacheKey: `${y}.${e}.${c}`,
21
+ cacheKey: `${x}.${e}.${u(c())}`,
17
22
  locale: e
18
23
  };
19
- }, ({ locale: e }) => p({
20
- loaderMap: m,
21
- key: y,
24
+ }, ({ locale: e }) => m({
25
+ loaderMap: h,
26
+ key: x,
22
27
  locale: e,
23
- selector: i,
28
+ selector: c(),
24
29
  transform: (e) => e
25
30
  }).then((e) => Array.isArray(e) ? e[0] : e)), t);
26
- let [b] = s(h, (e) => p({
27
- loaderMap: m,
28
- key: y,
31
+ let [S] = s(() => ({
32
+ locale: g(),
33
+ selector: c()
34
+ }), ({ locale: e, selector: t }) => m({
35
+ loaderMap: h,
36
+ key: x,
29
37
  locale: e,
30
- selector: i,
38
+ selector: t,
31
39
  transform: (e) => e
32
- })), x = a(() => {
33
- let t = b(), n = h();
40
+ })), C = a(() => {
41
+ let t = S(), n = g();
34
42
  return Array.isArray(t) ? t.map((t) => e(t, n)) : [];
35
43
  });
36
44
  return o(() => {
37
- b();
38
- }), new Proxy(x, {
45
+ S();
46
+ }), new Proxy(C, {
39
47
  get(e, t) {
40
48
  return e()?.[t];
41
49
  },
@@ -44,17 +52,17 @@ var m = (m, h, g) => {
44
52
  }
45
53
  });
46
54
  }
47
- let b = m, x = g, S = () => x ?? _?.() ?? v;
55
+ let S = h, C = _, w = () => C ?? y?.() ?? b;
48
56
  return n(r(() => {
49
- let e = S();
57
+ let e = w();
50
58
  return {
51
- cacheKey: `${y}.${e}`,
59
+ cacheKey: `${x}.${e}`,
52
60
  locale: e
53
61
  };
54
62
  }, ({ locale: e }) => {
55
- let t = b[e];
56
- return t ? t() : Promise.reject(/* @__PURE__ */ Error(`No dynamic dictionary loader found for key "${y}" and locale "${e}".`));
57
- }), x);
63
+ let t = S[e];
64
+ return t ? t() : Promise.reject(/* @__PURE__ */ Error(`No dynamic dictionary loader found for key "${x}" and locale "${e}".`));
65
+ }), C);
58
66
  };
59
67
  //#endregion
60
- export { m as useDictionaryDynamic };
68
+ export { h as useDictionaryDynamic };
@@ -1,16 +1,19 @@
1
1
  import { getIntlayer as e } from "../getIntlayer.mjs";
2
2
  import { IntlayerClientContext as t } from "./IntlayerProvider.mjs";
3
3
  import { createMemo as n, useContext as r } from "solid-js";
4
+ import { resolveDictionaryArgument as i } from "@intlayer/core/dictionaryManipulator";
4
5
  //#region src/client/useIntlayer.ts
5
- var i = (i, a) => {
6
- let o = r(t) ?? {}, s = n(() => {
7
- let t = o?.locale?.();
8
- return process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && typeof a == "object" && a ? e(i, {
9
- ...a,
10
- locale: a.locale ?? t
11
- }) : e(i, a ?? t);
6
+ var a = (a, o) => {
7
+ let s = r(t) ?? {}, c = n(() => {
8
+ let t = s?.locale?.();
9
+ return process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? e(a, o ?? t) : e(a, i({
10
+ localeOrSelector: o,
11
+ contextLocale: t,
12
+ contextVariant: s?.variant?.(),
13
+ dictionaryKey: a
14
+ }));
12
15
  });
13
- return new Proxy(s, {
16
+ return new Proxy(c, {
14
17
  get(e, t) {
15
18
  return e()?.[t];
16
19
  },
@@ -20,4 +23,4 @@ var i = (i, a) => {
20
23
  });
21
24
  };
22
25
  //#endregion
23
- export { i as useIntlayer };
26
+ export { a as useIntlayer };
@@ -1,8 +1,14 @@
1
- import { LocalesValues } from '@intlayer/types/module_augmentation';
1
+ import { LocalesValues, ProviderVariant } from '@intlayer/types/module_augmentation';
2
2
  import { Component, ParentProps } from 'solid-js';
3
- type IntlayerValue = {
3
+ export type IntlayerValue = {
4
4
  locale: () => LocalesValues;
5
5
  setLocale: (newLocale: LocalesValues) => void;
6
+ /**
7
+ * Ambient variant applied to every dictionary read below the provider, the
8
+ * same way `locale` is. Read through an accessor so a variant changing at
9
+ * runtime re-runs the memos that depend on it.
10
+ */
11
+ variant?: () => ProviderVariant | undefined;
6
12
  disableEditor?: boolean;
7
13
  isCookieEnabled?: boolean;
8
14
  };
@@ -17,6 +23,24 @@ export declare const useIntlayerContext: () => IntlayerValue;
17
23
  export type IntlayerProviderProps = ParentProps<{
18
24
  locale?: LocalesValues;
19
25
  defaultLocale?: LocalesValues;
26
+ /**
27
+ * Ambient variant applied to every dictionary read below this provider — for
28
+ * a dimension that is fixed for the whole session (tenant, school type, plan
29
+ * tier…) and that therefore no component should have to pass by hand.
30
+ *
31
+ * Accepts three forms:
32
+ * - `variant="school1"` — one named variant for every key
33
+ * - `variant={['school1', 'default']}` — an ordered preference chain: the
34
+ * first variant the key actually declares wins
35
+ * - `variant={{ key1: 'school1', default: 'base' }}` — per dictionary key,
36
+ * with `default` covering every key not listed
37
+ *
38
+ * A plain object is always read as the per-key map. To pin a structured
39
+ * variant globally, nest it: `variant={{ default: { id: 'prod_abc' } }}`.
40
+ *
41
+ * A call-site selector always wins.
42
+ */
43
+ variant?: ProviderVariant;
20
44
  setLocale?: (locale: LocalesValues) => void;
21
45
  isCookieEnabled?: boolean;
22
46
  }>;
@@ -45,4 +69,3 @@ export declare const IntlayerProviderContent: Component<IntlayerProviderProps>;
45
69
  * ```
46
70
  */
47
71
  export declare const IntlayerProvider: Component<IntlayerProviderProps>;
48
- export {};
@@ -1,5 +1,5 @@
1
1
  import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from '@intlayer/types/dictionary';
2
- import { DeclaredLocales, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
2
+ import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
3
3
  import { DeepTransformContent } from '../plugins';
4
4
  /**
5
5
  * On the client side, Hook that transforms a dictionary (or qualified
@@ -11,4 +11,4 @@ import { DeepTransformContent } from '../plugins';
11
11
  * If the locale is not provided (directly or through the selector), it will
12
12
  * use the locale from the client context.
13
13
  */
14
- export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends DeclaredLocales | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
14
+ 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>>;
@@ -1,6 +1,6 @@
1
1
  import { QualifiedDynamicLoaderMap } from '@intlayer/core/dictionaryManipulator';
2
2
  import { Dictionary } from '@intlayer/types/dictionary';
3
- import { DeclaredLocales, DictionaryKeys, DictionarySelectorForKey, StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
3
+ import { DeclaredLocales, DictionaryKeys, DictionarySelectorForKey, LocalesValues, StrictModeLocaleMap } from '@intlayer/types/module_augmentation';
4
4
  import { DeepTransformContent } from '../plugins';
5
5
  /**
6
6
  * On the client side, Hook that lazily loads a dictionary and returns its
@@ -14,4 +14,4 @@ import { DeepTransformContent } from '../plugins';
14
14
  * If the locale is not provided (directly or through the selector), it will
15
15
  * use the locale from the client context.
16
16
  */
17
- export declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends DeclaredLocales | DictionarySelectorForKey<K> = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: A) => DeepTransformContent<T["content"]> | import('@intlayer/core/interpreter').DeepTransformContent<import('@intlayer/types').ResolveQualifiedDictionaryContent<T, (string & {}) | "tr" | "th" | "hr" | "mi" | "mn" | "ms" | "is" | "id" | "af" | "af-ZA" | "sq" | "sq-AL" | "am" | "am-ET" | "ar" | "ar-DZ" | "ar-BH" | "ar-TD" | "ar-KM" | "ar-DJ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MR" | "ar-MA" | "ar-OM" | "ar-PS" | "ar-QA" | "ar-SA" | "ar-SO" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-AE" | "ar-YE" | "hy" | "hy-AM" | "az" | "az-AZ" | "eu" | "eu-ES" | "be" | "be-BY" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "bs" | "bs-BA" | "bg" | "bg-BG" | "my" | "my-MM" | "ca" | "ca-ES" | "zh" | "zh-HK" | "zh-MO" | "zh-Hans" | "zh-CN" | "zh-SG" | "zh-TW" | "zh-Hant" | "hr-BA" | "hr-HR" | "cs" | "cs-CZ" | "da" | "da-DK" | "dv" | "dv-MV" | "nl" | "nl-BE" | "nl-NL" | "en" | "en-AU" | "en-BZ" | "en-BW" | "en-CA" | "en-CB" | "en-GH" | "en-HK" | "en-IN" | "en-IE" | "en-JM" | "en-KE" | "en-MY" | "en-NZ" | "en-NG" | "en-PK" | "en-PH" | "en-SG" | "en-ZA" | "en-TZ" | "en-TT" | "en-UG" | "en-GB" | "en-US" | "en-ZW" | "eo" | "et" | "et-EE" | "fo" | "fo-FO" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fr" | "fr-BE" | "fr-CA" | "fr-FR" | "fr-LU" | "fr-MC" | "fr-CH" | "mk" | "mk-MK" | "gl" | "gl-ES" | "ka" | "ka-GE" | "de" | "de-AT" | "de-DE" | "de-LI" | "de-LU" | "de-CH" | "el" | "el-GR" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hu" | "hu-HU" | "is-IS" | "id-ID" | "ga" | "ga-IE" | "it" | "it-IT" | "it-CH" | "ja" | "ja-JP" | "kn" | "kn-IN" | "kk" | "kk-KZ" | "km" | "km-KH" | "kok" | "kok-IN" | "ko" | "ko-KR" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lo" | "lo-LA" | "lv" | "lv-LV" | "lt" | "lt-LT" | "dsb" | "dsb-DE" | "mg-MG" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi-NZ" | "mr" | "mr-IN" | "mn-MN" | "ne" | "ne-NP" | "ns" | "ns-ZA" | "no" | "nb" | "nb-NO" | "nn" | "nn-NO" | "ps" | "ps-AR" | "pl" | "pl-PL" | "pt" | "pt-BR" | "pt-CV" | "pt-GW" | "pt-MO" | "pt-MZ" | "pt-PT" | "pt-ST" | "pt-TL" | "pa" | "pa-IN" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-MD" | "ro-RO" | "rm" | "rm-CH" | "ru" | "ru-MD" | "ru-RU" | "se" | "se-FI" | "se-NO" | "se-SE" | "sa" | "sa-IN" | "gd" | "gd-GB" | "sr-Cyrl" | "sr-BA" | "sr-RS" | "sr" | "sr-SP" | "si" | "si-LK" | "sk" | "sk-SK" | "sl" | "sl-SI" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-SV" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PY" | "es-PE" | "es-PR" | "es-ES" | "es-US" | "es-UY" | "es-VE" | "sw" | "sw-KE" | "sv" | "sv-FI" | "sv-SE" | "syr" | "syr-SY" | "tl" | "tl-PH" | "ta" | "ta-IN" | "tt" | "tt-RU" | "te" | "te-IN" | "th-TH" | "ts" | "tn" | "tn-ZA" | "tr-TR" | "uk" | "uk-UA" | "hsb" | "hsb-DE" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "ve" | "ve-ZA" | "vi" | "vi-VN" | "cy" | "cy-GB" | "xh" | "xh-ZA" | "yi" | "yi-001" | "yo" | "yo-NG" | "zu" | "zu-ZA">, import('../plugins').IInterpreterPluginState, (string & {}) | "tr" | "th" | "hr" | "mi" | "mn" | "ms" | "is" | "id" | "af" | "af-ZA" | "sq" | "sq-AL" | "am" | "am-ET" | "ar" | "ar-DZ" | "ar-BH" | "ar-TD" | "ar-KM" | "ar-DJ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MR" | "ar-MA" | "ar-OM" | "ar-PS" | "ar-QA" | "ar-SA" | "ar-SO" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-AE" | "ar-YE" | "hy" | "hy-AM" | "az" | "az-AZ" | "eu" | "eu-ES" | "be" | "be-BY" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "bs" | "bs-BA" | "bg" | "bg-BG" | "my" | "my-MM" | "ca" | "ca-ES" | "zh" | "zh-HK" | "zh-MO" | "zh-Hans" | "zh-CN" | "zh-SG" | "zh-TW" | "zh-Hant" | "hr-BA" | "hr-HR" | "cs" | "cs-CZ" | "da" | "da-DK" | "dv" | "dv-MV" | "nl" | "nl-BE" | "nl-NL" | "en" | "en-AU" | "en-BZ" | "en-BW" | "en-CA" | "en-CB" | "en-GH" | "en-HK" | "en-IN" | "en-IE" | "en-JM" | "en-KE" | "en-MY" | "en-NZ" | "en-NG" | "en-PK" | "en-PH" | "en-SG" | "en-ZA" | "en-TZ" | "en-TT" | "en-UG" | "en-GB" | "en-US" | "en-ZW" | "eo" | "et" | "et-EE" | "fo" | "fo-FO" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fr" | "fr-BE" | "fr-CA" | "fr-FR" | "fr-LU" | "fr-MC" | "fr-CH" | "mk" | "mk-MK" | "gl" | "gl-ES" | "ka" | "ka-GE" | "de" | "de-AT" | "de-DE" | "de-LI" | "de-LU" | "de-CH" | "el" | "el-GR" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hu" | "hu-HU" | "is-IS" | "id-ID" | "ga" | "ga-IE" | "it" | "it-IT" | "it-CH" | "ja" | "ja-JP" | "kn" | "kn-IN" | "kk" | "kk-KZ" | "km" | "km-KH" | "kok" | "kok-IN" | "ko" | "ko-KR" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lo" | "lo-LA" | "lv" | "lv-LV" | "lt" | "lt-LT" | "dsb" | "dsb-DE" | "mg-MG" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi-NZ" | "mr" | "mr-IN" | "mn-MN" | "ne" | "ne-NP" | "ns" | "ns-ZA" | "no" | "nb" | "nb-NO" | "nn" | "nn-NO" | "ps" | "ps-AR" | "pl" | "pl-PL" | "pt" | "pt-BR" | "pt-CV" | "pt-GW" | "pt-MO" | "pt-MZ" | "pt-PT" | "pt-ST" | "pt-TL" | "pa" | "pa-IN" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-MD" | "ro-RO" | "rm" | "rm-CH" | "ru" | "ru-MD" | "ru-RU" | "se" | "se-FI" | "se-NO" | "se-SE" | "sa" | "sa-IN" | "gd" | "gd-GB" | "sr-Cyrl" | "sr-BA" | "sr-RS" | "sr" | "sr-SP" | "si" | "si-LK" | "sk" | "sk-SK" | "sl" | "sl-SI" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-SV" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PY" | "es-PE" | "es-PR" | "es-ES" | "es-US" | "es-UY" | "es-VE" | "sw" | "sw-KE" | "sv" | "sv-FI" | "sv-SE" | "syr" | "syr-SY" | "tl" | "tl-PH" | "ta" | "ta-IN" | "tt" | "tt-RU" | "te" | "te-IN" | "th-TH" | "ts" | "tn" | "tn-ZA" | "tr-TR" | "uk" | "uk-UA" | "hsb" | "hsb-DE" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "ve" | "ve-ZA" | "vi" | "vi-VN" | "cy" | "cy-GB" | "xh" | "xh-ZA" | "yi" | "yi-001" | "yo" | "yo-NG" | "zu" | "zu-ZA">;
17
+ export declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<K> = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: A) => DeepTransformContent<T["content"]> | import('@intlayer/core/interpreter').DeepTransformContent<import('@intlayer/types').ResolveQualifiedDictionaryContent<T, (string & {}) | "tr" | "th" | "hr" | "mi" | "mn" | "ms" | "is" | "id" | "af" | "af-ZA" | "sq" | "sq-AL" | "am" | "am-ET" | "ar" | "ar-DZ" | "ar-BH" | "ar-TD" | "ar-KM" | "ar-DJ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MR" | "ar-MA" | "ar-OM" | "ar-PS" | "ar-QA" | "ar-SA" | "ar-SO" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-AE" | "ar-YE" | "hy" | "hy-AM" | "az" | "az-AZ" | "eu" | "eu-ES" | "be" | "be-BY" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "bs" | "bs-BA" | "bg" | "bg-BG" | "my" | "my-MM" | "ca" | "ca-ES" | "zh" | "zh-HK" | "zh-MO" | "zh-Hans" | "zh-CN" | "zh-SG" | "zh-TW" | "zh-Hant" | "hr-BA" | "hr-HR" | "cs" | "cs-CZ" | "da" | "da-DK" | "dv" | "dv-MV" | "nl" | "nl-BE" | "nl-NL" | "en" | "en-AU" | "en-BZ" | "en-BW" | "en-CA" | "en-CB" | "en-GH" | "en-HK" | "en-IN" | "en-IE" | "en-JM" | "en-KE" | "en-MY" | "en-NZ" | "en-NG" | "en-PK" | "en-PH" | "en-SG" | "en-ZA" | "en-TZ" | "en-TT" | "en-UG" | "en-GB" | "en-US" | "en-ZW" | "eo" | "et" | "et-EE" | "fo" | "fo-FO" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fr" | "fr-BE" | "fr-CA" | "fr-FR" | "fr-LU" | "fr-MC" | "fr-CH" | "mk" | "mk-MK" | "gl" | "gl-ES" | "ka" | "ka-GE" | "de" | "de-AT" | "de-DE" | "de-LI" | "de-LU" | "de-CH" | "el" | "el-GR" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hu" | "hu-HU" | "is-IS" | "id-ID" | "ga" | "ga-IE" | "it" | "it-IT" | "it-CH" | "ja" | "ja-JP" | "kn" | "kn-IN" | "kk" | "kk-KZ" | "km" | "km-KH" | "kok" | "kok-IN" | "ko" | "ko-KR" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lo" | "lo-LA" | "lv" | "lv-LV" | "lt" | "lt-LT" | "dsb" | "dsb-DE" | "mg-MG" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi-NZ" | "mr" | "mr-IN" | "mn-MN" | "ne" | "ne-NP" | "ns" | "ns-ZA" | "no" | "nb" | "nb-NO" | "nn" | "nn-NO" | "ps" | "ps-AR" | "pl" | "pl-PL" | "pt" | "pt-BR" | "pt-CV" | "pt-GW" | "pt-MO" | "pt-MZ" | "pt-PT" | "pt-ST" | "pt-TL" | "pa" | "pa-IN" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-MD" | "ro-RO" | "rm" | "rm-CH" | "ru" | "ru-MD" | "ru-RU" | "se" | "se-FI" | "se-NO" | "se-SE" | "sa" | "sa-IN" | "gd" | "gd-GB" | "sr-Cyrl" | "sr-BA" | "sr-RS" | "sr" | "sr-SP" | "si" | "si-LK" | "sk" | "sk-SK" | "sl" | "sl-SI" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-SV" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PY" | "es-PE" | "es-PR" | "es-ES" | "es-US" | "es-UY" | "es-VE" | "sw" | "sw-KE" | "sv" | "sv-FI" | "sv-SE" | "syr" | "syr-SY" | "tl" | "tl-PH" | "ta" | "ta-IN" | "tt" | "tt-RU" | "te" | "te-IN" | "th-TH" | "ts" | "tn" | "tn-ZA" | "tr-TR" | "uk" | "uk-UA" | "hsb" | "hsb-DE" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "ve" | "ve-ZA" | "vi" | "vi-VN" | "cy" | "cy-GB" | "xh" | "xh-ZA" | "yi" | "yi-001" | "yo" | "yo-NG" | "zu" | "zu-ZA">, import('../plugins').IInterpreterPluginState, (string & {}) | "tr" | "th" | "hr" | "mi" | "mn" | "ms" | "is" | "id" | "af" | "af-ZA" | "sq" | "sq-AL" | "am" | "am-ET" | "ar" | "ar-DZ" | "ar-BH" | "ar-TD" | "ar-KM" | "ar-DJ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MR" | "ar-MA" | "ar-OM" | "ar-PS" | "ar-QA" | "ar-SA" | "ar-SO" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-AE" | "ar-YE" | "hy" | "hy-AM" | "az" | "az-AZ" | "eu" | "eu-ES" | "be" | "be-BY" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "bs" | "bs-BA" | "bg" | "bg-BG" | "my" | "my-MM" | "ca" | "ca-ES" | "zh" | "zh-HK" | "zh-MO" | "zh-Hans" | "zh-CN" | "zh-SG" | "zh-TW" | "zh-Hant" | "hr-BA" | "hr-HR" | "cs" | "cs-CZ" | "da" | "da-DK" | "dv" | "dv-MV" | "nl" | "nl-BE" | "nl-NL" | "en" | "en-AU" | "en-BZ" | "en-BW" | "en-CA" | "en-CB" | "en-GH" | "en-HK" | "en-IN" | "en-IE" | "en-JM" | "en-KE" | "en-MY" | "en-NZ" | "en-NG" | "en-PK" | "en-PH" | "en-SG" | "en-ZA" | "en-TZ" | "en-TT" | "en-UG" | "en-GB" | "en-US" | "en-ZW" | "eo" | "et" | "et-EE" | "fo" | "fo-FO" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fr" | "fr-BE" | "fr-CA" | "fr-FR" | "fr-LU" | "fr-MC" | "fr-CH" | "mk" | "mk-MK" | "gl" | "gl-ES" | "ka" | "ka-GE" | "de" | "de-AT" | "de-DE" | "de-LI" | "de-LU" | "de-CH" | "el" | "el-GR" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hu" | "hu-HU" | "is-IS" | "id-ID" | "ga" | "ga-IE" | "it" | "it-IT" | "it-CH" | "ja" | "ja-JP" | "kn" | "kn-IN" | "kk" | "kk-KZ" | "km" | "km-KH" | "kok" | "kok-IN" | "ko" | "ko-KR" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lo" | "lo-LA" | "lv" | "lv-LV" | "lt" | "lt-LT" | "dsb" | "dsb-DE" | "mg-MG" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi-NZ" | "mr" | "mr-IN" | "mn-MN" | "ne" | "ne-NP" | "ns" | "ns-ZA" | "no" | "nb" | "nb-NO" | "nn" | "nn-NO" | "ps" | "ps-AR" | "pl" | "pl-PL" | "pt" | "pt-BR" | "pt-CV" | "pt-GW" | "pt-MO" | "pt-MZ" | "pt-PT" | "pt-ST" | "pt-TL" | "pa" | "pa-IN" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-MD" | "ro-RO" | "rm" | "rm-CH" | "ru" | "ru-MD" | "ru-RU" | "se" | "se-FI" | "se-NO" | "se-SE" | "sa" | "sa-IN" | "gd" | "gd-GB" | "sr-Cyrl" | "sr-BA" | "sr-RS" | "sr" | "sr-SP" | "si" | "si-LK" | "sk" | "sk-SK" | "sl" | "sl-SI" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-SV" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PY" | "es-PE" | "es-PR" | "es-ES" | "es-US" | "es-UY" | "es-VE" | "sw" | "sw-KE" | "sv" | "sv-FI" | "sv-SE" | "syr" | "syr-SY" | "tl" | "tl-PH" | "ta" | "ta-IN" | "tt" | "tt-RU" | "te" | "te-IN" | "th-TH" | "ts" | "tn" | "tn-ZA" | "tr-TR" | "uk" | "uk-UA" | "hsb" | "hsb-DE" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "ve" | "ve-ZA" | "vi" | "vi-VN" | "cy" | "cy-GB" | "xh" | "xh-ZA" | "yi" | "yi-001" | "yo" | "yo-NG" | "zu" | "zu-ZA">;
@@ -1,4 +1,4 @@
1
- import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
1
+ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  import { DeepTransformContent } from '../plugins';
3
3
  /**
4
4
  * Solid hook that picks one dictionary by its key and returns its reactive content.
@@ -28,4 +28,4 @@ import { DeepTransformContent } from '../plugins';
28
28
  * };
29
29
  * ```
30
30
  */
31
- export declare const useIntlayer: <const T extends DictionaryKeys, const A extends DeclaredLocales | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
31
+ 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>>;
@@ -1,9 +1,9 @@
1
1
  import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from '@intlayer/types/dictionary';
2
- import { DeclaredLocales, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
2
+ import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
3
3
  import { DeepTransformContent } from './plugins';
4
4
  /**
5
5
  * Transforms a dictionary (or qualified dictionary group) and returns its
6
6
  * content for the given locale or selector (`{ item }`, `{ variant }`,
7
7
  * optionally combined with `locale`).
8
8
  */
9
- export declare const getDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends DeclaredLocales | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
9
+ export declare const getDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => DeepTransformContent<ResolveQualifiedDictionaryContent<T, A>, ExtractSelectorLocale<A>>;
@@ -1,8 +1,8 @@
1
- import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale } from '@intlayer/types/module_augmentation';
1
+ import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from '@intlayer/types/module_augmentation';
2
2
  import { DeepTransformContent } from './plugins';
3
3
  /**
4
4
  * Picks one dictionary by its key and returns its content for the given
5
5
  * locale or selector (`{ item }`, `{ variant }`,
6
6
  * optionally combined with `locale`).
7
7
  */
8
- export declare const getIntlayer: <const T extends DictionaryKeys, const A extends DeclaredLocales | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
8
+ export declare const getIntlayer: <const T extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<T> = DeclaredLocales>(key: T, localeOrSelector?: A) => DeepTransformContent<DictionaryRegistryResult<T, A>, ExtractSelectorLocale<A>>;
@@ -1,5 +1,5 @@
1
1
  import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup } from '@intlayer/types/dictionary';
2
- import { DeclaredLocales } from '@intlayer/types/module_augmentation';
2
+ import { DeclaredLocales, LocalesValues } from '@intlayer/types/module_augmentation';
3
3
  /**
4
4
  * Server-rendering counterpart of `useDictionaryDynamic`, emitted by the
5
5
  * optimizer in the server bundle so dynamic-mode dictionaries render
@@ -17,4 +17,4 @@ import { DeclaredLocales } from '@intlayer/types/module_augmentation';
17
17
  * `ssrLoadFrom: 'initial'` keeps the dictionary out of the SSR serialization
18
18
  * payload, so it is not shipped twice in the HTML.
19
19
  */
20
- export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends DeclaredLocales | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => import('@intlayer/core/interpreter').DeepTransformContent<import('@intlayer/types').ResolveQualifiedDictionaryContent<T, A>, import('../plugins').IInterpreterPluginState, import('@intlayer/types').ExtractSelectorLocale<A>>;
20
+ export declare const useDictionary: <const T extends Dictionary | QualifiedDictionaryGroup, const A extends LocalesValues | DictionarySelectorForGroup<T> = DeclaredLocales>(dictionary: T, localeOrSelector?: A) => import('@intlayer/core/interpreter').DeepTransformContent<import('@intlayer/types').ResolveQualifiedDictionaryContent<T, A>, import('../plugins').IInterpreterPluginState, import('@intlayer/types').ExtractSelectorLocale<A>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-intlayer",
3
- "version": "9.1.1",
3
+ "version": "9.1.3",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Solid applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -113,11 +113,11 @@
113
113
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
114
114
  },
115
115
  "dependencies": {
116
- "@intlayer/api": "9.1.1",
117
- "@intlayer/config": "9.1.1",
118
- "@intlayer/core": "9.1.1",
119
- "@intlayer/editor": "9.1.1",
120
- "@intlayer/types": "9.1.1"
116
+ "@intlayer/api": "9.1.3",
117
+ "@intlayer/config": "9.1.3",
118
+ "@intlayer/core": "9.1.3",
119
+ "@intlayer/editor": "9.1.3",
120
+ "@intlayer/types": "9.1.3"
121
121
  },
122
122
  "devDependencies": {
123
123
  "@solidjs/testing-library": "0.8.10",
@@ -141,7 +141,7 @@
141
141
  "solid-js": ">=1.0.0"
142
142
  },
143
143
  "optionalDependencies": {
144
- "@intlayer/analytics": "9.1.1"
144
+ "@intlayer/analytics": "9.1.3"
145
145
  },
146
146
  "engines": {
147
147
  "node": ">=14.18"