solid-intlayer 9.8.5 → 9.9.0

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.
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=e=>new Proxy(e,{get(e,t){let n=e();if(n==null)return;let r=Reflect.get(Object(n),t);return typeof r==`function`&&!Object.hasOwn(n,t)?r.bind(n):r},has(e,t){let n=e();return typeof n==`object`&&!!n&&t in n},apply(e){return e()}});exports.createContentProxy=e;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("../plugins.cjs"),n=require("./IntlayerProvider.cjs"),r=require("./useLoadDynamic.cjs");let i=require("@intlayer/core/interpreter"),a=require("solid-js"),o=require("@intlayer/core/dictionaryManipulator");var s=(s,c)=>{let l=(0,a.useContext)(n.IntlayerClientContext)??{},u=new Map,d=e=>{let n=t.getPlugins(e),r=u.get(n);return r||(r=[...n],u.set(n,r)),r},f=()=>{let t=l?.locale?.(),n=r.unwrapLoadable(s)??s;return process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?e.getDictionary(n,c??t,d):e.getDictionary(n,(0,o.resolveDictionaryArgument)({localeOrSelector:c,contextLocale:t,contextVariant:l?.variant?.(),dictionaryKey:s.key}),d)},p=(0,a.createMemo)(()=>{let{result:e,writes:t}=(0,i.collectTransformCacheWrites)(f);return t.length>0&&(0,a.onCleanup)(()=>(0,i.deleteTransformCacheWrites)(t)),e});return new Proxy(p,{get(e,t){return e()?.[t]},apply(e,t,n){return Reflect.apply(e,t,n)}})};exports.useDictionary=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("../plugins.cjs"),n=require("./contentProxy.cjs"),r=require("./IntlayerProvider.cjs"),i=require("./useLoadDynamic.cjs");let a=require("@intlayer/core/interpreter"),o=require("solid-js"),s=require("@intlayer/core/dictionaryManipulator");var c=(c,l)=>{let u=(0,o.useContext)(r.IntlayerClientContext)??{},d=new Map,f=e=>{let n=t.getPlugins(e),r=d.get(n);return r||(r=[...n],d.set(n,r)),r},p=()=>{let t=u?.locale?.(),n=i.unwrapLoadable(c)??c;return process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?e.getDictionary(n,l??t,f):e.getDictionary(n,(0,s.resolveDictionaryArgument)({localeOrSelector:l,contextLocale:t,contextVariant:u?.variant?.(),dictionaryKey:c.key}),f)},m=(0,o.createMemo)(()=>{let{result:e,writes:t}=(0,a.collectTransformCacheWrites)(p);return t.length>0&&(0,o.onCleanup)(()=>(0,a.deleteTransformCacheWrites)(t)),e});return n.createContentProxy(m)};exports.useDictionary=c;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./IntlayerProvider.cjs"),t=require("./useDictionary.cjs");let n=require("@intlayer/core/interpreter"),r=require("solid-js");var i=async(i,a)=>{let{locale:o}=(0,r.useContext)(e.IntlayerClientContext)??{},s=a??o()??(0,n.resolveInterpreterLocale)(),c=await i[s]?.();return t.useDictionary(c,s)};exports.useDictionaryAsync=i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./IntlayerProvider.cjs"),t=require("./useDictionary.cjs");let n=require("@intlayer/core/interpreter"),r=require("solid-js"),i=require("@intlayer/core/dictionaryManipulator");var a=async(a,o)=>{let{locale:s}=(0,r.useContext)(e.IntlayerClientContext)??{},c=o??s()??(0,n.resolveInterpreterLocale)(),l=await(0,i.loadDynamicDictionary)(a,c);return t.useDictionary(l,c)};exports.useDictionaryAsync=a;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("../solidCompat.cjs"),n=require("./IntlayerProvider.cjs"),r=require("./useDictionary.cjs"),i=require("./useLoadDynamic.cjs");let a=require("@intlayer/core/interpreter"),o=require("solid-js"),s=require("@intlayer/core/dictionaryManipulator");var c=(c,l,u)=>{let d=(0,o.useContext)(n.IntlayerClientContext)??{},{locale:f}=d,p=String(l);if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,s.isQualifiedDynamicLoaderMap)(c)){let{locale:n,selector:l}=(0,s.parseDictionarySelector)(u),m=()=>(0,s.parseDictionarySelector)((0,s.resolveDictionaryArgument)({localeOrSelector:u,contextLocale:f?.(),contextVariant:d.variant?.(),dictionaryKey:p})).selector,h=c[s.QUALIFIER_DYNAMIC_TYPES_KEY].includes(`item`)&&l?.item===void 0,g=()=>n??f?.()??(0,a.resolveInterpreterLocale)();if(!h){let e=i.useLoadDynamic(()=>{let e=g();return{cacheKey:`${p}.${e}.${(0,s.getDictionarySelectorCacheKey)(m())}`,locale:e}},({locale:e})=>(0,s.resolveQualifiedDynamicContentAsync)({loaderMap:c,key:p,locale:e,selector:m(),transform:e=>e}).then(e=>Array.isArray(e)?e[0]:e));return r.useDictionary(e,n)}let _=t.createAsyncValue(()=>({locale:g(),selector:m()}),({locale:e,selector:t})=>(0,s.resolveQualifiedDynamicContentAsync)({loaderMap:c,key:p,locale:e,selector:t,transform:e=>e})),v=(0,o.createMemo)(()=>{let t=_(),n=g();return Array.isArray(t)?t.map(t=>e.getDictionary(t,n)):[]});return t.trackAsyncValue(_),new Proxy(v,{get(e,t){let n=e(),r=n?.[t];return typeof r==`function`?r.bind(n):r},has(e,t){return t in e()},apply(e){return e()}})}let m=c,h=u,g=()=>h??f?.()??(0,a.resolveInterpreterLocale)(),_=()=>{let e=g();return{cacheKey:`${p}.${e}`,locale:e}},v=({locale:e})=>{let t=m[e];return t?t():Promise.reject(Error(`No dynamic dictionary loader found for key "${p}" and locale "${e}".`))},y=(0,s.getPreloadedDictionary)(m,g());y&&i.seedDynamicValue(_(),y);let b=i.useLoadDynamic(_,v);return r.useDictionary(b,h)};exports.useDictionaryDynamic=c;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getDictionary.cjs"),t=require("../solidCompat.cjs"),n=require("./contentProxy.cjs"),r=require("./IntlayerProvider.cjs"),i=require("./useDictionary.cjs"),a=require("./useLoadDynamic.cjs");let o=require("solid-js"),s=require("@intlayer/core/dictionaryManipulator");var c=e=>e,l=(t,n)=>e.getDictionary(t,n),u=(u,d,f)=>{let p=(0,o.useContext)(r.IntlayerClientContext)??{},m=String(d),h=u,{locale:g,selector:_}=process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?{locale:f,selector:void 0}:(0,s.parseDictionarySelector)(f),v=()=>(0,s.resolveDictionaryRead)({localeOrSelector:f,contextLocale:p.locale?.(),contextVariant:p.variant?.(),dictionaryKey:m}),y=()=>{let e=v(),t=process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?``:(0,s.getDictionarySelectorCacheKey)({...e.selector,metadataOnly:void 0});return{...e,cacheKey:t?`${m}.${e.locale}.${t}`:`${m}.${e.locale}`}},b=(e,t)=>(0,s.resolveDynamicContentAsync)({loaderMap:h,key:m,...e,transform:t}),x=(0,s.getDynamicChunkArgument)(g,_);if(process.env.INTLAYER_DICTIONARY_SELECTOR!==`false`&&(0,s.isQualifiedDynamicLoaderMap)(h)&&h[s.QUALIFIER_DYNAMIC_TYPES_KEY].includes(`item`)&&_?.item===void 0){let r=t.createAsyncValue(v,e=>b(e,_?.metadataOnly?l:c)),i=(0,o.createMemo)(()=>{let t=r();if(!Array.isArray(t))return[];if(_?.metadataOnly)return t;let{locale:n}=v();return t.map(t=>e.getDictionary(t,n))});return t.trackAsyncValue(r),n.createContentProxy(i)}let S=y(),C=(0,s.getPreloadedDictionary)(h,S.locale);C&&a.seedDynamicValue(S,C);let w=a.useLoadDynamic(y,e=>b(e,c).then(t=>{if(t===null)throw Error(`No dynamic dictionary chunk found for key "${m}" and locale "${e.locale}".`);return t}));return i.useDictionary(w,x)};exports.useDictionaryDynamic=u;
@@ -1 +1 @@
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;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../getIntlayer.cjs"),t=require("./contentProxy.cjs"),n=require("./IntlayerProvider.cjs");let r=require("solid-js"),i=require("@intlayer/core/dictionaryManipulator");var a=(a,o)=>{let s=(0,r.useContext)(n.IntlayerClientContext)??{},c=(0,r.createMemo)(()=>{let t=s?.locale?.();return process.env.INTLAYER_DICTIONARY_SELECTOR===`false`?e.getIntlayer(a,o??t):e.getIntlayer(a,(0,i.resolveDictionaryArgument)({localeOrSelector:o,contextLocale:t,contextVariant:s?.variant?.(),dictionaryKey:a}))});return t.createContentProxy(c)};exports.useIntlayer=a;
@@ -0,0 +1,17 @@
1
+ // src/client/contentProxy.ts
2
+ var e = (e) => new Proxy(e, {
3
+ get(e, t) {
4
+ let n = e();
5
+ if (n == null) return;
6
+ let r = Reflect.get(Object(n), t);
7
+ return typeof r == "function" && !Object.hasOwn(n, t) ? r.bind(n) : r;
8
+ },
9
+ has(e, t) {
10
+ let n = e();
11
+ return typeof n == "object" && !!n && t in n;
12
+ },
13
+ apply(e) {
14
+ return e();
15
+ }
16
+ });
17
+ export { e as createContentProxy };
@@ -1,34 +1,28 @@
1
1
  import { getDictionary as e } from "../getDictionary.mjs";
2
2
  import { getPlugins as t } from "../plugins.mjs";
3
- import { IntlayerClientContext as n } from "./IntlayerProvider.mjs";
4
- import { unwrapLoadable as r } from "./useLoadDynamic.mjs";
5
- import { collectTransformCacheWrites as i, deleteTransformCacheWrites as a } from "@intlayer/core/interpreter";
6
- import { createMemo as o, onCleanup as s, useContext as c } from "solid-js";
7
- import { resolveDictionaryArgument as l } from "@intlayer/core/dictionaryManipulator";
3
+ import { createContentProxy as n } from "./contentProxy.mjs";
4
+ import { IntlayerClientContext as r } from "./IntlayerProvider.mjs";
5
+ import { unwrapLoadable as i } from "./useLoadDynamic.mjs";
6
+ import { collectTransformCacheWrites as a, deleteTransformCacheWrites as o } from "@intlayer/core/interpreter";
7
+ import { createMemo as s, onCleanup as c, useContext as l } from "solid-js";
8
+ import { resolveDictionaryArgument as u } from "@intlayer/core/dictionaryManipulator";
8
9
  // src/client/useDictionary.ts
9
- var u = (u, d) => {
10
- let f = c(n) ?? {}, p = /* @__PURE__ */ new Map(), m = (e) => {
11
- let n = t(e), r = p.get(n);
12
- return r || (r = [...n], p.set(n, r)), r;
13
- }, h = () => {
14
- let t = f?.locale?.(), n = r(u) ?? u;
15
- return process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? e(n, d ?? t, m) : e(n, l({
16
- localeOrSelector: d,
10
+ var d = (d, f) => {
11
+ let p = l(r) ?? {}, m = /* @__PURE__ */ new Map(), h = (e) => {
12
+ let n = t(e), r = m.get(n);
13
+ return r || (r = [...n], m.set(n, r)), r;
14
+ }, g = () => {
15
+ let t = p?.locale?.(), n = i(d) ?? d;
16
+ return process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? e(n, f ?? t, h) : e(n, u({
17
+ localeOrSelector: f,
17
18
  contextLocale: t,
18
- contextVariant: f?.variant?.(),
19
- dictionaryKey: u.key
20
- }), m);
21
- }, g = o(() => {
22
- let { result: e, writes: t } = i(h);
23
- return t.length > 0 && s(() => a(t)), e;
24
- });
25
- return new Proxy(g, {
26
- get(e, t) {
27
- return e()?.[t];
28
- },
29
- apply(e, t, n) {
30
- return Reflect.apply(e, t, n);
31
- }
19
+ contextVariant: p?.variant?.(),
20
+ dictionaryKey: d.key
21
+ }), h);
22
+ }, _ = s(() => {
23
+ let { result: e, writes: t } = a(g);
24
+ return t.length > 0 && c(() => o(t)), e;
32
25
  });
26
+ return n(_);
33
27
  };
34
- export { u as useDictionary };
28
+ export { d as useDictionary };
@@ -2,9 +2,10 @@ import { IntlayerClientContext as e } from "./IntlayerProvider.mjs";
2
2
  import { useDictionary as t } from "./useDictionary.mjs";
3
3
  import { resolveInterpreterLocale as n } from "@intlayer/core/interpreter";
4
4
  import { useContext as r } from "solid-js";
5
+ import { loadDynamicDictionary as i } from "@intlayer/core/dictionaryManipulator";
5
6
  // src/client/useDictionaryAsync.ts
6
- var i = async (i, a) => {
7
- let { locale: o } = r(e) ?? {}, s = a ?? o() ?? n(), c = await i[s]?.();
8
- return t(c, s);
7
+ var a = async (a, o) => {
8
+ let { locale: s } = r(e) ?? {}, c = o ?? s() ?? n(), l = await i(a, c);
9
+ return t(l, c);
9
10
  };
10
- export { i as useDictionaryAsync };
11
+ export { a as useDictionaryAsync };
@@ -1,75 +1,52 @@
1
1
  import { getDictionary as e } from "../getDictionary.mjs";
2
2
  import { createAsyncValue as t, trackAsyncValue as n } from "../solidCompat.mjs";
3
- import { IntlayerClientContext as r } from "./IntlayerProvider.mjs";
4
- import { useDictionary as i } from "./useDictionary.mjs";
5
- import { seedDynamicValue as a, useLoadDynamic as o } from "./useLoadDynamic.mjs";
6
- import { resolveInterpreterLocale as s } from "@intlayer/core/interpreter";
3
+ import { createContentProxy as r } from "./contentProxy.mjs";
4
+ import { IntlayerClientContext as i } from "./IntlayerProvider.mjs";
5
+ import { useDictionary as a } from "./useDictionary.mjs";
6
+ import { seedDynamicValue as o, useLoadDynamic as s } from "./useLoadDynamic.mjs";
7
7
  import { createMemo as c, useContext as l } from "solid-js";
8
- import { QUALIFIER_DYNAMIC_TYPES_KEY as u, getDictionarySelectorCacheKey as d, getPreloadedDictionary as f, isQualifiedDynamicLoaderMap as p, parseDictionarySelector as m, resolveDictionaryArgument as h, resolveQualifiedDynamicContentAsync as g } from "@intlayer/core/dictionaryManipulator";
8
+ import { QUALIFIER_DYNAMIC_TYPES_KEY as u, getDictionarySelectorCacheKey as d, getDynamicChunkArgument as f, getPreloadedDictionary as p, isQualifiedDynamicLoaderMap as m, parseDictionarySelector as h, resolveDictionaryRead as g, resolveDynamicContentAsync as _ } from "@intlayer/core/dictionaryManipulator";
9
9
  // src/client/useDictionaryDynamic.ts
10
- var _ = (_, v, y) => {
11
- let b = l(r) ?? {}, { locale: x } = b, S = String(v);
12
- if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && p(_)) {
13
- let { locale: r, selector: a } = m(y), l = () => m(h({
14
- localeOrSelector: y,
15
- contextLocale: x?.(),
16
- contextVariant: b.variant?.(),
17
- dictionaryKey: S
18
- })).selector, f = _[u].includes("item") && a?.item === void 0, p = () => r ?? x?.() ?? s();
19
- if (!f) {
20
- let e = o(() => {
21
- let e = p();
22
- return {
23
- cacheKey: `${S}.${e}.${d(l())}`,
24
- locale: e
25
- };
26
- }, ({ locale: e }) => g({
27
- loaderMap: _,
28
- key: S,
29
- locale: e,
30
- selector: l(),
31
- transform: (e) => e
32
- }).then((e) => Array.isArray(e) ? e[0] : e));
33
- return i(e, r);
34
- }
35
- let v = t(() => ({
36
- locale: p(),
37
- selector: l()
38
- }), ({ locale: e, selector: t }) => g({
39
- loaderMap: _,
40
- key: S,
41
- locale: e,
42
- selector: t,
43
- transform: (e) => e
44
- })), C = c(() => {
45
- let t = v(), n = p();
46
- return Array.isArray(t) ? t.map((t) => e(t, n)) : [];
10
+ var v = (e) => e, y = (t, n) => e(t, n), b = (b, x, S) => {
11
+ let C = l(i) ?? {}, w = String(x), T = b, { locale: E, selector: D } = process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? {
12
+ locale: S,
13
+ selector: void 0
14
+ } : h(S), O = () => g({
15
+ localeOrSelector: S,
16
+ contextLocale: C.locale?.(),
17
+ contextVariant: C.variant?.(),
18
+ dictionaryKey: w
19
+ }), k = () => {
20
+ let e = O(), t = process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? "" : d({
21
+ ...e.selector,
22
+ metadataOnly: void 0
47
23
  });
48
- return n(v), new Proxy(C, {
49
- get(e, t) {
50
- let n = e(), r = n?.[t];
51
- return typeof r == "function" ? r.bind(n) : r;
52
- },
53
- has(e, t) {
54
- return t in e();
55
- },
56
- apply(e) {
57
- return e();
58
- }
59
- });
60
- }
61
- let C = _, w = y, T = () => w ?? x?.() ?? s(), E = () => {
62
- let e = T();
63
24
  return {
64
- cacheKey: `${S}.${e}`,
65
- locale: e
25
+ ...e,
26
+ cacheKey: t ? `${w}.${e.locale}.${t}` : `${w}.${e.locale}`
66
27
  };
67
- }, D = ({ locale: e }) => {
68
- let t = C[e];
69
- return t ? t() : Promise.reject(/* @__PURE__ */ Error(`No dynamic dictionary loader found for key "${S}" and locale "${e}".`));
70
- }, O = f(C, T());
71
- O && a(E(), O);
72
- let k = o(E, D);
73
- return i(k, w);
28
+ }, A = (e, t) => _({
29
+ loaderMap: T,
30
+ key: w,
31
+ ...e,
32
+ transform: t
33
+ }), j = f(E, D);
34
+ if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && m(T) && T[u].includes("item") && D?.item === void 0) {
35
+ let i = t(O, (e) => A(e, D?.metadataOnly ? y : v)), a = c(() => {
36
+ let t = i();
37
+ if (!Array.isArray(t)) return [];
38
+ if (D?.metadataOnly) return t;
39
+ let { locale: n } = O();
40
+ return t.map((t) => e(t, n));
41
+ });
42
+ return n(i), r(a);
43
+ }
44
+ let M = k(), N = p(T, M.locale);
45
+ N && o(M, N);
46
+ let P = s(k, (e) => A(e, v).then((t) => {
47
+ if (t === null) throw Error(`No dynamic dictionary chunk found for key "${w}" and locale "${e.locale}".`);
48
+ return t;
49
+ }));
50
+ return a(P, j);
74
51
  };
75
- export { _ as useDictionaryDynamic };
52
+ export { b as useDictionaryDynamic };
@@ -1,25 +1,19 @@
1
1
  import { getIntlayer as e } from "../getIntlayer.mjs";
2
- import { IntlayerClientContext as t } from "./IntlayerProvider.mjs";
3
- import { createMemo as n, useContext as r } from "solid-js";
4
- import { resolveDictionaryArgument as i } from "@intlayer/core/dictionaryManipulator";
2
+ import { createContentProxy as t } from "./contentProxy.mjs";
3
+ import { IntlayerClientContext as n } from "./IntlayerProvider.mjs";
4
+ import { createMemo as r, useContext as i } from "solid-js";
5
+ import { resolveDictionaryArgument as a } from "@intlayer/core/dictionaryManipulator";
5
6
  // src/client/useIntlayer.ts
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,
7
+ var o = (o, s) => {
8
+ let c = i(n) ?? {}, l = r(() => {
9
+ let t = c?.locale?.();
10
+ return process.env.INTLAYER_DICTIONARY_SELECTOR === "false" ? e(o, s ?? t) : e(o, a({
11
+ localeOrSelector: s,
11
12
  contextLocale: t,
12
- contextVariant: s?.variant?.(),
13
- dictionaryKey: a
13
+ contextVariant: c?.variant?.(),
14
+ dictionaryKey: o
14
15
  }));
15
16
  });
16
- return new Proxy(c, {
17
- get(e, t) {
18
- return e()?.[t];
19
- },
20
- apply(e, t, n) {
21
- return Reflect.apply(e, t, n);
22
- }
23
- });
17
+ return t(l);
24
18
  };
25
- export { a as useIntlayer };
19
+ export { o as useIntlayer };
@@ -0,0 +1,31 @@
1
+ // src/client/contentProxy.ts
2
+ /**
3
+ * Exposes reactive content through a proxy that reads `accessor` on every
4
+ * access, so each field read stays tracked — shared by `useDictionary`,
5
+ * `useIntlayer` and the dynamic collection read.
6
+ *
7
+ * Collections must behave like real arrays: Solid 2's `<For>` copies its list
8
+ * with `list.slice(0)`, which checks every index with `in`. Answering those
9
+ * checks for the function target would yield holes (`undefined` rows), so `in`
10
+ * is answered for the content, and inherited methods (`slice`, `map`…) run
11
+ * against it. Own fields are returned untouched: content nodes carry their
12
+ * own properties (`.value`, `.raw`) that a bound copy would lose.
13
+ *
14
+ * @param accessor - Returns the current content (a memo).
15
+ */
16
+ var createContentProxy = (accessor) => new Proxy(accessor, {
17
+ get(target, property) {
18
+ const content = target();
19
+ if (content == null) return void 0;
20
+ const value = Reflect.get(Object(content), property);
21
+ return typeof value === "function" && !Object.hasOwn(content, property) ? value.bind(content) : value;
22
+ },
23
+ has(target, property) {
24
+ const content = target();
25
+ return content != null && typeof content === "object" && property in content;
26
+ },
27
+ apply(target) {
28
+ return target();
29
+ }
30
+ });
31
+ export { createContentProxy };
@@ -1,5 +1,6 @@
1
1
  import { getDictionary as getDictionary$1 } from "../getDictionary.js";
2
2
  import { getPlugins } from "../plugins.jsx";
3
+ import { createContentProxy } from "./contentProxy.js";
3
4
  import { IntlayerClientContext } from "./IntlayerProvider.jsx";
4
5
  import { unwrapLoadable } from "./useLoadDynamic.js";
5
6
  import { collectTransformCacheWrites, deleteTransformCacheWrites } from "@intlayer/core/interpreter";
@@ -44,13 +45,6 @@ var useDictionary = (dictionary, localeOrSelector) => {
44
45
  if (writes.length > 0) onCleanup(() => deleteTransformCacheWrites(writes));
45
46
  return result;
46
47
  });
47
- return new Proxy(accessor, {
48
- get(target, prop) {
49
- return target()?.[prop];
50
- },
51
- apply(target, thisArg, args) {
52
- return Reflect.apply(target, thisArg, args);
53
- }
54
- });
48
+ return createContentProxy(accessor);
55
49
  };
56
50
  export { useDictionary };
@@ -2,6 +2,7 @@ import { IntlayerClientContext } from "./IntlayerProvider.jsx";
2
2
  import { useDictionary } from "./useDictionary.js";
3
3
  import { resolveInterpreterLocale } from "@intlayer/core/interpreter";
4
4
  import { useContext } from "solid-js";
5
+ import { loadDynamicDictionary } from "@intlayer/core/dictionaryManipulator";
5
6
  // src/client/useDictionaryAsync.ts
6
7
  /**
7
8
  * On the server side, Hook that transform a dictionary and return the content
@@ -11,7 +12,7 @@ import { useContext } from "solid-js";
11
12
  var useDictionaryAsync = async (dictionaryPromise, locale) => {
12
13
  const { locale: currentLocale } = useContext(IntlayerClientContext) ?? {};
13
14
  const localeTarget = locale ?? currentLocale() ?? resolveInterpreterLocale();
14
- const dictionary = await dictionaryPromise[localeTarget]?.();
15
+ const dictionary = await loadDynamicDictionary(dictionaryPromise, localeTarget);
15
16
  return useDictionary(dictionary, localeTarget);
16
17
  };
17
18
  export { useDictionaryAsync };
@@ -1,105 +1,81 @@
1
- import { getDictionary as getDictionary$1 } from "../getDictionary.js";
1
+ import { getDictionary } from "../getDictionary.js";
2
2
  import { createAsyncValue, trackAsyncValue } from "../solidCompat.js";
3
+ import { createContentProxy } from "./contentProxy.js";
3
4
  import { IntlayerClientContext } from "./IntlayerProvider.jsx";
4
5
  import { useDictionary } from "./useDictionary.js";
5
6
  import { seedDynamicValue, useLoadDynamic } from "./useLoadDynamic.js";
6
- import { resolveInterpreterLocale } from "@intlayer/core/interpreter";
7
7
  import { createMemo, useContext } from "solid-js";
8
- import { QUALIFIER_DYNAMIC_TYPES_KEY, getDictionarySelectorCacheKey, getPreloadedDictionary, isQualifiedDynamicLoaderMap, parseDictionarySelector, resolveDictionaryArgument, resolveQualifiedDynamicContentAsync } from "@intlayer/core/dictionaryManipulator";
8
+ import { QUALIFIER_DYNAMIC_TYPES_KEY, getDictionarySelectorCacheKey, getDynamicChunkArgument, getPreloadedDictionary, isQualifiedDynamicLoaderMap, parseDictionarySelector, resolveDictionaryRead, resolveDynamicContentAsync } from "@intlayer/core/dictionaryManipulator";
9
9
  // src/client/useDictionaryDynamic.ts
10
10
  /**
11
+ * Loaded chunks stay raw (serializable for hydration) and are interpreted
12
+ * inside the component owner. A collection's metadata is plain data, resolved
13
+ * right away — its index holds no dictionary to interpret anyway.
14
+ */
15
+ var keepRawChunk = (dictionary) => dictionary;
16
+ var readChunkMetadata = (dictionary, argument) => getDictionary(dictionary, argument);
17
+ /**
11
18
  * On the client side, Hook that lazily loads a dictionary and returns its
12
19
  * reactive content.
13
20
  *
14
- * The dictionary entry is either a plain dynamic loader map
15
- * (`locale → loader`) or a qualified one (collection / variant,
16
- * possibly combined). For a qualified map, only the chunk(s) the selector
17
- * targets are loaded; the resolution mirrors static mode.
21
+ * The locale, selector and chunk selection are resolved by the shared
22
+ * `resolveDictionaryRead` / `resolveDynamicContentAsync`; this hook only adds
23
+ * Solid's resources and owner-scoped interpretation.
18
24
  *
19
25
  * If the locale is not provided (directly or through the selector), it will
20
26
  * use the locale from the client context.
21
27
  */
22
28
  var useDictionaryDynamic = (dictionaryPromise, key, localeOrSelector) => {
23
29
  const context = useContext(IntlayerClientContext) ?? {};
24
- const { locale: currentLocale } = context;
25
30
  const dictionaryKey = String(key);
26
- if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && isQualifiedDynamicLoaderMap(dictionaryPromise)) {
27
- const { locale: selectorLocale, selector: callSelector } = parseDictionarySelector(localeOrSelector);
28
- const selectorAccessor = () => parseDictionarySelector(resolveDictionaryArgument({
29
- localeOrSelector,
30
- contextLocale: currentLocale?.(),
31
- contextVariant: context.variant?.(),
32
- dictionaryKey
33
- })).selector;
34
- const isCollection = dictionaryPromise[QUALIFIER_DYNAMIC_TYPES_KEY].includes("item") && callSelector?.item === void 0;
35
- const localeAccessor = () => selectorLocale ?? currentLocale?.() ?? resolveInterpreterLocale();
36
- if (!isCollection) {
37
- const dictionarySourceAccessor = () => {
38
- const localeTarget = localeAccessor();
39
- return {
40
- cacheKey: `${dictionaryKey}.${localeTarget}.${getDictionarySelectorCacheKey(selectorAccessor())}`,
41
- locale: localeTarget
42
- };
43
- };
44
- const loadEntry = ({ locale: localeTarget }) => resolveQualifiedDynamicContentAsync({
45
- loaderMap: dictionaryPromise,
46
- key: dictionaryKey,
47
- locale: localeTarget,
48
- selector: selectorAccessor(),
49
- transform: (dictionary) => dictionary
50
- }).then((resolved) => Array.isArray(resolved) ? resolved[0] : resolved);
51
- const dictionary = useLoadDynamic(dictionarySourceAccessor, loadEntry);
52
- return useDictionary(dictionary, selectorLocale);
53
- }
54
- const resolvedEntries = createAsyncValue(() => ({
55
- locale: localeAccessor(),
56
- selector: selectorAccessor()
57
- }), ({ locale: localeTarget, selector }) => resolveQualifiedDynamicContentAsync({
58
- loaderMap: dictionaryPromise,
59
- key: dictionaryKey,
60
- locale: localeTarget,
61
- selector,
62
- transform: (dictionary) => dictionary
63
- }));
31
+ const loaderMap = dictionaryPromise;
32
+ const { locale: callLocale, selector: callSelector } = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? parseDictionarySelector(localeOrSelector) : {
33
+ locale: localeOrSelector,
34
+ selector: void 0
35
+ };
36
+ const readAccessor = () => resolveDictionaryRead({
37
+ localeOrSelector,
38
+ contextLocale: context.locale?.(),
39
+ contextVariant: context.variant?.(),
40
+ dictionaryKey
41
+ });
42
+ const sourceAccessor = () => {
43
+ const read = readAccessor();
44
+ const chunkSelectorId = process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" ? getDictionarySelectorCacheKey({
45
+ ...read.selector,
46
+ metadataOnly: void 0
47
+ }) : "";
48
+ return {
49
+ ...read,
50
+ cacheKey: chunkSelectorId ? `${dictionaryKey}.${read.locale}.${chunkSelectorId}` : `${dictionaryKey}.${read.locale}`
51
+ };
52
+ };
53
+ const loadContent = (read, transform) => resolveDynamicContentAsync({
54
+ loaderMap,
55
+ key: dictionaryKey,
56
+ ...read,
57
+ transform
58
+ });
59
+ const chunkArgument = getDynamicChunkArgument(callLocale, callSelector);
60
+ if (process.env.INTLAYER_DICTIONARY_SELECTOR !== "false" && isQualifiedDynamicLoaderMap(loaderMap) && loaderMap[QUALIFIER_DYNAMIC_TYPES_KEY].includes("item") && callSelector?.item === void 0) {
61
+ const resolvedEntries = createAsyncValue(readAccessor, (read) => loadContent(read, callSelector?.metadataOnly ? readChunkMetadata : keepRawChunk));
64
62
  const accessor = createMemo(() => {
65
63
  const resolved = resolvedEntries();
66
- const localeTarget = localeAccessor();
67
64
  if (!Array.isArray(resolved)) return [];
68
- return resolved.map((dictionary) => getDictionary$1(dictionary, localeTarget));
65
+ if (callSelector?.metadataOnly) return resolved;
66
+ const { locale } = readAccessor();
67
+ return resolved.map((dictionary) => getDictionary(dictionary, locale));
69
68
  });
70
69
  trackAsyncValue(resolvedEntries);
71
- return new Proxy(accessor, {
72
- get(target, prop) {
73
- const content = target();
74
- const value = content?.[prop];
75
- return typeof value === "function" ? value.bind(content) : value;
76
- },
77
- has(target, prop) {
78
- return prop in target();
79
- },
80
- apply(target) {
81
- return target();
82
- }
83
- });
70
+ return createContentProxy(accessor);
84
71
  }
85
- const dictionaryLoaders = dictionaryPromise;
86
- const locale = localeOrSelector;
87
- const localeAccessor = () => locale ?? currentLocale?.() ?? resolveInterpreterLocale();
88
- const dictionarySourceAccessor = () => {
89
- const localeTarget = localeAccessor();
90
- return {
91
- cacheKey: `${dictionaryKey}.${localeTarget}`,
92
- locale: localeTarget
93
- };
94
- };
95
- const loadDictionary = ({ locale: localeTarget }) => {
96
- const dictionaryLoader = dictionaryLoaders[localeTarget];
97
- if (!dictionaryLoader) return Promise.reject(/* @__PURE__ */ new Error(`No dynamic dictionary loader found for key "${dictionaryKey}" and locale "${localeTarget}".`));
98
- return dictionaryLoader();
99
- };
100
- const preloadedDictionary = getPreloadedDictionary(dictionaryLoaders, localeAccessor());
101
- if (preloadedDictionary) seedDynamicValue(dictionarySourceAccessor(), preloadedDictionary);
102
- const dictionary = useLoadDynamic(dictionarySourceAccessor, loadDictionary);
103
- return useDictionary(dictionary, locale);
72
+ const initialSource = sourceAccessor();
73
+ const preloadedDictionary = getPreloadedDictionary(loaderMap, initialSource.locale);
74
+ if (preloadedDictionary) seedDynamicValue(initialSource, preloadedDictionary);
75
+ const dictionary = useLoadDynamic(sourceAccessor, (source) => loadContent(source, keepRawChunk).then((resolved) => {
76
+ if (resolved === null) throw new Error(`No dynamic dictionary chunk found for key "${dictionaryKey}" and locale "${source.locale}".`);
77
+ return resolved;
78
+ }));
79
+ return useDictionary(dictionary, chunkArgument);
104
80
  };
105
81
  export { useDictionaryDynamic };
@@ -1,4 +1,5 @@
1
1
  import { getIntlayer } from "../getIntlayer.js";
2
+ import { createContentProxy } from "./contentProxy.js";
2
3
  import { IntlayerClientContext } from "./IntlayerProvider.jsx";
3
4
  import { createMemo, useContext } from "solid-js";
4
5
  import { resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
@@ -43,13 +44,6 @@ var useIntlayer = (key, localeOrSelector) => {
43
44
  }));
44
45
  return getIntlayer(key, localeOrSelector ?? currentLocale);
45
46
  });
46
- return new Proxy(accessor, {
47
- get(target, prop) {
48
- return target()?.[prop];
49
- },
50
- apply(target, thisArg, args) {
51
- return Reflect.apply(target, thisArg, args);
52
- }
53
- });
47
+ return createContentProxy(accessor);
54
48
  };
55
49
  export { useIntlayer };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Exposes reactive content through a proxy that reads `accessor` on every
3
+ * access, so each field read stays tracked — shared by `useDictionary`,
4
+ * `useIntlayer` and the dynamic collection read.
5
+ *
6
+ * Collections must behave like real arrays: Solid 2's `<For>` copies its list
7
+ * with `list.slice(0)`, which checks every index with `in`. Answering those
8
+ * checks for the function target would yield holes (`undefined` rows), so `in`
9
+ * is answered for the content, and inherited methods (`slice`, `map`…) run
10
+ * against it. Own fields are returned untouched: content nodes carry their
11
+ * own properties (`.value`, `.raw`) that a bound copy would lose.
12
+ *
13
+ * @param accessor - Returns the current content (a memo).
14
+ */
15
+ export declare const createContentProxy: <Content>(accessor: () => Content) => Content;
@@ -6,12 +6,11 @@ import { DeepTransformContent } from '../plugins';
6
6
  * On the client side, Hook that lazily loads a dictionary and returns its
7
7
  * reactive content.
8
8
  *
9
- * The dictionary entry is either a plain dynamic loader map
10
- * (`locale → loader`) or a qualified one (collection / variant,
11
- * possibly combined). For a qualified map, only the chunk(s) the selector
12
- * targets are loaded; the resolution mirrors static mode.
9
+ * The locale, selector and chunk selection are resolved by the shared
10
+ * `resolveDictionaryRead` / `resolveDynamicContentAsync`; this hook only adds
11
+ * Solid's resources and owner-scoped interpretation.
13
12
  *
14
13
  * If the locale is not provided (directly or through the selector), it will
15
14
  * use the locale from the client context.
16
15
  */
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" | "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-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" | "ms" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi" | "mi-NZ" | "mr" | "mr-IN" | "mn" | "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" | "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-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" | "ms" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi" | "mi-NZ" | "mr" | "mr-IN" | "mn" | "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">;
16
+ 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"]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-intlayer",
3
- "version": "9.8.5",
3
+ "version": "9.9.0",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Solid applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -114,11 +114,11 @@
114
114
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
115
115
  },
116
116
  "dependencies": {
117
- "@intlayer/api": "9.8.5",
118
- "@intlayer/config": "9.8.5",
119
- "@intlayer/core": "9.8.5",
120
- "@intlayer/editor": "9.8.5",
121
- "@intlayer/types": "9.8.5"
117
+ "@intlayer/api": "9.9.0",
118
+ "@intlayer/config": "9.9.0",
119
+ "@intlayer/core": "9.9.0",
120
+ "@intlayer/editor": "9.9.0",
121
+ "@intlayer/types": "9.9.0"
122
122
  },
123
123
  "devDependencies": {
124
124
  "@solidjs/testing-library": "0.8.10",
@@ -149,7 +149,7 @@
149
149
  }
150
150
  },
151
151
  "optionalDependencies": {
152
- "@intlayer/analytics": "9.8.5"
152
+ "@intlayer/analytics": "9.9.0"
153
153
  },
154
154
  "engines": {
155
155
  "node": ">=14.18"