intor 2.0.0 → 2.0.2
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 +0 -4
- package/dist/next/index.d.cts +1 -3
- package/dist/next/index.d.ts +1 -3
- package/dist/next/index.js +0 -4
- package/package.json +1 -3
package/dist/next/index.cjs
CHANGED
|
@@ -628,10 +628,6 @@ var TranslateHandlersProvider = ({
|
|
|
628
628
|
};
|
|
629
629
|
function useTranslateHandlers() {
|
|
630
630
|
const context = React7__namespace.useContext(TranslateHandlersContext);
|
|
631
|
-
if (!context)
|
|
632
|
-
throw new Error(
|
|
633
|
-
"useTranslateHandlers must be used within a TranslateHandlersProvider"
|
|
634
|
-
);
|
|
635
631
|
return context;
|
|
636
632
|
}
|
|
637
633
|
var useInitLoadingState = (config) => {
|
package/dist/next/index.d.cts
CHANGED
|
@@ -163,11 +163,9 @@ type IntorMessages = void;
|
|
|
163
163
|
declare function useIntor<M = IntorMessages>(): TranslatorMethods<M>;
|
|
164
164
|
declare function useIntor<M = IntorMessages, K extends PreKey<M> = PreKey<M>>(preKey: M extends void ? string : K): ScopedTranslatorMethods<M, K>;
|
|
165
165
|
|
|
166
|
-
interface LinkProps extends Omit<LinkProps$1, "href"> {
|
|
166
|
+
interface LinkProps extends Omit<LinkProps$1, "href">, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
|
|
167
167
|
href?: Url;
|
|
168
168
|
locale?: string;
|
|
169
|
-
children: React.ReactNode;
|
|
170
|
-
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>["onClick"];
|
|
171
169
|
}
|
|
172
170
|
/**
|
|
173
171
|
* Localized Link component wrapping Next.js Link.
|
package/dist/next/index.d.ts
CHANGED
|
@@ -163,11 +163,9 @@ type IntorMessages = void;
|
|
|
163
163
|
declare function useIntor<M = IntorMessages>(): TranslatorMethods<M>;
|
|
164
164
|
declare function useIntor<M = IntorMessages, K extends PreKey<M> = PreKey<M>>(preKey: M extends void ? string : K): ScopedTranslatorMethods<M, K>;
|
|
165
165
|
|
|
166
|
-
interface LinkProps extends Omit<LinkProps$1, "href"> {
|
|
166
|
+
interface LinkProps extends Omit<LinkProps$1, "href">, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
|
|
167
167
|
href?: Url;
|
|
168
168
|
locale?: string;
|
|
169
|
-
children: React.ReactNode;
|
|
170
|
-
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>["onClick"];
|
|
171
169
|
}
|
|
172
170
|
/**
|
|
173
171
|
* Localized Link component wrapping Next.js Link.
|
package/dist/next/index.js
CHANGED
|
@@ -602,10 +602,6 @@ var TranslateHandlersProvider = ({
|
|
|
602
602
|
};
|
|
603
603
|
function useTranslateHandlers() {
|
|
604
604
|
const context = React7.useContext(TranslateHandlersContext);
|
|
605
|
-
if (!context)
|
|
606
|
-
throw new Error(
|
|
607
|
-
"useTranslateHandlers must be used within a TranslateHandlersProvider"
|
|
608
|
-
);
|
|
609
605
|
return context;
|
|
610
606
|
}
|
|
611
607
|
var useInitLoadingState = (config) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
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",
|
|
@@ -56,8 +56,6 @@
|
|
|
56
56
|
"types": "./dist/index.d.ts",
|
|
57
57
|
"files": [
|
|
58
58
|
"dist",
|
|
59
|
-
"exports/next/provider/intor-provider.jsx",
|
|
60
|
-
"exports/next/provider/translate-handlers-provider.jsx",
|
|
61
59
|
"README.md",
|
|
62
60
|
"LICENSE"
|
|
63
61
|
],
|