@underverse-ui/underverse 1.0.211 → 2.0.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.
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getPanelBorderRadiusClass,
3
3
  useUnderverseUIConfig
4
- } from "./chunk-AMAILXHP.js";
4
+ } from "./chunk-LTIU5FQY.js";
5
5
  import {
6
6
  cn,
7
7
  useGlobalI18n
8
- } from "./chunk-BRDGIALS.js";
8
+ } from "./chunk-PLHJWXCW.js";
9
9
 
10
10
  // src/components/Modal.tsx
11
11
  import * as React from "react";
@@ -196,4 +196,4 @@ var Modal_default = Modal;
196
196
  export {
197
197
  Modal_default
198
198
  };
199
- //# sourceMappingURL=chunk-GKY5DHGR.js.map
199
+ //# sourceMappingURL=chunk-MNZVW2QX.js.map
@@ -1938,35 +1938,29 @@ function NextIntlAdapterProvider({
1938
1938
  messages
1939
1939
  }) {
1940
1940
  const normalizedLocale = normalizeLocale(locale, "en");
1941
- const translatorCache = React3.useMemo(
1942
- () => /* @__PURE__ */ new Map(),
1943
- [normalizedLocale, messages]
1944
- );
1945
- const translate = React3.useCallback((namespace, key, values) => {
1946
- let translator = translatorCache.get(namespace);
1947
- if (!translator) {
1948
- const runtimeTranslator = createTranslator({
1949
- locale: normalizedLocale,
1950
- messages,
1951
- namespace,
1952
- onError: () => {
1953
- }
1954
- });
1955
- translator = (translationKey, translationValues) => runtimeTranslator(translationKey, translationValues);
1956
- translatorCache.set(namespace, translator);
1957
- }
1958
- try {
1959
- return {
1960
- locale: normalizedLocale,
1961
- translated: translator(key, values)
1962
- };
1963
- } catch {
1964
- return {
1965
- locale: normalizedLocale,
1966
- translated: null
1967
- };
1941
+ const runtimeTranslator = React3.useMemo(() => createTranslator({
1942
+ locale: normalizedLocale,
1943
+ messages,
1944
+ onError: () => {
1968
1945
  }
1969
- }, [messages, normalizedLocale, translatorCache]);
1946
+ }), [messages, normalizedLocale]);
1947
+ const translate = React3.useCallback(
1948
+ (namespace, key, values) => {
1949
+ const namespacedKey = namespace ? `${namespace}.${key}` : key;
1950
+ try {
1951
+ return {
1952
+ locale: normalizedLocale,
1953
+ translated: runtimeTranslator(namespacedKey, values)
1954
+ };
1955
+ } catch {
1956
+ return {
1957
+ locale: normalizedLocale,
1958
+ translated: null
1959
+ };
1960
+ }
1961
+ },
1962
+ [normalizedLocale, runtimeTranslator]
1963
+ );
1970
1964
  const value = React3.useMemo(() => ({
1971
1965
  locale: normalizedLocale,
1972
1966
  translate
@@ -2399,7 +2393,7 @@ var Tooltip = React5.forwardRef(({
2399
2393
  onBlur: chainEventHandlers(
2400
2394
  triggerPassthroughProps.onBlur,
2401
2395
  childProps.onBlur,
2402
- (e) => {
2396
+ () => {
2403
2397
  handleBlur();
2404
2398
  }
2405
2399
  )
@@ -2472,4 +2466,4 @@ export {
2472
2466
  mergeRefs,
2473
2467
  Tooltip
2474
2468
  };
2475
- //# sourceMappingURL=chunk-BRDGIALS.js.map
2469
+ //# sourceMappingURL=chunk-PLHJWXCW.js.map