intor 2.2.13 → 2.2.14
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/dist/next/index.cjs +4 -4
- package/dist/next/index.js +4 -4
- package/dist/react/index.cjs +4 -4
- package/dist/react/index.js +4 -4
- package/package.json +1 -1
package/dist/next/index.cjs
CHANGED
|
@@ -853,7 +853,7 @@ var TranslateHandlersProvider = ({
|
|
|
853
853
|
handlers,
|
|
854
854
|
children
|
|
855
855
|
}) => {
|
|
856
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TranslateHandlersContext.Provider, { value:
|
|
856
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TranslateHandlersContext.Provider, { value: handlers, children });
|
|
857
857
|
};
|
|
858
858
|
function useTranslateHandlers() {
|
|
859
859
|
const context = React7__namespace.useContext(TranslateHandlersContext);
|
|
@@ -867,7 +867,7 @@ function TranslatorProvider({
|
|
|
867
867
|
const { config } = useConfig();
|
|
868
868
|
const { messages, isLoading: internalIsLoading } = useMessages();
|
|
869
869
|
const { locale } = useLocale();
|
|
870
|
-
const
|
|
870
|
+
const translateHandlers = useTranslateHandlers();
|
|
871
871
|
const { fallbackLocales, translator: translatorOptions } = config;
|
|
872
872
|
const isLoading = Boolean(externalIsLoading ?? internalIsLoading);
|
|
873
873
|
const translator = React7__namespace.useMemo(() => {
|
|
@@ -878,14 +878,14 @@ function TranslatorProvider({
|
|
|
878
878
|
fallbackLocales,
|
|
879
879
|
loadingMessage: translatorOptions?.loadingMessage,
|
|
880
880
|
placeholder: translatorOptions?.placeholder,
|
|
881
|
-
handlers
|
|
881
|
+
handlers: translateHandlers
|
|
882
882
|
});
|
|
883
883
|
}, [
|
|
884
884
|
messages,
|
|
885
885
|
locale,
|
|
886
886
|
isLoading,
|
|
887
887
|
fallbackLocales,
|
|
888
|
-
|
|
888
|
+
translateHandlers,
|
|
889
889
|
translatorOptions?.loadingMessage,
|
|
890
890
|
translatorOptions?.placeholder
|
|
891
891
|
]);
|
package/dist/next/index.js
CHANGED
|
@@ -826,7 +826,7 @@ var TranslateHandlersProvider = ({
|
|
|
826
826
|
handlers,
|
|
827
827
|
children
|
|
828
828
|
}) => {
|
|
829
|
-
return /* @__PURE__ */ jsx(TranslateHandlersContext.Provider, { value:
|
|
829
|
+
return /* @__PURE__ */ jsx(TranslateHandlersContext.Provider, { value: handlers, children });
|
|
830
830
|
};
|
|
831
831
|
function useTranslateHandlers() {
|
|
832
832
|
const context = React7.useContext(TranslateHandlersContext);
|
|
@@ -840,7 +840,7 @@ function TranslatorProvider({
|
|
|
840
840
|
const { config } = useConfig();
|
|
841
841
|
const { messages, isLoading: internalIsLoading } = useMessages();
|
|
842
842
|
const { locale } = useLocale();
|
|
843
|
-
const
|
|
843
|
+
const translateHandlers = useTranslateHandlers();
|
|
844
844
|
const { fallbackLocales, translator: translatorOptions } = config;
|
|
845
845
|
const isLoading = Boolean(externalIsLoading ?? internalIsLoading);
|
|
846
846
|
const translator = React7.useMemo(() => {
|
|
@@ -851,14 +851,14 @@ function TranslatorProvider({
|
|
|
851
851
|
fallbackLocales,
|
|
852
852
|
loadingMessage: translatorOptions?.loadingMessage,
|
|
853
853
|
placeholder: translatorOptions?.placeholder,
|
|
854
|
-
handlers
|
|
854
|
+
handlers: translateHandlers
|
|
855
855
|
});
|
|
856
856
|
}, [
|
|
857
857
|
messages,
|
|
858
858
|
locale,
|
|
859
859
|
isLoading,
|
|
860
860
|
fallbackLocales,
|
|
861
|
-
|
|
861
|
+
translateHandlers,
|
|
862
862
|
translatorOptions?.loadingMessage,
|
|
863
863
|
translatorOptions?.placeholder
|
|
864
864
|
]);
|
package/dist/react/index.cjs
CHANGED
|
@@ -549,7 +549,7 @@ var TranslateHandlersProvider = ({
|
|
|
549
549
|
handlers,
|
|
550
550
|
children
|
|
551
551
|
}) => {
|
|
552
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TranslateHandlersContext.Provider, { value:
|
|
552
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TranslateHandlersContext.Provider, { value: handlers, children });
|
|
553
553
|
};
|
|
554
554
|
function useTranslateHandlers() {
|
|
555
555
|
const context = React7__namespace.useContext(TranslateHandlersContext);
|
|
@@ -563,7 +563,7 @@ function TranslatorProvider({
|
|
|
563
563
|
const { config } = useConfig();
|
|
564
564
|
const { messages, isLoading: internalIsLoading } = useMessages();
|
|
565
565
|
const { locale } = useLocale();
|
|
566
|
-
const
|
|
566
|
+
const translateHandlers = useTranslateHandlers();
|
|
567
567
|
const { fallbackLocales, translator: translatorOptions } = config;
|
|
568
568
|
const isLoading = Boolean(externalIsLoading ?? internalIsLoading);
|
|
569
569
|
const translator = React7__namespace.useMemo(() => {
|
|
@@ -574,14 +574,14 @@ function TranslatorProvider({
|
|
|
574
574
|
fallbackLocales,
|
|
575
575
|
loadingMessage: translatorOptions?.loadingMessage,
|
|
576
576
|
placeholder: translatorOptions?.placeholder,
|
|
577
|
-
handlers
|
|
577
|
+
handlers: translateHandlers
|
|
578
578
|
});
|
|
579
579
|
}, [
|
|
580
580
|
messages,
|
|
581
581
|
locale,
|
|
582
582
|
isLoading,
|
|
583
583
|
fallbackLocales,
|
|
584
|
-
|
|
584
|
+
translateHandlers,
|
|
585
585
|
translatorOptions?.loadingMessage,
|
|
586
586
|
translatorOptions?.placeholder
|
|
587
587
|
]);
|
package/dist/react/index.js
CHANGED
|
@@ -523,7 +523,7 @@ var TranslateHandlersProvider = ({
|
|
|
523
523
|
handlers,
|
|
524
524
|
children
|
|
525
525
|
}) => {
|
|
526
|
-
return /* @__PURE__ */ jsx(TranslateHandlersContext.Provider, { value:
|
|
526
|
+
return /* @__PURE__ */ jsx(TranslateHandlersContext.Provider, { value: handlers, children });
|
|
527
527
|
};
|
|
528
528
|
function useTranslateHandlers() {
|
|
529
529
|
const context = React7.useContext(TranslateHandlersContext);
|
|
@@ -537,7 +537,7 @@ function TranslatorProvider({
|
|
|
537
537
|
const { config } = useConfig();
|
|
538
538
|
const { messages, isLoading: internalIsLoading } = useMessages();
|
|
539
539
|
const { locale } = useLocale();
|
|
540
|
-
const
|
|
540
|
+
const translateHandlers = useTranslateHandlers();
|
|
541
541
|
const { fallbackLocales, translator: translatorOptions } = config;
|
|
542
542
|
const isLoading = Boolean(externalIsLoading ?? internalIsLoading);
|
|
543
543
|
const translator = React7.useMemo(() => {
|
|
@@ -548,14 +548,14 @@ function TranslatorProvider({
|
|
|
548
548
|
fallbackLocales,
|
|
549
549
|
loadingMessage: translatorOptions?.loadingMessage,
|
|
550
550
|
placeholder: translatorOptions?.placeholder,
|
|
551
|
-
handlers
|
|
551
|
+
handlers: translateHandlers
|
|
552
552
|
});
|
|
553
553
|
}, [
|
|
554
554
|
messages,
|
|
555
555
|
locale,
|
|
556
556
|
isLoading,
|
|
557
557
|
fallbackLocales,
|
|
558
|
-
|
|
558
|
+
translateHandlers,
|
|
559
559
|
translatorOptions?.loadingMessage,
|
|
560
560
|
translatorOptions?.placeholder
|
|
561
561
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intor",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.14",
|
|
4
4
|
"description": "A modular and extensible i18n core designed for TypeScript and JavaScript projects. Intor enables custom translation logic with support for both frontend and backend environments, featuring runtime configuration, caching, adapters, and message loaders.",
|
|
5
5
|
"author": "Yiming Liao",
|
|
6
6
|
"license": "MIT",
|