@verbaly/react 0.69.1 → 0.71.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.
package/README.md CHANGED
@@ -35,7 +35,9 @@ function Inbox() {
35
35
  }
36
36
  ```
37
37
 
38
- **Keys are typed.** `useT()` checks every key and its params against your source catalog, through the types Verbaly generates (`src/verbaly.d.ts` in a Vite app): a key no catalog has does not compile. A key that comes from data, like `t(item.key)`, passes as it is; declare it with `defineKeys` from `virtual:verbaly` when you want `check` to verify it exists.
38
+ **The provider is optional in the browser.** With none above it, a hook reads the instance `virtual:verbaly` creates, so a single-page app can skip it and a component test renders with no wrapper, as with react-i18next. On a server it is required, since every request has its own instance.
39
+
40
+ **Keys are typed.** `useT()` checks every key and its params against your source catalog, through the types Verbaly generates (`src/verbaly.d.ts` in a Vite app): a key no catalog has does not compile. A key that comes from data, like `t(item.key)` or a variable typed as a union of keys, passes as it is, and its params are left open; declare it with `defineKeys` from `virtual:verbaly` when you want `check` to verify it exists.
39
41
 
40
42
  `useT()` hands out a new `t` whenever the language changes or a catalog arrives, so a `useMemo`, `useCallback` or effect keyed on `t` runs again in the new language. While nothing changes it stays the same function.
41
43
 
package/dist/index.cjs CHANGED
@@ -3,12 +3,17 @@ const require_render = require("./render-CY-uLpA6.cjs");
3
3
  let react = require("react");
4
4
  //#region src/index.ts
5
5
  const VerbalyContext = (0, react.createContext)(null);
6
+ const APP_INSTANCE = Symbol.for("verbaly.app");
7
+ function appInstance() {
8
+ if (typeof document === "undefined") return null;
9
+ return globalThis[APP_INSTANCE] ?? null;
10
+ }
6
11
  function VerbalyProvider(props) {
7
12
  return (0, react.createElement)(VerbalyContext.Provider, { value: props.instance }, props.children);
8
13
  }
9
14
  function useVerbaly() {
10
- const instance = (0, react.useContext)(VerbalyContext);
11
- if (!instance) throw new Error("[verbaly] useVerbaly requires a <VerbalyProvider>");
15
+ const instance = (0, react.useContext)(VerbalyContext) ?? appInstance();
16
+ if (!instance) throw new Error("[verbaly] useVerbaly requires a <VerbalyProvider>: on a server, or before virtual:verbaly loads");
12
17
  return instance;
13
18
  }
14
19
  function useT() {
@@ -32,7 +37,7 @@ function useVersion(instance) {
32
37
  }
33
38
  function Trans(props) {
34
39
  const ctx = (0, react.useContext)(VerbalyContext);
35
- const instance = props.instance ?? ctx;
40
+ const instance = props.instance ?? ctx ?? appInstance();
36
41
  if (!instance) throw new Error("[verbaly] <Trans> requires an instance prop or a <VerbalyProvider>");
37
42
  useVersion(instance);
38
43
  return require_render.renderTrans(instance, props);
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["createContext","createElement","useContext","useMemo","useSyncExternalStore","renderTrans"],"sources":["../src/index.ts"],"sourcesContent":["import {\n createContext,\n createElement,\n useContext,\n useMemo,\n useSyncExternalStore,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport type { DictionaryInput, Params, TFunction, Verbaly } from 'verbaly';\nimport { renderTrans, type TransProps } from './render';\n\nexport type { TransOptions, TransProps } from './render';\n\nconst VerbalyContext = createContext<Verbaly | null>(null);\n\nexport interface VerbalyProviderProps<D extends DictionaryInput> {\n instance: Verbaly<D>;\n children?: ReactNode;\n}\n\nexport function VerbalyProvider<D extends DictionaryInput>(\n props: VerbalyProviderProps<D>,\n): ReactElement {\n return createElement(\n VerbalyContext.Provider,\n { value: props.instance as unknown as Verbaly },\n props.children,\n );\n}\n\nexport function useVerbaly<D extends DictionaryInput = DictionaryInput>(): Verbaly<D> {\n const instance = useContext(VerbalyContext);\n if (!instance) {\n throw new Error('[verbaly] useVerbaly requires a <VerbalyProvider>');\n }\n return instance as unknown as Verbaly<D>;\n}\n\n// typed by the project's catalog once verbaly.d.ts exists, by a dictionary when one is named\nexport function useT<D extends DictionaryInput = DictionaryInput>(): Verbaly<D>['t'] {\n const instance = useVerbaly<D>();\n const version = useVersion(instance);\n // a new t per locale or catalog: a memo or an effect keyed on t would keep the old language\n return useMemo(() => bound(instance.t), [instance, version]);\n}\n\nfunction bound<T extends Pick<TFunction, 'id'>>(t: T): T {\n const call = t as unknown as (...args: unknown[]) => string;\n const fresh = ((...args: unknown[]) => call(...args)) as unknown as T;\n fresh.id = t.id;\n return fresh;\n}\n\nexport function useLocale(): [string, (locale: string) => void] {\n const instance = useVerbaly();\n useVersion(instance);\n return [instance.locale, instance.setLocale];\n}\n\nfunction useVersion<D extends DictionaryInput>(instance: Verbaly<D>): number {\n return useSyncExternalStore(\n instance.subscribe,\n () => instance.version,\n () => instance.version,\n );\n}\n\n// translated message + element interpolation\nexport function Trans(props: TransProps): ReactElement {\n const ctx = useContext(VerbalyContext);\n const instance = props.instance ?? ctx;\n if (!instance) {\n throw new Error('[verbaly] <Trans> requires an instance prop or a <VerbalyProvider>');\n }\n useVersion(instance);\n return renderTrans(instance, props);\n}\n\nexport type { Params, TFunction, Verbaly };\n"],"mappings":";;;;AAcA,MAAM,kBAAA,GAAiBA,MAAAA,cAAAA,CAA8B,IAAI;AAOzD,SAAgB,gBACd,OACc;CACd,QAAA,GAAOC,MAAAA,cAAAA,CACL,eAAe,UACf,EAAE,OAAO,MAAM,SAA+B,GAC9C,MAAM,QACR;AACF;AAEA,SAAgB,aAAsE;CACpF,MAAM,YAAA,GAAWC,MAAAA,WAAAA,CAAW,cAAc;CAC1C,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,mDAAmD;CAErE,OAAO;AACT;AAGA,SAAgB,OAAqE;CACnF,MAAM,WAAW,WAAc;CAC/B,MAAM,UAAU,WAAW,QAAQ;CAEnC,QAAA,GAAOC,MAAAA,QAAAA,OAAc,MAAM,SAAS,CAAC,GAAG,CAAC,UAAU,OAAO,CAAC;AAC7D;AAEA,SAAS,MAAuC,GAAS;CACvD,MAAM,OAAO;CACb,MAAM,UAAU,GAAG,SAAoB,KAAK,GAAG,IAAI;CACnD,MAAM,KAAK,EAAE;CACb,OAAO;AACT;AAEA,SAAgB,YAAgD;CAC9D,MAAM,WAAW,WAAW;CAC5B,WAAW,QAAQ;CACnB,OAAO,CAAC,SAAS,QAAQ,SAAS,SAAS;AAC7C;AAEA,SAAS,WAAsC,UAA8B;CAC3E,QAAA,GAAOC,MAAAA,qBAAAA,CACL,SAAS,iBACH,SAAS,eACT,SAAS,OACjB;AACF;AAGA,SAAgB,MAAM,OAAiC;CACrD,MAAM,OAAA,GAAMF,MAAAA,WAAAA,CAAW,cAAc;CACrC,MAAM,WAAW,MAAM,YAAY;CACnC,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,oEAAoE;CAEtF,WAAW,QAAQ;CACnB,OAAOG,eAAAA,YAAY,UAAU,KAAK;AACpC"}
1
+ {"version":3,"file":"index.cjs","names":["createContext","createElement","useContext","useMemo","useSyncExternalStore","renderTrans"],"sources":["../src/index.ts"],"sourcesContent":["import {\n createContext,\n createElement,\n useContext,\n useMemo,\n useSyncExternalStore,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport type { DictionaryInput, Params, TFunction, Verbaly } from 'verbaly';\nimport { renderTrans, type TransProps } from './render';\n\nexport type { TransOptions, TransProps } from './render';\n\nconst VerbalyContext = createContext<Verbaly | null>(null);\n\n// what virtual:verbaly registers in a browser; a server holds one instance per request instead\nconst APP_INSTANCE = Symbol.for('verbaly.app');\n\nfunction appInstance(): Verbaly | null {\n if (typeof document === 'undefined') return null;\n return ((globalThis as Record<symbol, unknown>)[APP_INSTANCE] as Verbaly | undefined) ?? null;\n}\n\nexport interface VerbalyProviderProps<D extends DictionaryInput> {\n instance: Verbaly<D>;\n children?: ReactNode;\n}\n\nexport function VerbalyProvider<D extends DictionaryInput>(\n props: VerbalyProviderProps<D>,\n): ReactElement {\n return createElement(\n VerbalyContext.Provider,\n { value: props.instance as unknown as Verbaly },\n props.children,\n );\n}\n\n// a provider wins; without one, a browser or a test reads the app's own, as react-i18next does\nexport function useVerbaly<D extends DictionaryInput = DictionaryInput>(): Verbaly<D> {\n const instance = useContext(VerbalyContext) ?? appInstance();\n if (!instance) {\n throw new Error(\n '[verbaly] useVerbaly requires a <VerbalyProvider>: on a server, or before virtual:verbaly loads',\n );\n }\n return instance as unknown as Verbaly<D>;\n}\n\n// typed by the project's catalog once verbaly.d.ts exists, by a dictionary when one is named\nexport function useT<D extends DictionaryInput = DictionaryInput>(): Verbaly<D>['t'] {\n const instance = useVerbaly<D>();\n const version = useVersion(instance);\n // a new t per locale or catalog: a memo or an effect keyed on t would keep the old language\n return useMemo(() => bound(instance.t), [instance, version]);\n}\n\nfunction bound<T extends Pick<TFunction, 'id'>>(t: T): T {\n const call = t as unknown as (...args: unknown[]) => string;\n const fresh = ((...args: unknown[]) => call(...args)) as unknown as T;\n fresh.id = t.id;\n return fresh;\n}\n\nexport function useLocale(): [string, (locale: string) => void] {\n const instance = useVerbaly();\n useVersion(instance);\n return [instance.locale, instance.setLocale];\n}\n\nfunction useVersion<D extends DictionaryInput>(instance: Verbaly<D>): number {\n return useSyncExternalStore(\n instance.subscribe,\n () => instance.version,\n () => instance.version,\n );\n}\n\n// translated message + element interpolation\nexport function Trans(props: TransProps): ReactElement {\n const ctx = useContext(VerbalyContext);\n const instance = props.instance ?? ctx ?? appInstance();\n if (!instance) {\n throw new Error('[verbaly] <Trans> requires an instance prop or a <VerbalyProvider>');\n }\n useVersion(instance);\n return renderTrans(instance, props);\n}\n\nexport type { Params, TFunction, Verbaly };\n"],"mappings":";;;;AAcA,MAAM,kBAAA,GAAiBA,MAAAA,cAAAA,CAA8B,IAAI;AAGzD,MAAM,eAAe,OAAO,IAAI,aAAa;AAE7C,SAAS,cAA8B;CACrC,IAAI,OAAO,aAAa,aAAa,OAAO;CAC5C,OAAS,WAAuC,iBAAyC;AAC3F;AAOA,SAAgB,gBACd,OACc;CACd,QAAA,GAAOC,MAAAA,cAAAA,CACL,eAAe,UACf,EAAE,OAAO,MAAM,SAA+B,GAC9C,MAAM,QACR;AACF;AAGA,SAAgB,aAAsE;CACpF,MAAM,YAAA,GAAWC,MAAAA,WAAAA,CAAW,cAAc,KAAK,YAAY;CAC3D,IAAI,CAAC,UACH,MAAM,IAAI,MACR,iGACF;CAEF,OAAO;AACT;AAGA,SAAgB,OAAqE;CACnF,MAAM,WAAW,WAAc;CAC/B,MAAM,UAAU,WAAW,QAAQ;CAEnC,QAAA,GAAOC,MAAAA,QAAAA,OAAc,MAAM,SAAS,CAAC,GAAG,CAAC,UAAU,OAAO,CAAC;AAC7D;AAEA,SAAS,MAAuC,GAAS;CACvD,MAAM,OAAO;CACb,MAAM,UAAU,GAAG,SAAoB,KAAK,GAAG,IAAI;CACnD,MAAM,KAAK,EAAE;CACb,OAAO;AACT;AAEA,SAAgB,YAAgD;CAC9D,MAAM,WAAW,WAAW;CAC5B,WAAW,QAAQ;CACnB,OAAO,CAAC,SAAS,QAAQ,SAAS,SAAS;AAC7C;AAEA,SAAS,WAAsC,UAA8B;CAC3E,QAAA,GAAOC,MAAAA,qBAAAA,CACL,SAAS,iBACH,SAAS,eACT,SAAS,OACjB;AACF;AAGA,SAAgB,MAAM,OAAiC;CACrD,MAAM,OAAA,GAAMF,MAAAA,WAAAA,CAAW,cAAc;CACrC,MAAM,WAAW,MAAM,YAAY,OAAO,YAAY;CACtD,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,oEAAoE;CAEtF,WAAW,QAAQ;CACnB,OAAOG,eAAAA,YAAY,UAAU,KAAK;AACpC"}
package/dist/index.js CHANGED
@@ -2,12 +2,17 @@ import { t as renderTrans } from "./render-CyRz_srQ.js";
2
2
  import { createContext, createElement, useContext, useMemo, useSyncExternalStore } from "react";
3
3
  //#region src/index.ts
4
4
  const VerbalyContext = createContext(null);
5
+ const APP_INSTANCE = Symbol.for("verbaly.app");
6
+ function appInstance() {
7
+ if (typeof document === "undefined") return null;
8
+ return globalThis[APP_INSTANCE] ?? null;
9
+ }
5
10
  function VerbalyProvider(props) {
6
11
  return createElement(VerbalyContext.Provider, { value: props.instance }, props.children);
7
12
  }
8
13
  function useVerbaly() {
9
- const instance = useContext(VerbalyContext);
10
- if (!instance) throw new Error("[verbaly] useVerbaly requires a <VerbalyProvider>");
14
+ const instance = useContext(VerbalyContext) ?? appInstance();
15
+ if (!instance) throw new Error("[verbaly] useVerbaly requires a <VerbalyProvider>: on a server, or before virtual:verbaly loads");
11
16
  return instance;
12
17
  }
13
18
  function useT() {
@@ -31,7 +36,7 @@ function useVersion(instance) {
31
36
  }
32
37
  function Trans(props) {
33
38
  const ctx = useContext(VerbalyContext);
34
- const instance = props.instance ?? ctx;
39
+ const instance = props.instance ?? ctx ?? appInstance();
35
40
  if (!instance) throw new Error("[verbaly] <Trans> requires an instance prop or a <VerbalyProvider>");
36
41
  useVersion(instance);
37
42
  return renderTrans(instance, props);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import {\n createContext,\n createElement,\n useContext,\n useMemo,\n useSyncExternalStore,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport type { DictionaryInput, Params, TFunction, Verbaly } from 'verbaly';\nimport { renderTrans, type TransProps } from './render';\n\nexport type { TransOptions, TransProps } from './render';\n\nconst VerbalyContext = createContext<Verbaly | null>(null);\n\nexport interface VerbalyProviderProps<D extends DictionaryInput> {\n instance: Verbaly<D>;\n children?: ReactNode;\n}\n\nexport function VerbalyProvider<D extends DictionaryInput>(\n props: VerbalyProviderProps<D>,\n): ReactElement {\n return createElement(\n VerbalyContext.Provider,\n { value: props.instance as unknown as Verbaly },\n props.children,\n );\n}\n\nexport function useVerbaly<D extends DictionaryInput = DictionaryInput>(): Verbaly<D> {\n const instance = useContext(VerbalyContext);\n if (!instance) {\n throw new Error('[verbaly] useVerbaly requires a <VerbalyProvider>');\n }\n return instance as unknown as Verbaly<D>;\n}\n\n// typed by the project's catalog once verbaly.d.ts exists, by a dictionary when one is named\nexport function useT<D extends DictionaryInput = DictionaryInput>(): Verbaly<D>['t'] {\n const instance = useVerbaly<D>();\n const version = useVersion(instance);\n // a new t per locale or catalog: a memo or an effect keyed on t would keep the old language\n return useMemo(() => bound(instance.t), [instance, version]);\n}\n\nfunction bound<T extends Pick<TFunction, 'id'>>(t: T): T {\n const call = t as unknown as (...args: unknown[]) => string;\n const fresh = ((...args: unknown[]) => call(...args)) as unknown as T;\n fresh.id = t.id;\n return fresh;\n}\n\nexport function useLocale(): [string, (locale: string) => void] {\n const instance = useVerbaly();\n useVersion(instance);\n return [instance.locale, instance.setLocale];\n}\n\nfunction useVersion<D extends DictionaryInput>(instance: Verbaly<D>): number {\n return useSyncExternalStore(\n instance.subscribe,\n () => instance.version,\n () => instance.version,\n );\n}\n\n// translated message + element interpolation\nexport function Trans(props: TransProps): ReactElement {\n const ctx = useContext(VerbalyContext);\n const instance = props.instance ?? ctx;\n if (!instance) {\n throw new Error('[verbaly] <Trans> requires an instance prop or a <VerbalyProvider>');\n }\n useVersion(instance);\n return renderTrans(instance, props);\n}\n\nexport type { Params, TFunction, Verbaly };\n"],"mappings":";;;AAcA,MAAM,iBAAiB,cAA8B,IAAI;AAOzD,SAAgB,gBACd,OACc;CACd,OAAO,cACL,eAAe,UACf,EAAE,OAAO,MAAM,SAA+B,GAC9C,MAAM,QACR;AACF;AAEA,SAAgB,aAAsE;CACpF,MAAM,WAAW,WAAW,cAAc;CAC1C,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,mDAAmD;CAErE,OAAO;AACT;AAGA,SAAgB,OAAqE;CACnF,MAAM,WAAW,WAAc;CAC/B,MAAM,UAAU,WAAW,QAAQ;CAEnC,OAAO,cAAc,MAAM,SAAS,CAAC,GAAG,CAAC,UAAU,OAAO,CAAC;AAC7D;AAEA,SAAS,MAAuC,GAAS;CACvD,MAAM,OAAO;CACb,MAAM,UAAU,GAAG,SAAoB,KAAK,GAAG,IAAI;CACnD,MAAM,KAAK,EAAE;CACb,OAAO;AACT;AAEA,SAAgB,YAAgD;CAC9D,MAAM,WAAW,WAAW;CAC5B,WAAW,QAAQ;CACnB,OAAO,CAAC,SAAS,QAAQ,SAAS,SAAS;AAC7C;AAEA,SAAS,WAAsC,UAA8B;CAC3E,OAAO,qBACL,SAAS,iBACH,SAAS,eACT,SAAS,OACjB;AACF;AAGA,SAAgB,MAAM,OAAiC;CACrD,MAAM,MAAM,WAAW,cAAc;CACrC,MAAM,WAAW,MAAM,YAAY;CACnC,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,oEAAoE;CAEtF,WAAW,QAAQ;CACnB,OAAO,YAAY,UAAU,KAAK;AACpC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import {\n createContext,\n createElement,\n useContext,\n useMemo,\n useSyncExternalStore,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport type { DictionaryInput, Params, TFunction, Verbaly } from 'verbaly';\nimport { renderTrans, type TransProps } from './render';\n\nexport type { TransOptions, TransProps } from './render';\n\nconst VerbalyContext = createContext<Verbaly | null>(null);\n\n// what virtual:verbaly registers in a browser; a server holds one instance per request instead\nconst APP_INSTANCE = Symbol.for('verbaly.app');\n\nfunction appInstance(): Verbaly | null {\n if (typeof document === 'undefined') return null;\n return ((globalThis as Record<symbol, unknown>)[APP_INSTANCE] as Verbaly | undefined) ?? null;\n}\n\nexport interface VerbalyProviderProps<D extends DictionaryInput> {\n instance: Verbaly<D>;\n children?: ReactNode;\n}\n\nexport function VerbalyProvider<D extends DictionaryInput>(\n props: VerbalyProviderProps<D>,\n): ReactElement {\n return createElement(\n VerbalyContext.Provider,\n { value: props.instance as unknown as Verbaly },\n props.children,\n );\n}\n\n// a provider wins; without one, a browser or a test reads the app's own, as react-i18next does\nexport function useVerbaly<D extends DictionaryInput = DictionaryInput>(): Verbaly<D> {\n const instance = useContext(VerbalyContext) ?? appInstance();\n if (!instance) {\n throw new Error(\n '[verbaly] useVerbaly requires a <VerbalyProvider>: on a server, or before virtual:verbaly loads',\n );\n }\n return instance as unknown as Verbaly<D>;\n}\n\n// typed by the project's catalog once verbaly.d.ts exists, by a dictionary when one is named\nexport function useT<D extends DictionaryInput = DictionaryInput>(): Verbaly<D>['t'] {\n const instance = useVerbaly<D>();\n const version = useVersion(instance);\n // a new t per locale or catalog: a memo or an effect keyed on t would keep the old language\n return useMemo(() => bound(instance.t), [instance, version]);\n}\n\nfunction bound<T extends Pick<TFunction, 'id'>>(t: T): T {\n const call = t as unknown as (...args: unknown[]) => string;\n const fresh = ((...args: unknown[]) => call(...args)) as unknown as T;\n fresh.id = t.id;\n return fresh;\n}\n\nexport function useLocale(): [string, (locale: string) => void] {\n const instance = useVerbaly();\n useVersion(instance);\n return [instance.locale, instance.setLocale];\n}\n\nfunction useVersion<D extends DictionaryInput>(instance: Verbaly<D>): number {\n return useSyncExternalStore(\n instance.subscribe,\n () => instance.version,\n () => instance.version,\n );\n}\n\n// translated message + element interpolation\nexport function Trans(props: TransProps): ReactElement {\n const ctx = useContext(VerbalyContext);\n const instance = props.instance ?? ctx ?? appInstance();\n if (!instance) {\n throw new Error('[verbaly] <Trans> requires an instance prop or a <VerbalyProvider>');\n }\n useVersion(instance);\n return renderTrans(instance, props);\n}\n\nexport type { Params, TFunction, Verbaly };\n"],"mappings":";;;AAcA,MAAM,iBAAiB,cAA8B,IAAI;AAGzD,MAAM,eAAe,OAAO,IAAI,aAAa;AAE7C,SAAS,cAA8B;CACrC,IAAI,OAAO,aAAa,aAAa,OAAO;CAC5C,OAAS,WAAuC,iBAAyC;AAC3F;AAOA,SAAgB,gBACd,OACc;CACd,OAAO,cACL,eAAe,UACf,EAAE,OAAO,MAAM,SAA+B,GAC9C,MAAM,QACR;AACF;AAGA,SAAgB,aAAsE;CACpF,MAAM,WAAW,WAAW,cAAc,KAAK,YAAY;CAC3D,IAAI,CAAC,UACH,MAAM,IAAI,MACR,iGACF;CAEF,OAAO;AACT;AAGA,SAAgB,OAAqE;CACnF,MAAM,WAAW,WAAc;CAC/B,MAAM,UAAU,WAAW,QAAQ;CAEnC,OAAO,cAAc,MAAM,SAAS,CAAC,GAAG,CAAC,UAAU,OAAO,CAAC;AAC7D;AAEA,SAAS,MAAuC,GAAS;CACvD,MAAM,OAAO;CACb,MAAM,UAAU,GAAG,SAAoB,KAAK,GAAG,IAAI;CACnD,MAAM,KAAK,EAAE;CACb,OAAO;AACT;AAEA,SAAgB,YAAgD;CAC9D,MAAM,WAAW,WAAW;CAC5B,WAAW,QAAQ;CACnB,OAAO,CAAC,SAAS,QAAQ,SAAS,SAAS;AAC7C;AAEA,SAAS,WAAsC,UAA8B;CAC3E,OAAO,qBACL,SAAS,iBACH,SAAS,eACT,SAAS,OACjB;AACF;AAGA,SAAgB,MAAM,OAAiC;CACrD,MAAM,MAAM,WAAW,cAAc;CACrC,MAAM,WAAW,MAAM,YAAY,OAAO,YAAY;CACtD,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,oEAAoE;CAEtF,WAAW,QAAQ;CACnB,OAAO,YAAY,UAAU,KAAK;AACpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verbaly/react",
3
- "version": "0.69.1",
3
+ "version": "0.71.0",
4
4
  "description": "React bindings for Verbaly: hooks over the reactive core.",
5
5
  "keywords": [
6
6
  "i18n",
@@ -58,17 +58,17 @@
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": "^18.0.0 || ^19.0.0",
61
- "verbaly": "^0.69.1"
61
+ "verbaly": "^0.71.0"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/react": "^19.3.0",
65
65
  "@types/react-dom": "^19.3.0",
66
- "happy-dom": "^20.14.5",
67
- "preact": "^11.0.0",
66
+ "happy-dom": "^21.0.1",
67
+ "preact": "^11.0.1",
68
68
  "preact-render-to-string": "^6.8.0",
69
69
  "react": "^19.3.0",
70
70
  "react-dom": "^19.3.0",
71
- "verbaly": "^0.69.1"
71
+ "verbaly": "^0.71.0"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "tsdown",